From f2c29134afffe823d04c08f2019d3678c99dd279 Mon Sep 17 00:00:00 2001 From: Raziel Melchor Date: Sun, 17 Sep 2023 16:36:11 -0700 Subject: [PATCH 01/13] Code-based service --- src/ExpressionLoader.jsx | 2 +- src/ImageProcessor.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ExpressionLoader.jsx b/src/ExpressionLoader.jsx index 3676e87..19d3e7a 100644 --- a/src/ExpressionLoader.jsx +++ b/src/ExpressionLoader.jsx @@ -39,7 +39,7 @@ const ExpressionLoader = () => { method: "POST", headers: { "content-type": "application/json", - app_key: "API_KEY!", + app_key: "API KEY!" }, body: JSON.stringify({ src: img, diff --git a/src/ImageProcessor.jsx b/src/ImageProcessor.jsx index cc9af8c..d68a5cf 100644 --- a/src/ImageProcessor.jsx +++ b/src/ImageProcessor.jsx @@ -15,7 +15,7 @@ const ImageProcessor = () => { method: "POST", headers: { "content-type": "application/json", - app_key: process.env.REACT_APP_API_KEY, + app_key: "API KEY!", }, body: JSON.stringify({ src: img, From 873e2bb882de56ed40be6e4c7d2c2b7e82c0be8d Mon Sep 17 00:00:00 2001 From: Raziel Melchor Date: Sun, 17 Sep 2023 16:38:52 -0700 Subject: [PATCH 02/13] Code-based service --- .github/workflows/pipeline.yml | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/pipeline.yml diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 0000000..b09a321 --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,37 @@ +name: Deploy to App Runner - Source # Name of the workflow +on: + push: + branches: [ deploy_config ] # Trigger workflow on git push to main branch + workflow_dispatch: # Allow manual invocation of the workflow + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 # Configure with AWS Credentials + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + + - name: Deploy to App Runner + id: deploy-apprunner + uses: awslabs/amazon-app-runner-deploy@main # Deploy app runner service + with: + service: app-runner-git-deploy-service + source-connection-arn: ${{ secrets.AWS_CONNECTION_SOURCE_ARN }} + repo: https://github.com/${{ github.repository }} + branch: ${{ github.ref }} + runtime: NODEJS_12 + build-command: npm install + start-command: npm run dev + port: 5173 + region: ${{ secrets.AWS_REGION }} + cpu : 1 + memory : 2 + wait-for-service-stability: true + + - name: App Runner output + run: echo "App runner output ${{ steps.deploy-apprunner.outputs.service-id }}" From 68d10ee4a0233d109d66f0c73d911689bd1e3623 Mon Sep 17 00:00:00 2001 From: Raziel Melchor Date: Fri, 22 Sep 2023 20:09:57 -0700 Subject: [PATCH 03/13] Use concurrently for port health check --- package-lock.json | 811 ++++++++++++++++++++++++++++- package.json | 6 +- server/index.js | 9 + server/package-lock.json | 1036 ++++++++++++++++++++++++++++++++++++++ server/package.json | 17 + vite.config.js | 6 +- 6 files changed, 1873 insertions(+), 12 deletions(-) create mode 100644 server/index.js create mode 100644 server/package-lock.json create mode 100644 server/package.json diff --git a/package-lock.json b/package-lock.json index 7acda2b..7d9133c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { + "concurrently": "^8.2.1", "mathjs": "^11.8.0", "mathsteps": "^0.2.0", "plotly.js": "^2.20.0", @@ -24,6 +25,7 @@ "eslint-plugin-import": "^2.26.0", "eslint-plugin-jsx-a11y": "^6.6.1", "eslint-plugin-react": "^7.31.8", + "nodemon": "^3.0.1", "postcss": "^8.4.18", "prettier": "^2.7.1", "prettier-plugin-tailwindcss": "^0.3.0", @@ -870,6 +872,12 @@ "vite": "^3.0.0" } }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, "node_modules/abs-svg-path": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/abs-svg-path/-/abs-svg-path-0.1.1.tgz", @@ -953,7 +961,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "engines": { "node": ">=8" } @@ -1409,6 +1416,19 @@ "resolved": "https://registry.npmjs.org/clamp/-/clamp-1.0.1.tgz", "integrity": "sha512-kgMuFyE78OC6Dyu3Dy7vcx4uy97EIbVxJB/B0eJ3bUNAkwdNcxYzgKltnyADiYwsR7SEqkkUPsEUT//OVS6XMA==" }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/color-alpha": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/color-alpha/-/color-alpha-1.0.4.tgz", @@ -1527,6 +1547,110 @@ "typedarray": "^0.0.6" } }, + "node_modules/concurrently": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.1.tgz", + "integrity": "sha512-nVraf3aXOpIcNud5pB9M82p1tynmZkrSGQ1p6X/VY8cJ+2LMVqAgXsJxYYefACSHbTYlm92O1xuhdGTjwoEvbQ==", + "dependencies": { + "chalk": "^4.1.2", + "date-fns": "^2.30.0", + "lodash": "^4.17.21", + "rxjs": "^7.8.1", + "shell-quote": "^1.8.1", + "spawn-command": "0.0.2", + "supports-color": "^8.1.1", + "tree-kill": "^1.2.2", + "yargs": "^17.7.2" + }, + "bin": { + "conc": "dist/bin/concurrently.js", + "concurrently": "dist/bin/concurrently.js" + }, + "engines": { + "node": "^14.13.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/concurrently/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/concurrently/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/const-max-uint32": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/const-max-uint32/-/const-max-uint32-1.0.2.tgz", @@ -1762,6 +1886,21 @@ "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", "dev": true }, + "node_modules/date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dependencies": { + "@babel/runtime": "^7.21.0" + }, + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -2471,7 +2610,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, "engines": { "node": ">=6" } @@ -3304,6 +3442,14 @@ "resolved": "https://registry.npmjs.org/geojson-vt/-/geojson-vt-3.2.1.tgz", "integrity": "sha512-EvGQQi/zPrDA6zr6BnJD/YhwAkBP8nnJ9emh3EnHQKVMfg/MRVtPbMYdgVy/IaEmn4UfagD2a6fafPDL5hbtwg==" }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-canvas-context": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/get-canvas-context/-/get-canvas-context-1.0.2.tgz", @@ -3803,6 +3949,12 @@ "node": ">= 4" } }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true + }, "node_modules/image-palette": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/image-palette/-/image-palette-2.1.0.tgz", @@ -4051,6 +4203,14 @@ "resolved": "https://registry.npmjs.org/is-float-array/-/is-float-array-1.0.0.tgz", "integrity": "sha512-4ew1Sx6B6kEAl3T3NOM0yB94J3NZnBdNt4paw0e8nY73yHHTeTEhyQ3Lj7EQEnv5LD+GxNTaT4L46jcKjjpLiQ==" }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -4425,6 +4585,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -4758,6 +4923,91 @@ "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", "dev": true }, + "node_modules/nodemon": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz", + "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==", + "dev": true, + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^3.2.7", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^7.5.3", + "simple-update-notifier": "^2.0.0", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/nodemon/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/nodemon/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/nodemon/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/nodemon/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "*" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -5399,6 +5649,12 @@ "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", "integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==" }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true + }, "node_modules/punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", @@ -5672,6 +5928,14 @@ "regl-scatter2d": "^3.2.3" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve": { "version": "1.22.2", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", @@ -5778,6 +6042,14 @@ "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==" }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -5874,6 +6146,14 @@ "node": ">=8" } }, + "node_modules/shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -5893,6 +6173,51 @@ "resolved": "https://registry.npmjs.org/signum/-/signum-1.0.0.tgz", "integrity": "sha512-yodFGwcyt59XRh7w5W3jPcIQb3Bwi21suEfT7MAWnBX3iCdklJpgDgvGT9o04UonglZN5SNMfJFkHIR/jO8GHw==" }, + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/simple-update-notifier/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/simple-update-notifier/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/simple-update-notifier/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -5918,6 +6243,11 @@ "deprecated": "Please use @jridgewell/sourcemap-codec instead", "dev": true }, + "node_modules/spawn-command": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2.tgz", + "integrity": "sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==" + }, "node_modules/stack-trace": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", @@ -6002,6 +6332,24 @@ "is-base64": "^0.1.0" } }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, "node_modules/string.prototype.matchall": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", @@ -6070,7 +6418,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -6368,6 +6715,26 @@ "topoquantize": "bin/topoquantize" } }, + "node_modules/touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dev": true, + "dependencies": { + "nopt": "~1.0.10" + }, + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "bin": { + "tree-kill": "cli.js" + } + }, "node_modules/tsconfig-paths": { "version": "3.14.2", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", @@ -6392,6 +6759,11 @@ "json5": "lib/cli.js" } }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/type": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", @@ -6477,6 +6849,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true + }, "node_modules/unquote": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", @@ -6800,6 +7178,52 @@ "object-assign": "^4.1.0" } }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -6813,6 +7237,14 @@ "node": ">=0.4" } }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", @@ -6828,6 +7260,31 @@ "node": ">= 6" } }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -7465,6 +7922,12 @@ "react-refresh": "^0.14.0" } }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, "abs-svg-path": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/abs-svg-path/-/abs-svg-path-0.1.1.tgz", @@ -7528,8 +7991,7 @@ "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" }, "ansi-styles": { "version": "3.2.1", @@ -7861,6 +8323,16 @@ "resolved": "https://registry.npmjs.org/clamp/-/clamp-1.0.1.tgz", "integrity": "sha512-kgMuFyE78OC6Dyu3Dy7vcx4uy97EIbVxJB/B0eJ3bUNAkwdNcxYzgKltnyADiYwsR7SEqkkUPsEUT//OVS6XMA==" }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, "color-alpha": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/color-alpha/-/color-alpha-1.0.4.tgz", @@ -7969,6 +8441,77 @@ "typedarray": "^0.0.6" } }, + "concurrently": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.1.tgz", + "integrity": "sha512-nVraf3aXOpIcNud5pB9M82p1tynmZkrSGQ1p6X/VY8cJ+2LMVqAgXsJxYYefACSHbTYlm92O1xuhdGTjwoEvbQ==", + "requires": { + "chalk": "^4.1.2", + "date-fns": "^2.30.0", + "lodash": "^4.17.21", + "rxjs": "^7.8.1", + "shell-quote": "^1.8.1", + "spawn-command": "0.0.2", + "supports-color": "^8.1.1", + "tree-kill": "^1.2.2", + "yargs": "^17.7.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "const-max-uint32": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/const-max-uint32/-/const-max-uint32-1.0.2.tgz", @@ -8182,6 +8725,14 @@ "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", "dev": true }, + "date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "requires": { + "@babel/runtime": "^7.21.0" + } + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -8649,8 +9200,7 @@ "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" }, "escape-latex": { "version": "1.2.0", @@ -9290,6 +9840,11 @@ "resolved": "https://registry.npmjs.org/geojson-vt/-/geojson-vt-3.2.1.tgz", "integrity": "sha512-EvGQQi/zPrDA6zr6BnJD/YhwAkBP8nnJ9emh3EnHQKVMfg/MRVtPbMYdgVy/IaEmn4UfagD2a6fafPDL5hbtwg==" }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, "get-canvas-context": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/get-canvas-context/-/get-canvas-context-1.0.2.tgz", @@ -9701,6 +10256,12 @@ "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true }, + "ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true + }, "image-palette": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/image-palette/-/image-palette-2.1.0.tgz", @@ -9866,6 +10427,11 @@ "resolved": "https://registry.npmjs.org/is-float-array/-/is-float-array-1.0.0.tgz", "integrity": "sha512-4ew1Sx6B6kEAl3T3NOM0yB94J3NZnBdNt4paw0e8nY73yHHTeTEhyQ3Lj7EQEnv5LD+GxNTaT4L46jcKjjpLiQ==" }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -10134,6 +10700,11 @@ "p-locate": "^5.0.0" } }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -10406,6 +10977,68 @@ "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", "dev": true }, + "nodemon": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz", + "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==", + "dev": true, + "requires": { + "chokidar": "^3.5.2", + "debug": "^3.2.7", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^7.5.3", + "simple-update-notifier": "^2.0.0", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "dev": true, + "requires": { + "abbrev": "1" + } + }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -10827,6 +11460,12 @@ "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", "integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==" }, + "pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true + }, "punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", @@ -11053,6 +11692,11 @@ "regl-scatter2d": "^3.2.3" } }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" + }, "resolve": { "version": "1.22.2", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", @@ -11120,6 +11764,14 @@ "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==" }, + "rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "requires": { + "tslib": "^2.1.0" + } + }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -11190,6 +11842,11 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==" + }, "side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -11206,6 +11863,41 @@ "resolved": "https://registry.npmjs.org/signum/-/signum-1.0.0.tgz", "integrity": "sha512-yodFGwcyt59XRh7w5W3jPcIQb3Bwi21suEfT7MAWnBX3iCdklJpgDgvGT9o04UonglZN5SNMfJFkHIR/jO8GHw==" }, + "simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", + "dev": true, + "requires": { + "semver": "^7.5.3" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -11224,6 +11916,11 @@ "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", "dev": true }, + "spawn-command": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2.tgz", + "integrity": "sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==" + }, "stack-trace": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", @@ -11306,6 +12003,23 @@ "is-base64": "^0.1.0" } }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + } + } + }, "string.prototype.matchall": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", @@ -11359,7 +12073,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "requires": { "ansi-regex": "^5.0.1" } @@ -11592,6 +12305,20 @@ "commander": "2" } }, + "touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dev": true, + "requires": { + "nopt": "~1.0.10" + } + }, + "tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==" + }, "tsconfig-paths": { "version": "3.14.2", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", @@ -11615,6 +12342,11 @@ } } }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "type": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", @@ -11682,6 +12414,12 @@ "which-boxed-primitive": "^1.0.2" } }, + "undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true + }, "unquote": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", @@ -11932,6 +12670,39 @@ "object-assign": "^4.1.0" } }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + } + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -11942,6 +12713,11 @@ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + }, "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", @@ -11954,6 +12730,25 @@ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==" + }, "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index b81f72f..b589e2a 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,13 @@ "main": "index.js", "scripts": { "dev": "vite", + "dev:backend": "nodemon server/index.js", "build": "vite build", "preview": "vite preview", "format": "prettier --write \"src/**/*.{js,jsx}\"", "lint": "eslint \"src/**/*.{js,jsx}\" --quiet", - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "start": "concurrently 'npm:dev' 'npm:dev:backend'" }, "keywords": [], "author": "", @@ -22,6 +24,7 @@ "eslint-plugin-import": "^2.26.0", "eslint-plugin-jsx-a11y": "^6.6.1", "eslint-plugin-react": "^7.31.8", + "nodemon": "^3.0.1", "postcss": "^8.4.18", "prettier": "^2.7.1", "prettier-plugin-tailwindcss": "^0.3.0", @@ -29,6 +32,7 @@ "vite": "^3.1.4" }, "dependencies": { + "concurrently": "^8.2.1", "mathjs": "^11.8.0", "mathsteps": "^0.2.0", "plotly.js": "^2.20.0", diff --git a/server/index.js b/server/index.js new file mode 100644 index 0000000..00ce336 --- /dev/null +++ b/server/index.js @@ -0,0 +1,9 @@ +const express = require("express"), + PORT = 5000, + app = express(); + +app.get("/api/v1", (req, res) => { + res.status(200).json({ ok: Date.now().toString() }); +}); + +app.listen(PORT, () => console.log(`start listening on port : ${PORT}`)); diff --git a/server/package-lock.json b/server/package-lock.json new file mode 100644 index 0000000..cbcca81 --- /dev/null +++ b/server/package-lock.json @@ -0,0 +1,1036 @@ +{ + "name": "server", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "server", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "express": "^4.17.3" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + } + }, + "dependencies": { + "accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "requires": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "requires": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + } + }, + "bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "requires": { + "safe-buffer": "5.2.1" + } + }, + "content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==" + }, + "cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" + }, + "express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "requires": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + } + }, + "finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + } + }, + "forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==" + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "requires": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" + }, + "object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==" + }, + "on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "requires": { + "ee-first": "1.1.1" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "requires": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + } + }, + "qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "requires": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "requires": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "dependencies": { + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, + "serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + } + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==" + } + } +} diff --git a/server/package.json b/server/package.json new file mode 100644 index 0000000..42c9d30 --- /dev/null +++ b/server/package.json @@ -0,0 +1,17 @@ +{ + "name": "server", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "start": "node index.js", + "server": "nodemon index.js" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "express": "^4.17.3" + } + } diff --git a/vite.config.js b/vite.config.js index 4ee6ae2..2370a1f 100644 --- a/vite.config.js +++ b/vite.config.js @@ -5,8 +5,8 @@ export default defineConfig({ plugins: [react()], root: "src", server: { - host: true, - strictPort: true, - port: 5173, + proxy: { + "/api/v1/": "http://localhost:5000/", + }, }, }); From 0b9ad1c75ba1950b1f6c873c23372b06b01ad3cf Mon Sep 17 00:00:00 2001 From: Raziel Melchor Date: Fri, 22 Sep 2023 20:17:08 -0700 Subject: [PATCH 04/13] remove vite config changes --- vite.config.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/vite.config.js b/vite.config.js index 2370a1f..c305603 100644 --- a/vite.config.js +++ b/vite.config.js @@ -4,9 +4,4 @@ import react from "@vitejs/plugin-react"; export default defineConfig({ plugins: [react()], root: "src", - server: { - proxy: { - "/api/v1/": "http://localhost:5000/", - }, - }, }); From a9ac95e3fc3b15cbaa8b3212fe983a6b565389d8 Mon Sep 17 00:00:00 2001 From: Raziel Melchor Date: Sat, 23 Sep 2023 20:59:41 -0700 Subject: [PATCH 05/13] add health check function --- .github/workflows/pipeline.yml | 4 ++-- server/index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index b09a321..2354d05 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -26,8 +26,8 @@ jobs: branch: ${{ github.ref }} runtime: NODEJS_12 build-command: npm install - start-command: npm run dev - port: 5173 + start-command: npm run start + port: 80 region: ${{ secrets.AWS_REGION }} cpu : 1 memory : 2 diff --git a/server/index.js b/server/index.js index 00ce336..a59dd7f 100644 --- a/server/index.js +++ b/server/index.js @@ -1,8 +1,8 @@ const express = require("express"), - PORT = 5000, + PORT = 80, app = express(); -app.get("/api/v1", (req, res) => { +app.get("/", (req, res) => { res.status(200).json({ ok: Date.now().toString() }); }); From 8222cccb738d7ab1c23f467a3797737cd1b3c8b6 Mon Sep 17 00:00:00 2001 From: Raziel Melchor Date: Sat, 23 Sep 2023 21:23:28 -0700 Subject: [PATCH 06/13] add postinstall script --- package-lock.json | 1 + package.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 7d9133c..278fc74 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "": { "name": "starter", "version": "1.0.0", + "hasInstallScript": true, "license": "ISC", "dependencies": { "concurrently": "^8.2.1", diff --git a/package.json b/package.json index b589e2a..5f67b5f 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "format": "prettier --write \"src/**/*.{js,jsx}\"", "lint": "eslint \"src/**/*.{js,jsx}\" --quiet", "test": "echo \"Error: no test specified\" && exit 1", - "start": "concurrently 'npm:dev' 'npm:dev:backend'" + "start": "concurrently 'npm:dev' 'npm:dev:backend'", + "postinstall": "(cd server && npm install)" }, "keywords": [], "author": "", From 03317fe29087e56c11f4dc1fb3334ee3bbf2aca8 Mon Sep 17 00:00:00 2001 From: Raziel Melchor Date: Sat, 23 Sep 2023 21:52:15 -0700 Subject: [PATCH 07/13] api health path --- server/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/index.js b/server/index.js index a59dd7f..37ac7f8 100644 --- a/server/index.js +++ b/server/index.js @@ -2,7 +2,7 @@ const express = require("express"), PORT = 80, app = express(); -app.get("/", (req, res) => { +app.get("/api/health", (req, res) => { res.status(200).json({ ok: Date.now().toString() }); }); From 1f8f80c42b2069df649820375394df3954a2e7a2 Mon Sep 17 00:00:00 2001 From: Raziel Melchor Date: Sat, 23 Sep 2023 22:19:54 -0700 Subject: [PATCH 08/13] wait-for-service-stability --- .github/workflows/image-pipeline.yml | 2 +- .github/workflows/pipeline.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/image-pipeline.yml b/.github/workflows/image-pipeline.yml index 61d811c..9e61524 100644 --- a/.github/workflows/image-pipeline.yml +++ b/.github/workflows/image-pipeline.yml @@ -49,7 +49,7 @@ jobs: cpu : 1 memory : 2 port: 5173 - wait-for-service-stability: true + wait-for-service-stability: false branch: master - name: App Runner output diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 2354d05..2937724 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -27,7 +27,7 @@ jobs: runtime: NODEJS_12 build-command: npm install start-command: npm run start - port: 80 + port: 5173 region: ${{ secrets.AWS_REGION }} cpu : 1 memory : 2 From 4452af012968d1fe5cf4ad2a39dffc2dcfc04362 Mon Sep 17 00:00:00 2001 From: Raziel Melchor Date: Sat, 23 Sep 2023 22:49:49 -0700 Subject: [PATCH 09/13] add proxy --- .github/workflows/image-pipeline.yml | 2 +- vite.config.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/image-pipeline.yml b/.github/workflows/image-pipeline.yml index 9e61524..61d811c 100644 --- a/.github/workflows/image-pipeline.yml +++ b/.github/workflows/image-pipeline.yml @@ -49,7 +49,7 @@ jobs: cpu : 1 memory : 2 port: 5173 - wait-for-service-stability: false + wait-for-service-stability: true branch: master - name: App Runner output diff --git a/vite.config.js b/vite.config.js index c305603..8afdb31 100644 --- a/vite.config.js +++ b/vite.config.js @@ -4,4 +4,12 @@ import react from "@vitejs/plugin-react"; export default defineConfig({ plugins: [react()], root: "src", + server: { + proxy: { + "/api/health": { + target: "http://localhost:80", + secure: false, + }, + }, + }, }); From 65451d51d785417c8774f6e96e6b2b96a046447f Mon Sep 17 00:00:00 2001 From: Raziel Melchor Date: Sun, 24 Sep 2023 16:23:18 -0700 Subject: [PATCH 10/13] Adding dist --- src/dist/assets/index.41e71cc2.css | 1 + src/dist/assets/index.d06b90c2.js | 3711 ++++++++++++++++++++++++++++ src/dist/index.html | 19 + 3 files changed, 3731 insertions(+) create mode 100644 src/dist/assets/index.41e71cc2.css create mode 100644 src/dist/assets/index.d06b90c2.js create mode 100644 src/dist/index.html diff --git a/src/dist/assets/index.41e71cc2.css b/src/dist/assets/index.41e71cc2.css new file mode 100644 index 0000000..d9b6428 --- /dev/null +++ b/src/dist/assets/index.41e71cc2.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.isolate{isolation:isolate}.float-right{float:right}.m-auto{margin:auto}.m-0{margin:0}.m-1{margin:.25rem}.my-0{margin-top:0;margin-bottom:0}.mx-auto{margin-left:auto;margin-right:auto}.mt-2{margin-top:.5rem}.ml-2{margin-left:.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-full{height:100%}.h-1{height:.25rem}.h-24{height:6rem}.h-9{height:2.25rem}.h-2{height:.5rem}.w-full{width:100%}.w-1\/2{width:50%}.w-12{width:3rem}.w-1{width:.25rem}.w-3{width:.75rem}.w-4{width:1rem}.w-2{width:.5rem}.max-w-xs{max-width:20rem}.flex-initial{flex:0 1 auto}.flex-auto{flex:1 1 auto}.grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.cursor-crosshair{cursor:crosshair}.cursor-move{cursor:move}.cursor-col-resize{cursor:col-resize}.cursor-row-resize{cursor:row-resize}.cursor-ns-resize{cursor:ns-resize}.cursor-ew-resize{cursor:ew-resize}.cursor-sw-resize{cursor:sw-resize}.cursor-s-resize{cursor:s-resize}.cursor-se-resize{cursor:se-resize}.cursor-w-resize{cursor:w-resize}.cursor-e-resize{cursor:e-resize}.cursor-nw-resize{cursor:nw-resize}.cursor-n-resize{cursor:n-resize}.cursor-ne-resize{cursor:ne-resize}.cursor-grab{cursor:grab}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.justify-end{justify-content:flex-end}.justify-evenly{justify-content:space-evenly}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-solid{border-style:solid}.bg-asm_dgreen{--tw-bg-opacity: 1;background-color:rgb(57 61 50 / var(--tw-bg-opacity))}.bg-asm_lbrown{--tw-bg-opacity: 1;background-color:rgb(200 201 197 / var(--tw-bg-opacity))}.p-1{padding:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-justify{text-align:justify}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.italic{font-style:italic}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.text-asm_white{--tw-text-opacity: 1;color:rgb(241 243 238 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.\[start\:end\]{start:end}html,body,#root{height:100%;min-height:100%;max-height:100%}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}@media (min-width: 640px){.sm\:ml-1{margin-left:.25rem}.sm\:h-full{height:100%}.sm\:w-full{width:100%}.sm\:w-3\/4{width:75%}.sm\:w-1\/4{width:25%}.sm\:max-w-xs{max-width:20rem}.sm\:grow{flex-grow:1}.sm\:flex-wrap{flex-wrap:wrap}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:justify-end{justify-content:flex-end}.sm\:text-left{text-align:left}} diff --git a/src/dist/assets/index.d06b90c2.js b/src/dist/assets/index.d06b90c2.js new file mode 100644 index 0000000..136079e --- /dev/null +++ b/src/dist/assets/index.d06b90c2.js @@ -0,0 +1,3711 @@ +(function(){const N=document.createElement("link").relList;if(N&&N.supports&&N.supports("modulepreload"))return;for(const X of document.querySelectorAll('link[rel="modulepreload"]'))Y(X);new MutationObserver(X=>{for(const J of X)if(J.type==="childList")for(const R of J.addedNodes)R.tagName==="LINK"&&R.rel==="modulepreload"&&Y(R)}).observe(document,{childList:!0,subtree:!0});function V(X){const J={};return X.integrity&&(J.integrity=X.integrity),X.referrerpolicy&&(J.referrerPolicy=X.referrerpolicy),X.crossorigin==="use-credentials"?J.credentials="include":X.crossorigin==="anonymous"?J.credentials="omit":J.credentials="same-origin",J}function Y(X){if(X.ep)return;X.ep=!0;const J=V(X);fetch(X.href,J)}})();var Bd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tb(T){return T&&T.__esModule&&Object.prototype.hasOwnProperty.call(T,"default")?T.default:T}function $L(T){var N=T.default;if(typeof N=="function"){var V=function(){return N.apply(this,arguments)};V.prototype=N.prototype}else V={};return Object.defineProperty(V,"__esModule",{value:!0}),Object.keys(T).forEach(function(Y){var X=Object.getOwnPropertyDescriptor(T,Y);Object.defineProperty(V,Y,X.get?X:{enumerable:!0,get:function(){return T[Y]}})}),V}var d2={},kS={exports:{}},Lu={},nf={exports:{}},Ii={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Wg=Symbol.for("react.element"),KL=Symbol.for("react.portal"),JL=Symbol.for("react.fragment"),QL=Symbol.for("react.strict_mode"),qL=Symbol.for("react.profiler"),eP=Symbol.for("react.provider"),tP=Symbol.for("react.context"),rP=Symbol.for("react.forward_ref"),nP=Symbol.for("react.suspense"),aP=Symbol.for("react.memo"),iP=Symbol.for("react.lazy"),vA=Symbol.iterator;function oP(T){return T===null||typeof T!="object"?null:(T=vA&&T[vA]||T["@@iterator"],typeof T=="function"?T:null)}var BS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},US=Object.assign,HS={};function h0(T,N,V){this.props=T,this.context=N,this.refs=HS,this.updater=V||BS}h0.prototype.isReactComponent={};h0.prototype.setState=function(T,N){if(typeof T!="object"&&typeof T!="function"&&T!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,T,N,"setState")};h0.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function VS(){}VS.prototype=h0.prototype;function Mb(T,N,V){this.props=T,this.context=N,this.refs=HS,this.updater=V||BS}var Sb=Mb.prototype=new VS;Sb.constructor=Mb;US(Sb,h0.prototype);Sb.isPureReactComponent=!0;var dA=Array.isArray,GS=Object.prototype.hasOwnProperty,Eb={current:null},WS={key:!0,ref:!0,__self:!0,__source:!0};function YS(T,N,V){var Y,X={},J=null,R=null;if(N!=null)for(Y in N.ref!==void 0&&(R=N.ref),N.key!==void 0&&(J=""+N.key),N)GS.call(N,Y)&&!WS.hasOwnProperty(Y)&&(X[Y]=N[Y]);var F=arguments.length-2;if(F===1)X.children=V;else if(1>>1,k=S[E];if(0>>1;EX(z,P))UX(H,z)?(S[E]=H,S[U]=P,E=U):(S[E]=z,S[G]=P,E=G);else if(UX(H,P))S[E]=H,S[U]=P,E=U;else break e}}return f}function X(S,f){var P=S.sortIndex-f.sortIndex;return P!==0?P:S.id-f.id}if(typeof performance=="object"&&typeof performance.now=="function"){var J=performance;T.unstable_now=function(){return J.now()}}else{var R=Date,F=R.now();T.unstable_now=function(){return R.now()-F}}var e=[],i=[],m=1,t=null,y=3,p=!1,l=!1,d=!1,r=typeof setTimeout=="function"?setTimeout:null,n=typeof clearTimeout=="function"?clearTimeout:null,u=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function a(S){for(var f=V(i);f!==null;){if(f.callback===null)Y(i);else if(f.startTime<=S)Y(i),f.sortIndex=f.expirationTime,N(e,f);else break;f=V(i)}}function o(S){if(d=!1,a(S),!l)if(V(e)!==null)l=!0,w(c);else{var f=V(i);f!==null&&M(o,f.startTime-S)}}function c(S,f){l=!1,d&&(d=!1,n(g),g=-1),p=!0;var P=y;try{for(a(f),t=V(e);t!==null&&(!(t.expirationTime>f)||S&&!h());){var E=t.callback;if(typeof E=="function"){t.callback=null,y=t.priorityLevel;var k=E(t.expirationTime<=f);f=T.unstable_now(),typeof k=="function"?t.callback=k:t===V(e)&&Y(e),a(f)}else Y(e);t=V(e)}if(t!==null)var O=!0;else{var G=V(i);G!==null&&M(o,G.startTime-f),O=!1}return O}finally{t=null,y=P,p=!1}}var s=!1,b=null,g=-1,A=5,v=-1;function h(){return!(T.unstable_now()-vS||125E?(S.sortIndex=P,N(i,S),V(e)===null&&S===V(i)&&(d?(n(g),g=-1):d=!0,M(o,P-E))):(S.sortIndex=k,N(e,S),l||p||(l=!0,w(c))),S},T.unstable_shouldYield=h,T.unstable_wrapCallback=function(S){var f=y;return function(){var P=y;y=f;try{return S.apply(this,arguments)}finally{y=P}}}})(XS);(function(T){T.exports=XS})(ZS);/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var jS=nf.exports,Cu=ZS.exports;function ga(T){for(var N="https://reactjs.org/docs/error-decoder.html?invariant="+T,V=1;V"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p2=Object.prototype.hasOwnProperty,cP=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,gA={},mA={};function hP(T){return p2.call(mA,T)?!0:p2.call(gA,T)?!1:cP.test(T)?mA[T]=!0:(gA[T]=!0,!1)}function vP(T,N,V,Y){if(V!==null&&V.type===0)return!1;switch(typeof N){case"function":case"symbol":return!0;case"boolean":return Y?!1:V!==null?!V.acceptsBooleans:(T=T.toLowerCase().slice(0,5),T!=="data-"&&T!=="aria-");default:return!1}}function dP(T,N,V,Y){if(N===null||typeof N>"u"||vP(T,N,V,Y))return!0;if(Y)return!1;if(V!==null)switch(V.type){case 3:return!N;case 4:return N===!1;case 5:return isNaN(N);case 6:return isNaN(N)||1>N}return!1}function Hl(T,N,V,Y,X,J,R){this.acceptsBooleans=N===2||N===3||N===4,this.attributeName=Y,this.attributeNamespace=X,this.mustUseProperty=V,this.propertyName=T,this.type=N,this.sanitizeURL=J,this.removeEmptyString=R}var Qs={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(T){Qs[T]=new Hl(T,0,!1,T,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(T){var N=T[0];Qs[N]=new Hl(N,1,!1,T[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(T){Qs[T]=new Hl(T,2,!1,T.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(T){Qs[T]=new Hl(T,2,!1,T,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(T){Qs[T]=new Hl(T,3,!1,T.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(T){Qs[T]=new Hl(T,3,!0,T,null,!1,!1)});["capture","download"].forEach(function(T){Qs[T]=new Hl(T,4,!1,T,null,!1,!1)});["cols","rows","size","span"].forEach(function(T){Qs[T]=new Hl(T,6,!1,T,null,!1,!1)});["rowSpan","start"].forEach(function(T){Qs[T]=new Hl(T,5,!1,T.toLowerCase(),null,!1,!1)});var Db=/[\-:]([a-z])/g;function Lb(T){return T[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(T){var N=T.replace(Db,Lb);Qs[N]=new Hl(N,1,!1,T,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(T){var N=T.replace(Db,Lb);Qs[N]=new Hl(N,1,!1,T,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(T){var N=T.replace(Db,Lb);Qs[N]=new Hl(N,1,!1,T,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(T){Qs[T]=new Hl(T,1,!1,T.toLowerCase(),null,!1,!1)});Qs.xlinkHref=new Hl("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(T){Qs[T]=new Hl(T,1,!1,T.toLowerCase(),null,!0,!0)});function Pb(T,N,V,Y){var X=Qs.hasOwnProperty(N)?Qs[N]:null;(X!==null?X.type!==0:Y||!(2F||X[R]!==J[F]){var e=` +`+X[R].replace(" at new "," at ");return T.displayName&&e.includes("")&&(e=e.replace("",T.displayName)),e}while(1<=R&&0<=F);break}}}finally{_x=!1,Error.prepareStackTrace=V}return(T=T?T.displayName||T.name:"")?sg(T):""}function pP(T){switch(T.tag){case 5:return sg(T.type);case 16:return sg("Lazy");case 13:return sg("Suspense");case 19:return sg("SuspenseList");case 0:case 2:case 15:return T=Ox(T.type,!1),T;case 11:return T=Ox(T.type.render,!1),T;case 1:return T=Ox(T.type,!0),T;default:return""}}function x2(T){if(T==null)return null;if(typeof T=="function")return T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case Pp:return"Fragment";case Lp:return"Portal";case g2:return"Profiler";case Nb:return"StrictMode";case m2:return"Suspense";case y2:return"SuspenseList"}if(typeof T=="object")switch(T.$$typeof){case JS:return(T.displayName||"Context")+".Consumer";case KS:return(T._context.displayName||"Context")+".Provider";case Rb:var N=T.render;return T=T.displayName,T||(T=N.displayName||N.name||"",T=T!==""?"ForwardRef("+T+")":"ForwardRef"),T;case Fb:return N=T.displayName||null,N!==null?N:x2(T.type)||"Memo";case pv:N=T._payload,T=T._init;try{return x2(T(N))}catch{}}return null}function gP(T){var N=T.type;switch(T.tag){case 24:return"Cache";case 9:return(N.displayName||"Context")+".Consumer";case 10:return(N._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return T=N.render,T=T.displayName||T.name||"",N.displayName||(T!==""?"ForwardRef("+T+")":"ForwardRef");case 7:return"Fragment";case 5:return N;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return x2(N);case 8:return N===Nb?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof N=="function")return N.displayName||N.name||null;if(typeof N=="string")return N}return null}function Fv(T){switch(typeof T){case"boolean":case"number":case"string":case"undefined":return T;case"object":return T;default:return""}}function qS(T){var N=T.type;return(T=T.nodeName)&&T.toLowerCase()==="input"&&(N==="checkbox"||N==="radio")}function mP(T){var N=qS(T)?"checked":"value",V=Object.getOwnPropertyDescriptor(T.constructor.prototype,N),Y=""+T[N];if(!T.hasOwnProperty(N)&&typeof V<"u"&&typeof V.get=="function"&&typeof V.set=="function"){var X=V.get,J=V.set;return Object.defineProperty(T,N,{configurable:!0,get:function(){return X.call(this)},set:function(R){Y=""+R,J.call(this,R)}}),Object.defineProperty(T,N,{enumerable:V.enumerable}),{getValue:function(){return Y},setValue:function(R){Y=""+R},stopTracking:function(){T._valueTracker=null,delete T[N]}}}}function Im(T){T._valueTracker||(T._valueTracker=mP(T))}function eE(T){if(!T)return!1;var N=T._valueTracker;if(!N)return!0;var V=N.getValue(),Y="";return T&&(Y=qS(T)?T.checked?"true":"false":T.value),T=Y,T!==V?(N.setValue(T),!0):!1}function Cy(T){if(T=T||(typeof document<"u"?document:void 0),typeof T>"u")return null;try{return T.activeElement||T.body}catch{return T.body}}function b2(T,N){var V=N.checked;return Zo({},N,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:V!=null?V:T._wrapperState.initialChecked})}function xA(T,N){var V=N.defaultValue==null?"":N.defaultValue,Y=N.checked!=null?N.checked:N.defaultChecked;V=Fv(N.value!=null?N.value:V),T._wrapperState={initialChecked:Y,initialValue:V,controlled:N.type==="checkbox"||N.type==="radio"?N.checked!=null:N.value!=null}}function tE(T,N){N=N.checked,N!=null&&Pb(T,"checked",N,!1)}function w2(T,N){tE(T,N);var V=Fv(N.value),Y=N.type;if(V!=null)Y==="number"?(V===0&&T.value===""||T.value!=V)&&(T.value=""+V):T.value!==""+V&&(T.value=""+V);else if(Y==="submit"||Y==="reset"){T.removeAttribute("value");return}N.hasOwnProperty("value")?A2(T,N.type,V):N.hasOwnProperty("defaultValue")&&A2(T,N.type,Fv(N.defaultValue)),N.checked==null&&N.defaultChecked!=null&&(T.defaultChecked=!!N.defaultChecked)}function bA(T,N,V){if(N.hasOwnProperty("value")||N.hasOwnProperty("defaultValue")){var Y=N.type;if(!(Y!=="submit"&&Y!=="reset"||N.value!==void 0&&N.value!==null))return;N=""+T._wrapperState.initialValue,V||N===T.value||(T.value=N),T.defaultValue=N}V=T.name,V!==""&&(T.name=""),T.defaultChecked=!!T._wrapperState.initialChecked,V!==""&&(T.name=V)}function A2(T,N,V){(N!=="number"||Cy(T.ownerDocument)!==T)&&(V==null?T.defaultValue=""+T._wrapperState.initialValue:T.defaultValue!==""+V&&(T.defaultValue=""+V))}var lg=Array.isArray;function Gp(T,N,V,Y){if(T=T.options,N){N={};for(var X=0;X"+N.valueOf().toString()+"",N=_m.firstChild;T.firstChild;)T.removeChild(T.firstChild);for(;N.firstChild;)T.appendChild(N.firstChild)}});function Tg(T,N){if(N){var V=T.firstChild;if(V&&V===T.lastChild&&V.nodeType===3){V.nodeValue=N;return}}T.textContent=N}var vg={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yP=["Webkit","ms","Moz","O"];Object.keys(vg).forEach(function(T){yP.forEach(function(N){N=N+T.charAt(0).toUpperCase()+T.substring(1),vg[N]=vg[T]})});function iE(T,N,V){return N==null||typeof N=="boolean"||N===""?"":V||typeof N!="number"||N===0||vg.hasOwnProperty(T)&&vg[T]?(""+N).trim():N+"px"}function oE(T,N){T=T.style;for(var V in N)if(N.hasOwnProperty(V)){var Y=V.indexOf("--")===0,X=iE(V,N[V],Y);V==="float"&&(V="cssFloat"),Y?T.setProperty(V,X):T[V]=X}}var xP=Zo({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function S2(T,N){if(N){if(xP[T]&&(N.children!=null||N.dangerouslySetInnerHTML!=null))throw Error(ga(137,T));if(N.dangerouslySetInnerHTML!=null){if(N.children!=null)throw Error(ga(60));if(typeof N.dangerouslySetInnerHTML!="object"||!("__html"in N.dangerouslySetInnerHTML))throw Error(ga(61))}if(N.style!=null&&typeof N.style!="object")throw Error(ga(62))}}function E2(T,N){if(T.indexOf("-")===-1)return typeof N.is=="string";switch(T){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var C2=null;function Ib(T){return T=T.target||T.srcElement||window,T.correspondingUseElement&&(T=T.correspondingUseElement),T.nodeType===3?T.parentNode:T}var D2=null,Wp=null,Yp=null;function TA(T){if(T=Xg(T)){if(typeof D2!="function")throw Error(ga(280));var N=T.stateNode;N&&(N=w1(N),D2(T.stateNode,T.type,N))}}function sE(T){Wp?Yp?Yp.push(T):Yp=[T]:Wp=T}function lE(){if(Wp){var T=Wp,N=Yp;if(Yp=Wp=null,TA(T),N)for(T=0;T>>=0,T===0?32:31-(PP(T)/NP|0)|0}var Om=64,zm=4194304;function ug(T){switch(T&-T){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return T&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return T&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return T}}function Ny(T,N){var V=T.pendingLanes;if(V===0)return 0;var Y=0,X=T.suspendedLanes,J=T.pingedLanes,R=V&268435455;if(R!==0){var F=R&~X;F!==0?Y=ug(F):(J&=R,J!==0&&(Y=ug(J)))}else R=V&~X,R!==0?Y=ug(R):J!==0&&(Y=ug(J));if(Y===0)return 0;if(N!==0&&N!==Y&&(N&X)===0&&(X=Y&-Y,J=N&-N,X>=J||X===16&&(J&4194240)!==0))return N;if((Y&4)!==0&&(Y|=V&16),N=T.entangledLanes,N!==0)for(T=T.entanglements,N&=Y;0V;V++)N.push(T);return N}function Yg(T,N,V){T.pendingLanes|=N,N!==536870912&&(T.suspendedLanes=0,T.pingedLanes=0),T=T.eventTimes,N=31-Wf(N),T[N]=V}function _P(T,N){var V=T.pendingLanes&~N;T.pendingLanes=N,T.suspendedLanes=0,T.pingedLanes=0,T.expiredLanes&=N,T.mutableReadLanes&=N,T.entangledLanes&=N,N=T.entanglements;var Y=T.eventTimes;for(T=T.expirationTimes;0=pg),RA=String.fromCharCode(32),FA=!1;function DE(T,N){switch(T){case"keyup":return uN.indexOf(N.keyCode)!==-1;case"keydown":return N.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function LE(T){return T=T.detail,typeof T=="object"&&"data"in T?T.data:null}var Np=!1;function cN(T,N){switch(T){case"compositionend":return LE(N);case"keypress":return N.which!==32?null:(FA=!0,RA);case"textInput":return T=N.data,T===RA&&FA?null:T;default:return null}}function hN(T,N){if(Np)return T==="compositionend"||!Vb&&DE(T,N)?(T=EE(),my=Bb=wv=null,Np=!1,T):null;switch(T){case"paste":return null;case"keypress":if(!(N.ctrlKey||N.altKey||N.metaKey)||N.ctrlKey&&N.altKey){if(N.char&&1=N)return{node:V,offset:N-T};T=Y}e:{for(;V;){if(V.nextSibling){V=V.nextSibling;break e}V=V.parentNode}V=void 0}V=zA(V)}}function FE(T,N){return T&&N?T===N?!0:T&&T.nodeType===3?!1:N&&N.nodeType===3?FE(T,N.parentNode):"contains"in T?T.contains(N):T.compareDocumentPosition?!!(T.compareDocumentPosition(N)&16):!1:!1}function IE(){for(var T=window,N=Cy();N instanceof T.HTMLIFrameElement;){try{var V=typeof N.contentWindow.location.href=="string"}catch{V=!1}if(V)T=N.contentWindow;else break;N=Cy(T.document)}return N}function Gb(T){var N=T&&T.nodeName&&T.nodeName.toLowerCase();return N&&(N==="input"&&(T.type==="text"||T.type==="search"||T.type==="tel"||T.type==="url"||T.type==="password")||N==="textarea"||T.contentEditable==="true")}function wN(T){var N=IE(),V=T.focusedElem,Y=T.selectionRange;if(N!==V&&V&&V.ownerDocument&&FE(V.ownerDocument.documentElement,V)){if(Y!==null&&Gb(V)){if(N=Y.start,T=Y.end,T===void 0&&(T=N),"selectionStart"in V)V.selectionStart=N,V.selectionEnd=Math.min(T,V.value.length);else if(T=(N=V.ownerDocument||document)&&N.defaultView||window,T.getSelection){T=T.getSelection();var X=V.textContent.length,J=Math.min(Y.start,X);Y=Y.end===void 0?J:Math.min(Y.end,X),!T.extend&&J>Y&&(X=Y,Y=J,J=X),X=kA(V,J);var R=kA(V,Y);X&&R&&(T.rangeCount!==1||T.anchorNode!==X.node||T.anchorOffset!==X.offset||T.focusNode!==R.node||T.focusOffset!==R.offset)&&(N=N.createRange(),N.setStart(X.node,X.offset),T.removeAllRanges(),J>Y?(T.addRange(N),T.extend(R.node,R.offset)):(N.setEnd(R.node,R.offset),T.addRange(N)))}}for(N=[],T=V;T=T.parentNode;)T.nodeType===1&&N.push({element:T,left:T.scrollLeft,top:T.scrollTop});for(typeof V.focus=="function"&&V.focus(),V=0;V=document.documentMode,Rp=null,I2=null,mg=null,_2=!1;function BA(T,N,V){var Y=V.window===V?V.document:V.nodeType===9?V:V.ownerDocument;_2||Rp==null||Rp!==Cy(Y)||(Y=Rp,"selectionStart"in Y&&Gb(Y)?Y={start:Y.selectionStart,end:Y.selectionEnd}:(Y=(Y.ownerDocument&&Y.ownerDocument.defaultView||window).getSelection(),Y={anchorNode:Y.anchorNode,anchorOffset:Y.anchorOffset,focusNode:Y.focusNode,focusOffset:Y.focusOffset}),mg&&Lg(mg,Y)||(mg=Y,Y=Iy(I2,"onSelect"),0_p||(T.current=H2[_p],H2[_p]=null,_p--)}function bo(T,N){_p++,H2[_p]=T.current,T.current=N}var Iv={},yl=Bv(Iv),iu=Bv(!1),Fd=Iv;function qp(T,N){var V=T.type.contextTypes;if(!V)return Iv;var Y=T.stateNode;if(Y&&Y.__reactInternalMemoizedUnmaskedChildContext===N)return Y.__reactInternalMemoizedMaskedChildContext;var X={},J;for(J in V)X[J]=N[J];return Y&&(T=T.stateNode,T.__reactInternalMemoizedUnmaskedChildContext=N,T.__reactInternalMemoizedMaskedChildContext=X),X}function ou(T){return T=T.childContextTypes,T!=null}function Oy(){Lo(iu),Lo(yl)}function ZA(T,N,V){if(yl.current!==Iv)throw Error(ga(168));bo(yl,N),bo(iu,V)}function GE(T,N,V){var Y=T.stateNode;if(N=N.childContextTypes,typeof Y.getChildContext!="function")return V;Y=Y.getChildContext();for(var X in Y)if(!(X in N))throw Error(ga(108,gP(T)||"Unknown",X));return Zo({},V,Y)}function zy(T){return T=(T=T.stateNode)&&T.__reactInternalMemoizedMergedChildContext||Iv,Fd=yl.current,bo(yl,T),bo(iu,iu.current),!0}function XA(T,N,V){var Y=T.stateNode;if(!Y)throw Error(ga(169));V?(T=GE(T,N,Fd),Y.__reactInternalMemoizedMergedChildContext=T,Lo(iu),Lo(yl),bo(yl,T)):Lo(iu),bo(iu,V)}var yh=null,A1=!1,Kx=!1;function WE(T){yh===null?yh=[T]:yh.push(T)}function FN(T){A1=!0,WE(T)}function Uv(){if(!Kx&&yh!==null){Kx=!0;var T=0,N=so;try{var V=yh;for(so=1;T>=R,X-=R,bh=1<<32-Wf(N)+X|V<g?(A=b,b=null):A=b.sibling;var v=y(n,b,a[g],o);if(v===null){b===null&&(b=A);break}T&&b&&v.alternate===null&&N(n,b),u=J(v,u,g),s===null?c=v:s.sibling=v,s=v,b=A}if(g===a.length)return V(n,b),Io&&Md(n,g),c;if(b===null){for(;gg?(A=b,b=null):A=b.sibling;var h=y(n,b,v.value,o);if(h===null){b===null&&(b=A);break}T&&b&&h.alternate===null&&N(n,b),u=J(h,u,g),s===null?c=h:s.sibling=h,s=h,b=A}if(v.done)return V(n,b),Io&&Md(n,g),c;if(b===null){for(;!v.done;g++,v=a.next())v=t(n,v.value,o),v!==null&&(u=J(v,u,g),s===null?c=v:s.sibling=v,s=v);return Io&&Md(n,g),c}for(b=Y(n,b);!v.done;g++,v=a.next())v=p(b,n,g,v.value,o),v!==null&&(T&&v.alternate!==null&&b.delete(v.key===null?g:v.key),u=J(v,u,g),s===null?c=v:s.sibling=v,s=v);return T&&b.forEach(function(x){return N(n,x)}),Io&&Md(n,g),c}function r(n,u,a,o){if(typeof a=="object"&&a!==null&&a.type===Pp&&a.key===null&&(a=a.props.children),typeof a=="object"&&a!==null){switch(a.$$typeof){case Fm:e:{for(var c=a.key,s=u;s!==null;){if(s.key===c){if(c=a.type,c===Pp){if(s.tag===7){V(n,s.sibling),u=X(s,a.props.children),u.return=n,n=u;break e}}else if(s.elementType===c||typeof c=="object"&&c!==null&&c.$$typeof===pv&&eT(c)===s.type){V(n,s.sibling),u=X(s,a.props),u.ref=ng(n,s,a),u.return=n,n=u;break e}V(n,s);break}else N(n,s);s=s.sibling}a.type===Pp?(u=Nd(a.props.children,n.mode,o,a.key),u.return=n,n=u):(o=Sy(a.type,a.key,a.props,null,n.mode,o),o.ref=ng(n,u,a),o.return=n,n=o)}return R(n);case Lp:e:{for(s=a.key;u!==null;){if(u.key===s)if(u.tag===4&&u.stateNode.containerInfo===a.containerInfo&&u.stateNode.implementation===a.implementation){V(n,u.sibling),u=X(u,a.children||[]),u.return=n,n=u;break e}else{V(n,u);break}else N(n,u);u=u.sibling}u=a2(a,n.mode,o),u.return=n,n=u}return R(n);case pv:return s=a._init,r(n,u,s(a._payload),o)}if(lg(a))return l(n,u,a,o);if(Q0(a))return d(n,u,a,o);Wm(n,a)}return typeof a=="string"&&a!==""||typeof a=="number"?(a=""+a,u!==null&&u.tag===6?(V(n,u.sibling),u=X(u,a),u.return=n,n=u):(V(n,u),u=n2(a,n.mode,o),u.return=n,n=u),R(n)):V(n,u)}return r}var t0=QE(!0),qE=QE(!1),jg={},Dc=Bv(jg),Fg=Bv(jg),Ig=Bv(jg);function Dd(T){if(T===jg)throw Error(ga(174));return T}function Qb(T,N){switch(bo(Ig,N),bo(Fg,T),bo(Dc,jg),T=N.nodeType,T){case 9:case 11:N=(N=N.documentElement)?N.namespaceURI:M2(null,"");break;default:T=T===8?N.parentNode:N,N=T.namespaceURI||null,T=T.tagName,N=M2(N,T)}Lo(Dc),bo(Dc,N)}function r0(){Lo(Dc),Lo(Fg),Lo(Ig)}function e6(T){Dd(Ig.current);var N=Dd(Dc.current),V=M2(N,T.type);N!==V&&(bo(Fg,T),bo(Dc,V))}function qb(T){Fg.current===T&&(Lo(Dc),Lo(Fg))}var Wo=Bv(0);function Gy(T){for(var N=T;N!==null;){if(N.tag===13){var V=N.memoizedState;if(V!==null&&(V=V.dehydrated,V===null||V.data==="$?"||V.data==="$!"))return N}else if(N.tag===19&&N.memoizedProps.revealOrder!==void 0){if((N.flags&128)!==0)return N}else if(N.child!==null){N.child.return=N,N=N.child;continue}if(N===T)break;for(;N.sibling===null;){if(N.return===null||N.return===T)return null;N=N.return}N.sibling.return=N.return,N=N.sibling}return null}var Jx=[];function e3(){for(var T=0;TV?V:4,T(!0);var Y=Qx.transition;Qx.transition={};try{T(!1),N()}finally{so=V,Qx.transition=Y}}function g6(){return sf().memoizedState}function zN(T,N,V){var Y=Nv(T);if(V={lane:Y,action:V,hasEagerState:!1,eagerState:null,next:null},m6(T))y6(N,V);else if(V=jE(T,N,V,Y),V!==null){var X=kl();Yf(V,T,Y,X),x6(V,N,Y)}}function kN(T,N,V){var Y=Nv(T),X={lane:Y,action:V,hasEagerState:!1,eagerState:null,next:null};if(m6(T))y6(N,X);else{var J=T.alternate;if(T.lanes===0&&(J===null||J.lanes===0)&&(J=N.lastRenderedReducer,J!==null))try{var R=N.lastRenderedState,F=J(R,V);if(X.hasEagerState=!0,X.eagerState=F,jf(F,R)){var e=N.interleaved;e===null?(X.next=X,Kb(N)):(X.next=e.next,e.next=X),N.interleaved=X;return}}catch{}finally{}V=jE(T,N,X,Y),V!==null&&(X=kl(),Yf(V,T,Y,X),x6(V,N,Y))}}function m6(T){var N=T.alternate;return T===Yo||N!==null&&N===Yo}function y6(T,N){yg=Wy=!0;var V=T.pending;V===null?N.next=N:(N.next=V.next,V.next=N),T.pending=N}function x6(T,N,V){if((V&4194240)!==0){var Y=N.lanes;Y&=T.pendingLanes,V|=Y,N.lanes=V,Ob(T,V)}}var Yy={readContext:of,useCallback:vl,useContext:vl,useEffect:vl,useImperativeHandle:vl,useInsertionEffect:vl,useLayoutEffect:vl,useMemo:vl,useReducer:vl,useRef:vl,useState:vl,useDebugValue:vl,useDeferredValue:vl,useTransition:vl,useMutableSource:vl,useSyncExternalStore:vl,useId:vl,unstable_isNewReconciler:!1},BN={readContext:of,useCallback:function(T,N){return Sc().memoizedState=[T,N===void 0?null:N],T},useContext:of,useEffect:rT,useImperativeHandle:function(T,N,V){return V=V!=null?V.concat([T]):null,wy(4194308,4,c6.bind(null,N,T),V)},useLayoutEffect:function(T,N){return wy(4194308,4,T,N)},useInsertionEffect:function(T,N){return wy(4,2,T,N)},useMemo:function(T,N){var V=Sc();return N=N===void 0?null:N,T=T(),V.memoizedState=[T,N],T},useReducer:function(T,N,V){var Y=Sc();return N=V!==void 0?V(N):N,Y.memoizedState=Y.baseState=N,T={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:T,lastRenderedState:N},Y.queue=T,T=T.dispatch=zN.bind(null,Yo,T),[Y.memoizedState,T]},useRef:function(T){var N=Sc();return T={current:T},N.memoizedState=T},useState:tT,useDebugValue:i3,useDeferredValue:function(T){return Sc().memoizedState=T},useTransition:function(){var T=tT(!1),N=T[0];return T=ON.bind(null,T[1]),Sc().memoizedState=T,[N,T]},useMutableSource:function(){},useSyncExternalStore:function(T,N,V){var Y=Yo,X=Sc();if(Io){if(V===void 0)throw Error(ga(407));V=V()}else{if(V=N(),Os===null)throw Error(ga(349));(_d&30)!==0||n6(Y,N,V)}X.memoizedState=V;var J={value:V,getSnapshot:N};return X.queue=J,rT(i6.bind(null,Y,J,T),[T]),Y.flags|=2048,zg(9,a6.bind(null,Y,J,V,N),void 0,null),V},useId:function(){var T=Sc(),N=Os.identifierPrefix;if(Io){var V=wh,Y=bh;V=(Y&~(1<<32-Wf(Y)-1)).toString(32)+V,N=":"+N+"R"+V,V=_g++,0<\/script>",T=T.removeChild(T.firstChild)):typeof Y.is=="string"?T=R.createElement(V,{is:Y.is}):(T=R.createElement(V),V==="select"&&(R=T,Y.multiple?R.multiple=!0:Y.size&&(R.size=Y.size))):T=R.createElementNS(T,V),T[Ec]=N,T[Rg]=Y,D6(T,N,!1,!1),N.stateNode=T;e:{switch(R=E2(V,Y),V){case"dialog":Do("cancel",T),Do("close",T),X=Y;break;case"iframe":case"object":case"embed":Do("load",T),X=Y;break;case"video":case"audio":for(X=0;Xa0&&(N.flags|=128,Y=!0,ag(J,!1),N.lanes=4194304)}else{if(!Y)if(T=Gy(R),T!==null){if(N.flags|=128,Y=!0,V=T.updateQueue,V!==null&&(N.updateQueue=V,N.flags|=4),ag(J,!0),J.tail===null&&J.tailMode==="hidden"&&!R.alternate&&!Io)return dl(N),null}else 2*os()-J.renderingStartTime>a0&&V!==1073741824&&(N.flags|=128,Y=!0,ag(J,!1),N.lanes=4194304);J.isBackwards?(R.sibling=N.child,N.child=R):(V=J.last,V!==null?V.sibling=R:N.child=R,J.last=R)}return J.tail!==null?(N=J.tail,J.rendering=N,J.tail=N.sibling,J.renderingStartTime=os(),N.sibling=null,V=Wo.current,bo(Wo,Y?V&1|2:V&1),N):(dl(N),null);case 22:case 23:return c3(),Y=N.memoizedState!==null,T!==null&&T.memoizedState!==null!==Y&&(N.flags|=8192),Y&&(N.mode&1)!==0?(Mu&1073741824)!==0&&(dl(N),N.subtreeFlags&6&&(N.flags|=8192)):dl(N),null;case 24:return null;case 25:return null}throw Error(ga(156,N.tag))}function XN(T,N){switch(Yb(N),N.tag){case 1:return ou(N.type)&&Oy(),T=N.flags,T&65536?(N.flags=T&-65537|128,N):null;case 3:return r0(),Lo(iu),Lo(yl),e3(),T=N.flags,(T&65536)!==0&&(T&128)===0?(N.flags=T&-65537|128,N):null;case 5:return qb(N),null;case 13:if(Lo(Wo),T=N.memoizedState,T!==null&&T.dehydrated!==null){if(N.alternate===null)throw Error(ga(340));e0()}return T=N.flags,T&65536?(N.flags=T&-65537|128,N):null;case 19:return Lo(Wo),null;case 4:return r0(),null;case 10:return $b(N.type._context),null;case 22:case 23:return c3(),null;case 24:return null;default:return null}}var Zm=!1,pl=!1,jN=typeof WeakSet=="function"?WeakSet:Set,Ba=null;function Bp(T,N){var V=T.ref;if(V!==null)if(typeof V=="function")try{V(null)}catch(Y){Jo(T,N,Y)}else V.current=null}function q2(T,N,V){try{V()}catch(Y){Jo(T,N,Y)}}var cT=!1;function $N(T,N){if(O2=Ry,T=IE(),Gb(T)){if("selectionStart"in T)var V={start:T.selectionStart,end:T.selectionEnd};else e:{V=(V=T.ownerDocument)&&V.defaultView||window;var Y=V.getSelection&&V.getSelection();if(Y&&Y.rangeCount!==0){V=Y.anchorNode;var X=Y.anchorOffset,J=Y.focusNode;Y=Y.focusOffset;try{V.nodeType,J.nodeType}catch{V=null;break e}var R=0,F=-1,e=-1,i=0,m=0,t=T,y=null;t:for(;;){for(var p;t!==V||X!==0&&t.nodeType!==3||(F=R+X),t!==J||Y!==0&&t.nodeType!==3||(e=R+Y),t.nodeType===3&&(R+=t.nodeValue.length),(p=t.firstChild)!==null;)y=t,t=p;for(;;){if(t===T)break t;if(y===V&&++i===X&&(F=R),y===J&&++m===Y&&(e=R),(p=t.nextSibling)!==null)break;t=y,y=t.parentNode}t=p}V=F===-1||e===-1?null:{start:F,end:e}}else V=null}V=V||{start:0,end:0}}else V=null;for(z2={focusedElem:T,selectionRange:V},Ry=!1,Ba=N;Ba!==null;)if(N=Ba,T=N.child,(N.subtreeFlags&1028)!==0&&T!==null)T.return=N,Ba=T;else for(;Ba!==null;){N=Ba;try{var l=N.alternate;if((N.flags&1024)!==0)switch(N.tag){case 0:case 11:case 15:break;case 1:if(l!==null){var d=l.memoizedProps,r=l.memoizedState,n=N.stateNode,u=n.getSnapshotBeforeUpdate(N.elementType===N.type?d:Bf(N.type,d),r);n.__reactInternalSnapshotBeforeUpdate=u}break;case 3:var a=N.stateNode.containerInfo;a.nodeType===1?a.textContent="":a.nodeType===9&&a.documentElement&&a.removeChild(a.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ga(163))}}catch(o){Jo(N,N.return,o)}if(T=N.sibling,T!==null){T.return=N.return,Ba=T;break}Ba=N.return}return l=cT,cT=!1,l}function xg(T,N,V){var Y=N.updateQueue;if(Y=Y!==null?Y.lastEffect:null,Y!==null){var X=Y=Y.next;do{if((X.tag&T)===T){var J=X.destroy;X.destroy=void 0,J!==void 0&&q2(N,V,J)}X=X.next}while(X!==Y)}}function S1(T,N){if(N=N.updateQueue,N=N!==null?N.lastEffect:null,N!==null){var V=N=N.next;do{if((V.tag&T)===T){var Y=V.create;V.destroy=Y()}V=V.next}while(V!==N)}}function eb(T){var N=T.ref;if(N!==null){var V=T.stateNode;switch(T.tag){case 5:T=V;break;default:T=V}typeof N=="function"?N(T):N.current=T}}function N6(T){var N=T.alternate;N!==null&&(T.alternate=null,N6(N)),T.child=null,T.deletions=null,T.sibling=null,T.tag===5&&(N=T.stateNode,N!==null&&(delete N[Ec],delete N[Rg],delete N[U2],delete N[NN],delete N[RN])),T.stateNode=null,T.return=null,T.dependencies=null,T.memoizedProps=null,T.memoizedState=null,T.pendingProps=null,T.stateNode=null,T.updateQueue=null}function R6(T){return T.tag===5||T.tag===3||T.tag===4}function hT(T){e:for(;;){for(;T.sibling===null;){if(T.return===null||R6(T.return))return null;T=T.return}for(T.sibling.return=T.return,T=T.sibling;T.tag!==5&&T.tag!==6&&T.tag!==18;){if(T.flags&2||T.child===null||T.tag===4)continue e;T.child.return=T,T=T.child}if(!(T.flags&2))return T.stateNode}}function tb(T,N,V){var Y=T.tag;if(Y===5||Y===6)T=T.stateNode,N?V.nodeType===8?V.parentNode.insertBefore(T,N):V.insertBefore(T,N):(V.nodeType===8?(N=V.parentNode,N.insertBefore(T,V)):(N=V,N.appendChild(T)),V=V._reactRootContainer,V!=null||N.onclick!==null||(N.onclick=_y));else if(Y!==4&&(T=T.child,T!==null))for(tb(T,N,V),T=T.sibling;T!==null;)tb(T,N,V),T=T.sibling}function rb(T,N,V){var Y=T.tag;if(Y===5||Y===6)T=T.stateNode,N?V.insertBefore(T,N):V.appendChild(T);else if(Y!==4&&(T=T.child,T!==null))for(rb(T,N,V),T=T.sibling;T!==null;)rb(T,N,V),T=T.sibling}var js=null,Uf=!1;function dv(T,N,V){for(V=V.child;V!==null;)F6(T,N,V),V=V.sibling}function F6(T,N,V){if(Cc&&typeof Cc.onCommitFiberUnmount=="function")try{Cc.onCommitFiberUnmount(m1,V)}catch{}switch(V.tag){case 5:pl||Bp(V,N);case 6:var Y=js,X=Uf;js=null,dv(T,N,V),js=Y,Uf=X,js!==null&&(Uf?(T=js,V=V.stateNode,T.nodeType===8?T.parentNode.removeChild(V):T.removeChild(V)):js.removeChild(V.stateNode));break;case 18:js!==null&&(Uf?(T=js,V=V.stateNode,T.nodeType===8?$x(T.parentNode,V):T.nodeType===1&&$x(T,V),Cg(T)):$x(js,V.stateNode));break;case 4:Y=js,X=Uf,js=V.stateNode.containerInfo,Uf=!0,dv(T,N,V),js=Y,Uf=X;break;case 0:case 11:case 14:case 15:if(!pl&&(Y=V.updateQueue,Y!==null&&(Y=Y.lastEffect,Y!==null))){X=Y=Y.next;do{var J=X,R=J.destroy;J=J.tag,R!==void 0&&((J&2)!==0||(J&4)!==0)&&q2(V,N,R),X=X.next}while(X!==Y)}dv(T,N,V);break;case 1:if(!pl&&(Bp(V,N),Y=V.stateNode,typeof Y.componentWillUnmount=="function"))try{Y.props=V.memoizedProps,Y.state=V.memoizedState,Y.componentWillUnmount()}catch(F){Jo(V,N,F)}dv(T,N,V);break;case 21:dv(T,N,V);break;case 22:V.mode&1?(pl=(Y=pl)||V.memoizedState!==null,dv(T,N,V),pl=Y):dv(T,N,V);break;default:dv(T,N,V)}}function vT(T){var N=T.updateQueue;if(N!==null){T.updateQueue=null;var V=T.stateNode;V===null&&(V=T.stateNode=new jN),N.forEach(function(Y){var X=aR.bind(null,T,Y);V.has(Y)||(V.add(Y),Y.then(X,X))})}}function zf(T,N){var V=N.deletions;if(V!==null)for(var Y=0;YX&&(X=R),Y&=~J}if(Y=X,Y=os()-Y,Y=(120>Y?120:480>Y?480:1080>Y?1080:1920>Y?1920:3e3>Y?3e3:4320>Y?4320:1960*JN(Y/1960))-Y,10T?16:T,Av===null)var Y=!1;else{if(T=Av,Av=null,jy=0,(Xi&6)!==0)throw Error(ga(331));var X=Xi;for(Xi|=4,Ba=T.current;Ba!==null;){var J=Ba,R=J.child;if((Ba.flags&16)!==0){var F=J.deletions;if(F!==null){for(var e=0;eos()-u3?Pd(T,0):l3|=V),su(T,N)}function H6(T,N){N===0&&((T.mode&1)===0?N=1:(N=zm,zm<<=1,(zm&130023424)===0&&(zm=4194304)));var V=kl();T=Lh(T,N),T!==null&&(Yg(T,N,V),su(T,V))}function nR(T){var N=T.memoizedState,V=0;N!==null&&(V=N.retryLane),H6(T,V)}function aR(T,N){var V=0;switch(T.tag){case 13:var Y=T.stateNode,X=T.memoizedState;X!==null&&(V=X.retryLane);break;case 19:Y=T.stateNode;break;default:throw Error(ga(314))}Y!==null&&Y.delete(N),H6(T,V)}var V6;V6=function(T,N,V){if(T!==null)if(T.memoizedProps!==N.pendingProps||iu.current)au=!0;else{if((T.lanes&V)===0&&(N.flags&128)===0)return au=!1,YN(T,N,V);au=(T.flags&131072)!==0}else au=!1,Io&&(N.flags&1048576)!==0&&YE(N,By,N.index);switch(N.lanes=0,N.tag){case 2:var Y=N.type;Ay(T,N),T=N.pendingProps;var X=qp(N,yl.current);Xp(N,V),X=r3(null,N,Y,T,X,V);var J=n3();return N.flags|=1,typeof X=="object"&&X!==null&&typeof X.render=="function"&&X.$$typeof===void 0?(N.tag=1,N.memoizedState=null,N.updateQueue=null,ou(Y)?(J=!0,zy(N)):J=!1,N.memoizedState=X.state!==null&&X.state!==void 0?X.state:null,Jb(N),X.updater=T1,N.stateNode=X,X._reactInternals=N,Z2(N,Y,T,V),N=$2(null,N,Y,!0,J,V)):(N.tag=0,Io&&J&&Wb(N),Ol(null,N,X,V),N=N.child),N;case 16:Y=N.elementType;e:{switch(Ay(T,N),T=N.pendingProps,X=Y._init,Y=X(Y._payload),N.type=Y,X=N.tag=oR(Y),T=Bf(Y,T),X){case 0:N=j2(null,N,Y,T,V);break e;case 1:N=lT(null,N,Y,T,V);break e;case 11:N=oT(null,N,Y,T,V);break e;case 14:N=sT(null,N,Y,Bf(Y.type,T),V);break e}throw Error(ga(306,Y,""))}return N;case 0:return Y=N.type,X=N.pendingProps,X=N.elementType===Y?X:Bf(Y,X),j2(T,N,Y,X,V);case 1:return Y=N.type,X=N.pendingProps,X=N.elementType===Y?X:Bf(Y,X),lT(T,N,Y,X,V);case 3:e:{if(S6(N),T===null)throw Error(ga(387));Y=N.pendingProps,J=N.memoizedState,X=J.element,$E(T,N),Vy(N,Y,null,V);var R=N.memoizedState;if(Y=R.element,J.isDehydrated)if(J={element:Y,isDehydrated:!1,cache:R.cache,pendingSuspenseBoundaries:R.pendingSuspenseBoundaries,transitions:R.transitions},N.updateQueue.baseState=J,N.memoizedState=J,N.flags&256){X=n0(Error(ga(423)),N),N=uT(T,N,Y,V,X);break e}else if(Y!==X){X=n0(Error(ga(424)),N),N=uT(T,N,Y,V,X);break e}else for(Su=Dv(N.stateNode.containerInfo.firstChild),Eu=N,Io=!0,Hf=null,V=qE(N,null,Y,V),N.child=V;V;)V.flags=V.flags&-3|4096,V=V.sibling;else{if(e0(),Y===X){N=Ph(T,N,V);break e}Ol(T,N,Y,V)}N=N.child}return N;case 5:return e6(N),T===null&&G2(N),Y=N.type,X=N.pendingProps,J=T!==null?T.memoizedProps:null,R=X.children,k2(Y,X)?R=null:J!==null&&k2(Y,J)&&(N.flags|=32),M6(T,N),Ol(T,N,R,V),N.child;case 6:return T===null&&G2(N),null;case 13:return E6(T,N,V);case 4:return Qb(N,N.stateNode.containerInfo),Y=N.pendingProps,T===null?N.child=t0(N,null,Y,V):Ol(T,N,Y,V),N.child;case 11:return Y=N.type,X=N.pendingProps,X=N.elementType===Y?X:Bf(Y,X),oT(T,N,Y,X,V);case 7:return Ol(T,N,N.pendingProps,V),N.child;case 8:return Ol(T,N,N.pendingProps.children,V),N.child;case 12:return Ol(T,N,N.pendingProps.children,V),N.child;case 10:e:{if(Y=N.type._context,X=N.pendingProps,J=N.memoizedProps,R=X.value,bo(Uy,Y._currentValue),Y._currentValue=R,J!==null)if(jf(J.value,R)){if(J.children===X.children&&!iu.current){N=Ph(T,N,V);break e}}else for(J=N.child,J!==null&&(J.return=N);J!==null;){var F=J.dependencies;if(F!==null){R=J.child;for(var e=F.firstContext;e!==null;){if(e.context===Y){if(J.tag===1){e=Mh(-1,V&-V),e.tag=2;var i=J.updateQueue;if(i!==null){i=i.shared;var m=i.pending;m===null?e.next=e:(e.next=m.next,m.next=e),i.pending=e}}J.lanes|=V,e=J.alternate,e!==null&&(e.lanes|=V),W2(J.return,V,N),F.lanes|=V;break}e=e.next}}else if(J.tag===10)R=J.type===N.type?null:J.child;else if(J.tag===18){if(R=J.return,R===null)throw Error(ga(341));R.lanes|=V,F=R.alternate,F!==null&&(F.lanes|=V),W2(R,V,N),R=J.sibling}else R=J.child;if(R!==null)R.return=J;else for(R=J;R!==null;){if(R===N){R=null;break}if(J=R.sibling,J!==null){J.return=R.return,R=J;break}R=R.return}J=R}Ol(T,N,X.children,V),N=N.child}return N;case 9:return X=N.type,Y=N.pendingProps.children,Xp(N,V),X=of(X),Y=Y(X),N.flags|=1,Ol(T,N,Y,V),N.child;case 14:return Y=N.type,X=Bf(Y,N.pendingProps),X=Bf(Y.type,X),sT(T,N,Y,X,V);case 15:return A6(T,N,N.type,N.pendingProps,V);case 17:return Y=N.type,X=N.pendingProps,X=N.elementType===Y?X:Bf(Y,X),Ay(T,N),N.tag=1,ou(Y)?(T=!0,zy(N)):T=!1,Xp(N,V),JE(N,Y,X),Z2(N,Y,X,V),$2(null,N,Y,!0,T,V);case 19:return C6(T,N,V);case 22:return T6(T,N,V)}throw Error(ga(156,N.tag))};function G6(T,N){return pE(T,N)}function iR(T,N,V,Y){this.tag=T,this.key=V,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=N,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=Y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rf(T,N,V,Y){return new iR(T,N,V,Y)}function v3(T){return T=T.prototype,!(!T||!T.isReactComponent)}function oR(T){if(typeof T=="function")return v3(T)?1:0;if(T!=null){if(T=T.$$typeof,T===Rb)return 11;if(T===Fb)return 14}return 2}function Rv(T,N){var V=T.alternate;return V===null?(V=rf(T.tag,N,T.key,T.mode),V.elementType=T.elementType,V.type=T.type,V.stateNode=T.stateNode,V.alternate=T,T.alternate=V):(V.pendingProps=N,V.type=T.type,V.flags=0,V.subtreeFlags=0,V.deletions=null),V.flags=T.flags&14680064,V.childLanes=T.childLanes,V.lanes=T.lanes,V.child=T.child,V.memoizedProps=T.memoizedProps,V.memoizedState=T.memoizedState,V.updateQueue=T.updateQueue,N=T.dependencies,V.dependencies=N===null?null:{lanes:N.lanes,firstContext:N.firstContext},V.sibling=T.sibling,V.index=T.index,V.ref=T.ref,V}function Sy(T,N,V,Y,X,J){var R=2;if(Y=T,typeof T=="function")v3(T)&&(R=1);else if(typeof T=="string")R=5;else e:switch(T){case Pp:return Nd(V.children,X,J,N);case Nb:R=8,X|=8;break;case g2:return T=rf(12,V,N,X|2),T.elementType=g2,T.lanes=J,T;case m2:return T=rf(13,V,N,X),T.elementType=m2,T.lanes=J,T;case y2:return T=rf(19,V,N,X),T.elementType=y2,T.lanes=J,T;case QS:return C1(V,X,J,N);default:if(typeof T=="object"&&T!==null)switch(T.$$typeof){case KS:R=10;break e;case JS:R=9;break e;case Rb:R=11;break e;case Fb:R=14;break e;case pv:R=16,Y=null;break e}throw Error(ga(130,T==null?T:typeof T,""))}return N=rf(R,V,N,X),N.elementType=T,N.type=Y,N.lanes=J,N}function Nd(T,N,V,Y){return T=rf(7,T,Y,N),T.lanes=V,T}function C1(T,N,V,Y){return T=rf(22,T,Y,N),T.elementType=QS,T.lanes=V,T.stateNode={isHidden:!1},T}function n2(T,N,V){return T=rf(6,T,null,N),T.lanes=V,T}function a2(T,N,V){return N=rf(4,T.children!==null?T.children:[],T.key,N),N.lanes=V,N.stateNode={containerInfo:T.containerInfo,pendingChildren:null,implementation:T.implementation},N}function sR(T,N,V,Y,X){this.tag=N,this.containerInfo=T,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=kx(0),this.expirationTimes=kx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kx(0),this.identifierPrefix=Y,this.onRecoverableError=X,this.mutableSourceEagerHydrationData=null}function d3(T,N,V,Y,X,J,R,F,e){return T=new sR(T,N,V,F,e),N===1?(N=1,J===!0&&(N|=8)):N=0,J=rf(3,null,null,N),T.current=J,J.stateNode=T,J.memoizedState={element:Y,isDehydrated:V,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jb(J),T}function lR(T,N,V){var Y=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(N)}catch(V){console.error(V)}}N(),T.exports=Lu})(kS);var wT=kS.exports;d2.createRoot=wT.createRoot,d2.hydrateRoot=wT.hydrateRoot;var y3={exports:{}},R1={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var vR=nf.exports,dR=Symbol.for("react.element"),pR=Symbol.for("react.fragment"),gR=Object.prototype.hasOwnProperty,mR=vR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,yR={key:!0,ref:!0,__self:!0,__source:!0};function X6(T,N,V){var Y,X={},J=null,R=null;V!==void 0&&(J=""+V),N.key!==void 0&&(J=""+N.key),N.ref!==void 0&&(R=N.ref);for(Y in N)gR.call(N,Y)&&!yR.hasOwnProperty(Y)&&(X[Y]=N[Y]);if(T&&T.defaultProps)for(Y in N=T.defaultProps,N)X[Y]===void 0&&(X[Y]=N[Y]);return{$$typeof:dR,type:T,key:J,ref:R,props:X,_owner:mR.current}}R1.Fragment=pR;R1.jsx=X6;R1.jsxs=X6;(function(T){T.exports=R1})(y3);const ni=y3.exports.jsx,Qo=y3.exports.jsxs,xR=()=>Qo("header",{className:"bg-asm_dgreen text-asm_white",children:[Qo("div",{className:"ast-header-container my-0 mx-auto flex flex-wrap py-2 sm:w-full sm:flex-nowrap",children:[ni("h1",{className:"my-0 mx-auto w-full text-center text-4xl sm:ml-1 sm:w-3/4 sm:grow sm:text-left",children:"ASpaceTech"}),Qo("div",{className:"ast-sm-container flex w-full justify-evenly sm:w-1/4 sm:max-w-xs",children:[ni("div",{className:"ast-sm-icon m-auto text-center",children:Qo("a",{href:"https://www.youtube.com/channel/UC7S64e02bYzFT01JlYj0g3g",target:"_blank",rel:"noreferrer",children:[ni("span",{className:"fa-brands fa-youtube","aria-hidden":"true"}),ni("span",{className:"sr-only",children:"YouTube"})]})}),ni("div",{className:"ast-sm-icon m-auto text-center",children:Qo("a",{href:"https://www.instagram.com/aspacemath/",target:"_blank",rel:"noreferrer",children:[ni("span",{className:"fa-brands fa-instagram","aria-hidden":"true"}),ni("span",{className:"sr-only",children:"Instagram"})]})}),ni("div",{className:"ast-sm-icon m-auto text-center",children:Qo("a",{href:"https://www.tiktok.com/@aspacemath",target:"_blank",rel:"noreferrer",children:[ni("span",{className:"fa-brands fa-tiktok","aria-hidden":"true"}),ni("span",{className:"sr-only",children:"TikTok"})]})})]})]}),ni("div",{className:"h-1 w-full bg-asm_lbrown"})]}),F1=nf.exports.createContext("");var j6={},$6={},K6={exports:{}},bR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",wR=bR,AR=wR;function J6(){}function Q6(){}Q6.resetWarningCache=J6;var TR=function(){function T(Y,X,J,R,F,e){if(e!==AR){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}T.isRequired=T;function N(){return T}var V={array:T,bigint:T,bool:T,func:T,number:T,object:T,string:T,symbol:T,any:T,arrayOf:N,element:T,elementType:T,instanceOf:N,node:T,objectOf:N,oneOf:N,oneOfType:N,shape:N,exact:N,checkPropTypes:Q6,resetWarningCache:J6};return V.PropTypes=V,V};K6.exports=TR();(function(T){function N(c){return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},N(c)}Object.defineProperty(T,"__esModule",{value:!0}),T.default=o;var V=R(nf.exports),Y=X(K6.exports);function X(c){return c&&c.__esModule?c:{default:c}}function J(c){if(typeof WeakMap!="function")return null;var s=new WeakMap,b=new WeakMap;return(J=function(A){return A?b:s})(c)}function R(c,s){if(!s&&c&&c.__esModule)return c;if(c===null||N(c)!=="object"&&typeof c!="function")return{default:c};var b=J(s);if(b&&b.has(c))return b.get(c);var g={},A=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in c)if(v!=="default"&&Object.prototype.hasOwnProperty.call(c,v)){var h=A?Object.getOwnPropertyDescriptor(c,v):null;h&&(h.get||h.set)?Object.defineProperty(g,v,h):g[v]=c[v]}return g.default=c,b&&b.set(c,g),g}function F(c,s){if(!(c instanceof s))throw new TypeError("Cannot call a class as a function")}function e(c,s){for(var b=0;b"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function r(c){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(b){return b.__proto__||Object.getPrototypeOf(b)},r(c)}var n=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],u=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],a=typeof window<"u";function o(c){var s=function(b){m(A,b);var g=y(A);function A(v){var h;return F(this,A),h=g.call(this,v),h.p=Promise.resolve(),h.resizeHandler=null,h.handlers={},h.syncWindowResize=h.syncWindowResize.bind(l(h)),h.syncEventHandlers=h.syncEventHandlers.bind(l(h)),h.attachUpdateEvents=h.attachUpdateEvents.bind(l(h)),h.getRef=h.getRef.bind(l(h)),h.handleUpdate=h.handleUpdate.bind(l(h)),h.figureCallback=h.figureCallback.bind(l(h)),h.updatePlotly=h.updatePlotly.bind(l(h)),h}return i(A,[{key:"updatePlotly",value:function(h,x,C){var D=this;this.p=this.p.then(function(){if(!D.unmounting){if(!D.el)throw new Error("Missing element reference");return c.react(D.el,{data:D.props.data,layout:D.props.layout,config:D.props.config,frames:D.props.frames})}}).then(function(){D.unmounting||(D.syncWindowResize(h),D.syncEventHandlers(),D.figureCallback(x),C&&D.attachUpdateEvents())}).catch(function(L){D.props.onError&&D.props.onError(L)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(h){this.unmounting=!1;var x=h.frames&&h.frames.length?h.frames.length:0,C=this.props.frames&&this.props.frames.length?this.props.frames.length:0,D=!(h.layout===this.props.layout&&h.data===this.props.data&&h.config===this.props.config&&C===x),L=h.revision!==void 0,w=h.revision!==this.props.revision;!D&&(!L||L&&!w)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&a&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),c.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var h=this;!this.el||!this.el.removeListener||u.forEach(function(x){h.el.on(x,h.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var h=this;!this.el||!this.el.removeListener||u.forEach(function(x){h.el.removeListener(x,h.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(h){if(typeof h=="function"){var x=this.el,C=x.data,D=x.layout,L=this.el._transitionData?this.el._transitionData._frames:null,w={data:C,layout:D,frames:L};h(w,this.el)}}},{key:"syncWindowResize",value:function(h){var x=this;!a||(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return c.Plots.resize(x.el)},window.addEventListener("resize",this.resizeHandler),h&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(h){this.el=h,this.props.debug&&a&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var h=this;n.forEach(function(x){var C=h.props["on"+x],D=h.handlers[x],L=Boolean(D);C&&!L?h.addEventHandler(x,C):!C&&L?h.removeEventHandler(x):C&&L&&C!==D&&(h.removeEventHandler(x),h.addEventHandler(x,C))})}},{key:"addEventHandler",value:function(h,x){this.handlers[h]=x,this.el.on(this.getPlotlyEventName(h),this.handlers[h])}},{key:"removeEventHandler",value:function(h){this.el.removeListener(this.getPlotlyEventName(h),this.handlers[h]),delete this.handlers[h]}},{key:"getPlotlyEventName",value:function(h){return"plotly_"+h.toLowerCase()}},{key:"render",value:function(){return V.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),A}(V.Component);return s.propTypes={data:Y.default.arrayOf(Y.default.object),config:Y.default.object,layout:Y.default.object,frames:Y.default.arrayOf(Y.default.object),revision:Y.default.number,onInitialized:Y.default.func,onPurge:Y.default.func,onError:Y.default.func,onUpdate:Y.default.func,debug:Y.default.bool,style:Y.default.object,className:Y.default.string,useResizeHandler:Y.default.bool,divId:Y.default.string},n.forEach(function(b){s.propTypes["on"+b]=Y.default.func}),s.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},s}})($6);var q6={exports:{}};(function(T,N){(function(Y,X){T.exports=X()})(self,function(){return function(){var V={98847:function(R,F,e){var i=e(71828),m={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var t in m){var y=t.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");i.addStyleRule(y,m[t])}},98222:function(R,F,e){R.exports=e(82887)},27206:function(R,F,e){R.exports=e(60822)},59893:function(R,F,e){R.exports=e(23381)},5224:function(R,F,e){R.exports=e(83832)},59509:function(R,F,e){R.exports=e(72201)},75557:function(R,F,e){R.exports=e(91815)},40338:function(R,F,e){R.exports=e(21462)},35080:function(R,F,e){R.exports=e(51319)},61396:function(R,F,e){R.exports=e(57516)},40549:function(R,F,e){R.exports=e(98128)},49866:function(R,F,e){R.exports=e(99442)},36089:function(R,F,e){R.exports=e(93740)},19548:function(R,F,e){R.exports=e(8729)},35831:function(R,F,e){R.exports=e(93814)},61039:function(R,F,e){R.exports=e(14382)},97040:function(R,F,e){R.exports=e(51759)},77986:function(R,F,e){R.exports=e(10421)},24296:function(R,F,e){R.exports=e(43102)},58872:function(R,F,e){R.exports=e(92165)},29626:function(R,F,e){R.exports=e(3325)},65591:function(R,F,e){R.exports=e(36071)},69738:function(R,F,e){R.exports=e(43905)},92650:function(R,F,e){R.exports=e(35902)},35630:function(R,F,e){R.exports=e(69816)},73434:function(R,F,e){R.exports=e(94507)},27909:function(R,F,e){var i=e(19548);i.register([e(27206),e(5224),e(58872),e(65591),e(69738),e(92650),e(49866),e(25743),e(6197),e(97040),e(85461),e(73434),e(54201),e(81299),e(47645),e(35630),e(77986),e(83043),e(93005),e(96881),e(4534),e(50581),e(40549),e(77900),e(47582),e(35080),e(21641),e(17280),e(5861),e(29626),e(10021),e(65317),e(96268),e(61396),e(35831),e(16122),e(46163),e(40344),e(40338),e(48131),e(36089),e(55334),e(75557),e(19440),e(99488),e(59893),e(97393),e(98222),e(61039),e(24296),e(66398),e(59509)]),R.exports=i},46163:function(R,F,e){R.exports=e(15154)},96881:function(R,F,e){R.exports=e(64943)},50581:function(R,F,e){R.exports=e(21164)},55334:function(R,F,e){R.exports=e(54186)},65317:function(R,F,e){R.exports=e(94873)},10021:function(R,F,e){R.exports=e(67618)},54201:function(R,F,e){R.exports=e(58810)},5861:function(R,F,e){R.exports=e(20593)},16122:function(R,F,e){R.exports=e(29396)},83043:function(R,F,e){R.exports=e(13551)},48131:function(R,F,e){R.exports=e(46858)},47582:function(R,F,e){R.exports=e(17988)},21641:function(R,F,e){R.exports=e(68868)},96268:function(R,F,e){R.exports=e(20467)},19440:function(R,F,e){R.exports=e(91271)},99488:function(R,F,e){R.exports=e(21461)},97393:function(R,F,e){R.exports=e(85956)},25743:function(R,F,e){R.exports=e(52979)},66398:function(R,F,e){R.exports=e(32275)},17280:function(R,F,e){R.exports=e(6419)},77900:function(R,F,e){R.exports=e(61510)},81299:function(R,F,e){R.exports=e(87619)},93005:function(R,F,e){R.exports=e(93601)},40344:function(R,F,e){R.exports=e(96595)},47645:function(R,F,e){R.exports=e(70954)},6197:function(R,F,e){R.exports=e(47462)},4534:function(R,F,e){R.exports=e(17659)},85461:function(R,F,e){R.exports=e(19990)},82884:function(R){R.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},50215:function(R,F,e){var i=e(82884),m=e(41940),t=e(85555),y=e(44467).templatedArray;e(24695),R.exports=y("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:m({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:i.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:i.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",t.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",t.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",t.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",t.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:m({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},3749:function(R,F,e){var i=e(71828),m=e(89298),t=e(92605).draw;R.exports=function(d){var r=d._fullLayout,n=i.filterVisible(r.annotations);if(n.length&&d._fullData.length)return i.syncOrAsync([t,y],d)};function y(l){var d=l._fullLayout;i.filterVisible(d.annotations).forEach(function(r){var n=m.getFromId(l,r.xref),u=m.getFromId(l,r.yref),a=m.getRefType(r.xref),o=m.getRefType(r.yref);r._extremes={},a==="range"&&p(r,n),o==="range"&&p(r,u)})}function p(l,d){var r=d._id,n=r.charAt(0),u=l[n],a=l["a"+n],o=l[n+"ref"],c=l["a"+n+"ref"],s=l["_"+n+"padplus"],b=l["_"+n+"padminus"],g={x:1,y:-1}[n]*l[n+"shift"],A=3*l.arrowsize*l.arrowwidth||0,v=A+g,h=A-g,x=3*l.startarrowsize*l.arrowwidth||0,C=x+g,D=x-g,L;if(c===o){var w=m.findExtremes(d,[d.r2c(u)],{ppadplus:v,ppadminus:h}),M=m.findExtremes(d,[d.r2c(a)],{ppadplus:Math.max(s,C),ppadminus:Math.max(b,D)});L={min:[w.min[0],M.min[0]],max:[w.max[0],M.max[0]]}}else C=a?C+a:C,D=a?D-a:D,L=m.findExtremes(d,[d.r2c(u)],{ppadplus:Math.max(s,v,C),ppadminus:Math.max(b,h,D)});l._extremes[r]=L}},44317:function(R,F,e){var i=e(71828),m=e(73972),t=e(44467).arrayEditor;R.exports={hasClickToShow:y,onClick:p};function y(r,n){var u=l(r,n);return u.on.length>0||u.explicitOff.length>0}function p(r,n){var u=l(r,n),a=u.on,o=u.off.concat(u.explicitOff),c={},s=r._fullLayout.annotations,b,g;if(!!(a.length||o.length)){for(b=0;b.6666666666666666?dr="right":dr="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[dr]}for(var Pe=!1,Ve=["x","y"],Ze=0;Ze1)&&(vt===lt?(st=mt.r2fraction(x["a"+Ke]),(st<0||st>1)&&(Pe=!0)):Pe=!0),Oe=mt._offset+mt.r2p(x[Ke]),be=.5}else{var ct=He==="domain";Ke==="x"?(pe=x[Ke],Oe=ct?mt._offset+mt._length*pe:Oe=S.l+S.w*pe):(pe=1-x[Ke],Oe=ct?mt._offset+mt._length*pe:Oe=S.t+S.h*pe),be=x.showarrow?.5:pe}if(x.showarrow){qe.head=Oe;var bt=x["a"+Ke];if(Re=et*Ye(.5,x.xanchor)-Ue*Ye(.5,x.yanchor),vt===lt){var Lt=l.getRefType(vt);Lt==="domain"?(Ke==="y"&&(bt=1-bt),qe.tail=mt._offset+mt._length*bt):Lt==="paper"?Ke==="y"?(bt=1-bt,qe.tail=S.t+S.h*bt):qe.tail=S.l+S.w*bt:qe.tail=mt._offset+mt.r2p(bt),Ce=Re}else qe.tail=Oe+bt,Ce=Re+bt;qe.text=qe.tail+Re;var Ut=M[Ke==="x"?"width":"height"];if(lt==="paper"&&(qe.head=y.constrain(qe.head,1,Ut-1)),vt==="pixel"){var Gt=-Math.max(qe.tail-3,qe.text),Ft=Math.min(qe.tail+3,qe.text)-Ut;Gt>0?(qe.tail+=Gt,qe.text+=Gt):Ft>0&&(qe.tail-=Ft,qe.text-=Ft)}qe.tail+=ot,qe.head+=ot}else Re=Be*Ye(be,rt),Ce=Re,qe.text=Oe+Re;qe.text+=ot,Re+=ot,Ce+=ot,x["_"+Ke+"padplus"]=Be/2+Ce,x["_"+Ke+"padminus"]=Be/2-Ce,x["_"+Ke+"size"]=Be,x["_"+Ke+"shift"]=Re}if(Pe){he.remove();return}var tr=0,lr=0;if(x.align!=="left"&&(tr=(De-Me)*(x.align==="center"?.5:1)),x.valign!=="top"&&(lr=(ke-Ae)*(x.valign==="middle"?.5:1)),Fe)Te.select("svg").attr({x:K+tr-1,y:K+lr}).call(r.setClipUrl,ae?U:null,h);else{var Or=K+lr-Ie.top,xt=K+tr-Ie.left;ce.call(u.positionText,xt,Or).call(r.setClipUrl,ae?U:null,h)}fe.select("rect").call(r.setRect,K,K,De,ke),Q.call(r.setRect,$/2,$/2,We-$,_e-$),he.call(r.setTranslate,Math.round(H.x.text-We/2),Math.round(H.y.text-_e/2)),q.attr({transform:"rotate("+B+","+H.x.text+","+H.y.text+")"});var jt=function(br,dr){W.selectAll(".annotation-arrow-g").remove();var ht=H.x.head,ut=H.y.head,wt=H.x.tail+br,St=H.y.tail+dr,Dt=H.x.text+br,Mt=H.y.text+dr,zt=y.rotationXYMatrix(B,Dt,Mt),Vt=y.apply2DTransform(zt),Kt=y.apply2DTransform2(zt),$t=+Q.attr("width"),ir=+Q.attr("height"),Mr=Dt-.5*$t,Xe=Mr+$t,je=Mt-.5*ir,It=je+ir,_t=[[Mr,je,Mr,It],[Mr,It,Xe,It],[Xe,It,Xe,je],[Xe,je,Mr,je]].map(Kt);if(!_t.reduce(function(Br,wn){return Br^!!y.segmentsIntersect(ht,ut,ht+1e6,ut+1e6,wn[0],wn[1],wn[2],wn[3])},!1)){_t.forEach(function(Br){var wn=y.segmentsIntersect(wt,St,ht,ut,Br[0],Br[1],Br[2],Br[3]);wn&&(wt=wn.x,St=wn.y)});var Zt=x.arrowwidth,rr=x.arrowcolor,sr=x.arrowside,nr=W.append("g").style({opacity:d.opacity(rr)}).classed("annotation-arrow-g",!0),Bt=nr.append("path").attr("d","M"+wt+","+St+"L"+ht+","+ut).style("stroke-width",Zt+"px").call(d.stroke,d.rgb(rr));if(s(Bt,sr,x),f.annotationPosition&&Bt.node().parentNode&&!D){var hr=ht,pr=ut;if(x.standoff){var wr=Math.sqrt(Math.pow(ht-wt,2)+Math.pow(ut-St,2));hr+=x.standoff*(wt-ht)/wr,pr+=x.standoff*(St-ut)/wr}var vr=nr.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(wt-hr)+","+(St-pr),transform:p(hr,pr)}).style("stroke-width",Zt+6+"px").call(d.stroke,"rgba(0,0,0,0)").call(d.fill,"rgba(0,0,0,0)"),Jr,_r;o.init({element:vr.node(),gd:h,prepFn:function(){var Br=r.getTranslate(he);Jr=Br.x,_r=Br.y,L&&L.autorange&&O(L._name+".autorange",!0),w&&w.autorange&&O(w._name+".autorange",!0)},moveFn:function(Br,wn){var Kr=Vt(Jr,_r),Fn=Kr[0]+Br,In=Kr[1]+wn;he.call(r.setTranslate,Fn,In),G("x",A(L,Br,"x",S,x)),G("y",A(w,wn,"y",S,x)),x.axref===x.xref&&G("ax",A(L,Br,"ax",S,x)),x.ayref===x.yref&&G("ay",A(w,wn,"ay",S,x)),nr.attr("transform",p(Br,wn)),q.attr({transform:"rotate("+B+","+Fn+","+In+")"})},doneFn:function(){m.call("_guiRelayout",h,z());var Br=document.querySelector(".js-notes-box-panel");Br&&Br.redraw(Br.selectedObj)}})}}};if(x.showarrow&&jt(0,0),re){var Yt;o.init({element:he.node(),gd:h,prepFn:function(){Yt=q.attr("transform")},moveFn:function(br,dr){var ht="pointer";if(x.showarrow)x.axref===x.xref?G("ax",A(L,br,"ax",S,x)):G("ax",x.ax+br),x.ayref===x.yref?G("ay",A(w,dr,"ay",S.w,x)):G("ay",x.ay+dr),jt(br,dr);else{if(D)return;var ut,wt;if(L)ut=A(L,br,"x",S,x);else{var St=x._xsize/S.w,Dt=x.x+(x._xshift-x.xshift)/S.w-St/2;ut=o.align(Dt+br/S.w,St,0,1,x.xanchor)}if(w)wt=A(w,dr,"y",S,x);else{var Mt=x._ysize/S.h,zt=x.y-(x._yshift+x.yshift)/S.h-Mt/2;wt=o.align(zt-dr/S.h,Mt,0,1,x.yanchor)}G("x",ut),G("y",wt),(!L||!w)&&(ht=o.getCursor(L?.5:ut,w?.5:wt,x.xanchor,x.yanchor))}q.attr({transform:p(br,dr)+Yt}),a(he,ht)},clickFn:function(br,dr){x.captureevents&&h.emit("plotly_clickannotation",le(dr))},doneFn:function(){a(he),m.call("_guiRelayout",h,z());var br=document.querySelector(".js-notes-box-panel");br&&br.redraw(br.selectedObj)}})}}f.annotationText?ce.call(u.makeEditable,{delegate:he,gd:h}).call(oe).on("edit",function(we){x.text=we,this.call(oe),G("text",we),L&&L.autorange&&O(L._name+".autorange",!0),w&&w.autorange&&O(w._name+".autorange",!0),m.call("_guiRelayout",h,z())}):ce.call(oe)}},13011:function(R,F,e){var i=e(39898),m=e(7901),t=e(82884),y=e(71828),p=y.strScale,l=y.strRotate,d=y.strTranslate;R.exports=function(n,u,a){var o=n.node(),c=t[a.arrowhead||0],s=t[a.startarrowhead||0],b=(a.arrowwidth||1)*(a.arrowsize||1),g=(a.arrowwidth||1)*(a.startarrowsize||1),A=u.indexOf("start")>=0,v=u.indexOf("end")>=0,h=c.backoff*b+a.standoff,x=s.backoff*g+a.startstandoff,C,D,L,w;if(o.nodeName==="line"){C={x:+n.attr("x1"),y:+n.attr("y1")},D={x:+n.attr("x2"),y:+n.attr("y2")};var M=C.x-D.x,S=C.y-D.y;if(L=Math.atan2(S,M),w=L+Math.PI,h&&x&&h+x>Math.sqrt(M*M+S*S)){q();return}if(h){if(h*h>M*M+S*S){q();return}var f=h*Math.cos(L),P=h*Math.sin(L);D.x+=f,D.y+=P,n.attr({x2:D.x,y2:D.y})}if(x){if(x*x>M*M+S*S){q();return}var E=x*Math.cos(L),k=x*Math.sin(L);C.x-=E,C.y-=k,n.attr({x1:C.x,y1:C.y})}}else if(o.nodeName==="path"){var O=o.getTotalLength(),G="";if(O1){a=!0;break}}a?p.fullLayout._infolayer.select(".annotation-"+p.id+'[data-index="'+n+'"]').remove():(u._pdata=m(p.glplot.cameraParams,[l.xaxis.r2l(u.x)*d[0],l.yaxis.r2l(u.y)*d[1],l.zaxis.r2l(u.z)*d[2]]),i(p.graphDiv,u,n,p.id,u._xa,u._ya))}}},2468:function(R,F,e){var i=e(73972),m=e(71828);R.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e(26997)}}},layoutAttributes:e(26997),handleDefaults:e(20226),includeBasePlot:t,convert:e(5485),draw:e(82188)};function t(y,p){var l=i.subplotsRegistry.gl3d;if(!!l)for(var d=l.attrRegex,r=Object.keys(y),n=0;n=0)))return n;if(s===3)o[s]>1&&(o[s]=1);else if(o[s]>=1)return n}var b=Math.round(o[0]*255)+", "+Math.round(o[1]*255)+", "+Math.round(o[2]*255);return c?"rgba("+b+", "+o[3]+")":"rgb("+b+")"}},63583:function(R,F,e){var i=e(13838),m=e(41940),t=e(1426).extendFlat,y=e(30962).overrideAll;R.exports=y({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number",min:-2,max:3},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:i.linecolor,outlinewidth:i.linewidth,bordercolor:i.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:i.minor.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:t({},i.ticks,{dflt:""}),ticklabeloverflow:t({},i.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,ticklabelstep:i.ticklabelstep,showticklabels:i.showticklabels,labelalias:i.labelalias,tickfont:m({}),tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,tickprefix:i.tickprefix,showtickprefix:i.showtickprefix,ticksuffix:i.ticksuffix,showticksuffix:i.showticksuffix,separatethousands:i.separatethousands,exponentformat:i.exponentformat,minexponent:i.minexponent,showexponent:i.showexponent,title:{text:{valType:"string"},font:m({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:m({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},30939:function(R){R.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},62499:function(R,F,e){var i=e(71828),m=e(44467),t=e(26218),y=e(38701),p=e(96115),l=e(89426),d=e(63583);R.exports=function(n,u,a){var o=m.newContainer(u,"colorbar"),c=n.colorbar||{};function s(f,P){return i.coerce(c,o,d,f,P)}var b=a.margin||{t:0,b:0,l:0,r:0},g=a.width-b.l-b.r,A=a.height-b.t-b.b,v=s("orientation"),h=v==="v",x=s("thicknessmode");s("thickness",x==="fraction"?30/(h?g:A):30);var C=s("lenmode");s("len",C==="fraction"?1:h?A:g),s("x",h?1.02:.5),s("xanchor",h?"left":"center"),s("xpad"),s("y",h?.5:1.02),s("yanchor",h?"middle":"bottom"),s("ypad"),i.noneOrAll(c,o,["x","y"]),s("outlinecolor"),s("outlinewidth"),s("bordercolor"),s("borderwidth"),s("bgcolor");var D=i.coerce(c,o,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:h?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");s("ticklabeloverflow",D.indexOf("inside")!==-1?"hide past domain":"hide past div"),t(c,o,s,"linear");var L=a.font,w={outerTicks:!1,font:L};D.indexOf("inside")!==-1&&(w.bgColor="black"),l(c,o,s,"linear",w),p(c,o,s,"linear",w),y(c,o,s,"linear",w),s("title.text",a._dfltTitle.colorbar);var M=o.tickfont,S=i.extendFlat({},M,{color:L.color,size:i.bigFont(M.size)});i.coerceFont(s,"title.font",S),s("title.side",h?"top":"right")}},98981:function(R,F,e){var i=e(39898),m=e(84267),t=e(74875),y=e(73972),p=e(89298),l=e(28569),d=e(71828),r=d.strTranslate,n=e(1426).extendFlat,u=e(6964),a=e(91424),o=e(7901),c=e(92998),s=e(63893),b=e(52075).flipScale,g=e(71453),A=e(52830),v=e(13838),h=e(18783),x=h.LINE_SPACING,C=h.FROM_TL,D=h.FROM_BR,L=e(30939).cn;function w(k){var O=k._fullLayout,G=O._infolayer.selectAll("g."+L.colorbar).data(M(k),function(z){return z._id});G.enter().append("g").attr("class",function(z){return z._id}).classed(L.colorbar,!0),G.each(function(z){var U=i.select(this);d.ensureSingle(U,"rect",L.cbbg),d.ensureSingle(U,"g",L.cbfills),d.ensureSingle(U,"g",L.cblines),d.ensureSingle(U,"g",L.cbaxis,function(B){B.classed(L.crisp,!0)}),d.ensureSingle(U,"g",L.cbtitleunshift,function(B){B.append("g").classed(L.cbtitle,!0)}),d.ensureSingle(U,"rect",L.cboutline);var H=S(U,z,k);H&&H.then&&(k._promises||[]).push(H),k._context.edits.colorbarPosition&&f(U,z,k)}),G.exit().each(function(z){t.autoMargin(k,z._id)}).remove(),G.order()}function M(k){var O=k._fullLayout,G=k.calcdata,z=[],U,H,B,W;function q(te){return n(te,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function re(){typeof W.calc=="function"?W.calc(k,B,U):(U._fillgradient=H.reversescale?b(H.colorscale):H.colorscale,U._zrange=[H[W.min],H[W.max]])}for(var ie=0;ie1){var Ue=Math.pow(10,Math.floor(Math.log(et)/Math.LN10));mt*=Ue*d.roundUp(et/Ue,[2,5,10]),(Math.abs(Te.start)/Te.size+1e-6)%1<2e-6&&(lt.tick0=0)}lt.dtick=mt}lt.domain=z?[Ze+Z/fe.h,Ze+We-Z/fe.h]:[Ze+$/fe.w,Ze+We-$/fe.w],lt.setScale(),k.attr("transform",r(Math.round(fe.l),Math.round(fe.t)));var Be=k.select("."+L.cbtitleunshift).attr("transform",r(-Math.round(fe.l),-Math.round(fe.t))),rt=lt.ticklabelposition,ot=lt.title.font.size,qe=k.select("."+L.cbaxis),Oe,Ce=0,pe=0;function be(bt,Lt){var Ut={propContainer:lt,propName:O._propPrefix+"title",traceIndex:O._traceIndex,_meta:O._meta,placeholder:ae._dfltTitle.colorbar,containerGroup:k.select("."+L.cbtitle)},Gt=bt.charAt(0)==="h"?bt.substr(1):"h"+bt;k.selectAll("."+Gt+",."+Gt+"-math-group").remove(),c.draw(G,bt,n(Ut,Lt||{}))}function Re(){if(z&&vt||!z&&!vt){var bt,Lt;oe==="top"&&(bt=$+fe.l+fe.w*K,Lt=Z+fe.t+fe.h*(1-Ze-We)+3+ot*.75),oe==="bottom"&&(bt=$+fe.l+fe.w*K,Lt=Z+fe.t+fe.h*(1-Ze)-3-ot*.25),oe==="right"&&(Lt=Z+fe.t+fe.h*Q+3+ot*.75,bt=$+fe.l+fe.w*Ze),be(lt._id+"title",{attributes:{x:bt,y:Lt,"text-anchor":z?"start":"middle"}})}}function He(){if(z&&!vt||!z&&vt){var bt=lt.position||0,Lt=lt._offset+lt._length/2,Ut,Gt;if(oe==="right")Gt=Lt,Ut=fe.l+fe.w*bt+10+ot*(lt.showticklabels?1:.5);else if(Ut=Lt,oe==="bottom"&&(Gt=fe.t+fe.h*bt+10+(rt.indexOf("inside")===-1?lt.tickfont.size:0)+(lt.ticks!=="intside"&&O.ticklen||0)),oe==="top"){var Ft=ce.text.split("
").length;Gt=fe.t+fe.h*bt+10-Ae-x*ot*Ft}be((z?"h":"v")+lt._id+"title",{avoid:{selection:i.select(G).selectAll("g."+lt._id+"tick"),side:oe,offsetTop:z?0:fe.t,offsetLeft:z?fe.l:0,maxShift:z?ae.width:ae.height},attributes:{x:Ut,y:Gt,"text-anchor":"middle"},transform:{rotate:z?-90:0,offset:0}})}}function st(){if(!z&&!vt||z&&vt){var bt=k.select("."+L.cbtitle),Lt=bt.select("text"),Ut=[-q/2,q/2],Gt=bt.select(".h"+lt._id+"title-math-group").node(),Ft=15.6;Lt.node()&&(Ft=parseInt(Lt.node().style.fontSize,10)*x);var tr;if(Gt?(tr=a.bBox(Gt),pe=tr.width,Ce=tr.height,Ce>Ft&&(Ut[1]-=(Ce-Ft)/2)):Lt.node()&&!Lt.classed(L.jsPlaceholder)&&(tr=a.bBox(Lt.node()),pe=tr.width,Ce=tr.height),z){if(Ce){if(Ce+=5,oe==="top")lt.domain[1]-=Ce/fe.h,Ut[1]*=-1;else{lt.domain[0]+=Ce/fe.h;var lr=s.lineCount(Lt);Ut[1]+=(1-lr)*Ft}bt.attr("transform",r(Ut[0],Ut[1])),lt.setScale()}}else pe&&(oe==="right"&&(lt.domain[0]+=(pe+ot/2)/fe.w),bt.attr("transform",r(Ut[0],Ut[1])),lt.setScale())}k.selectAll("."+L.cbfills+",."+L.cblines).attr("transform",z?r(0,Math.round(fe.h*(1-lt.domain[1]))):r(Math.round(fe.w*lt.domain[0]),0)),qe.attr("transform",z?r(0,Math.round(-fe.t)):r(Math.round(-fe.l),0));var Or=k.select("."+L.cbfills).selectAll("rect."+L.cbfill).attr("style","").data(Ie);Or.enter().append("rect").classed(L.cbfill,!0).style("stroke","none"),Or.exit().remove();var xt=de.map(lt.c2p).map(Math.round).sort(function(ht,ut){return ht-ut});Or.each(function(ht,ut){var wt=[ut===0?de[0]:(Ie[ut]+Ie[ut-1])/2,ut===Ie.length-1?de[1]:(Ie[ut]+Ie[ut+1])/2].map(lt.c2p).map(Math.round);z&&(wt[1]=d.constrain(wt[1]+(wt[1]>wt[0])?1:-1,xt[0],xt[1]));var St=i.select(this).attr(z?"x":"y",_e).attr(z?"y":"x",i.min(wt)).attr(z?"width":"height",Math.max(Ae,2)).attr(z?"height":"width",Math.max(i.max(wt)-i.min(wt),2));if(O._fillgradient)a.gradient(St,G,O._id,z?"vertical":"horizontalreversed",O._fillgradient,"fill");else{var Dt=Se(ht).replace("e-","");St.attr("fill",m(Dt).toHexString())}});var jt=k.select("."+L.cblines).selectAll("path."+L.cbline).data(ne.color&&ne.width?Me:[]);jt.enter().append("path").classed(L.cbline,!0),jt.exit().remove(),jt.each(function(ht){var ut=_e,wt=Math.round(lt.c2p(ht))+ne.width/2%1;i.select(this).attr("d","M"+(z?ut+","+wt:wt+","+ut)+(z?"h":"v")+Ae).call(a.lineGroupStyle,ne.width,we(ht),ne.dash)}),qe.selectAll("g."+lt._id+"tick,path").remove();var Yt=_e+Ae+(q||0)/2-(O.ticks==="outside"?1:0),br=p.calcTicks(lt),dr=p.getTickSigns(lt)[2];return p.drawTicks(G,lt,{vals:lt.ticks==="inside"?p.clipEnds(lt,br):br,layer:qe,path:p.makeTickPath(lt,Yt,dr),transFn:p.makeTransTickFn(lt)}),p.drawLabels(G,lt,{vals:br,layer:qe,transFn:p.makeTransTickLabelFn(lt),labelFns:p.makeLabelFns(lt,Yt)})}function ct(){var bt,Lt=Ae+q/2;rt.indexOf("inside")===-1&&(bt=a.bBox(qe.node()),Lt+=z?bt.width:bt.height),Oe=Be.select("text");var Ut=0,Gt=z&&oe==="top",Ft=!z&&oe==="right",tr=0;if(Oe.node()&&!Oe.classed(L.jsPlaceholder)){var lr,Or=Be.select(".h"+lt._id+"title-math-group").node();Or&&(z&&vt||!z&&!vt)?(bt=a.bBox(Or),Ut=bt.width,lr=bt.height):(bt=a.bBox(Be.node()),Ut=bt.right-fe.l-(z?_e:Ke),lr=bt.bottom-fe.t-(z?Ke:_e),!z&&oe==="top"&&(Lt+=bt.height,tr=bt.height)),Ft&&(Oe.attr("transform",r(Ut/2+ot/2,0)),Ut*=2),Lt=Math.max(Lt,z?Ut:lr)}var xt=(z?$:Z)*2+Lt+re+q/2,jt=0;!z&&ce.text&&he==="bottom"&&Q<=0&&(jt=xt/2,xt+=jt,tr+=jt),ae._hColorbarMoveTitle=jt,ae._hColorbarMoveCBTitle=tr;var Yt=re+q;k.select("."+L.cbbg).attr("x",(z?_e:Ke)-Yt/2-(z?$:0)).attr("y",(z?Ke:_e)-(z?ke:Z+tr-jt)).attr(z?"width":"height",Math.max(xt-jt,2)).attr(z?"height":"width",Math.max(ke+Yt,2)).call(o.fill,ie).call(o.stroke,O.bordercolor).style("stroke-width",re);var br=Ft?Math.max(Ut-10,0):0;if(k.selectAll("."+L.cboutline).attr("x",(z?_e:Ke+$)+br).attr("y",(z?Ke+Z-ke:_e)+(Gt?Ce:0)).attr(z?"width":"height",Math.max(Ae,2)).attr(z?"height":"width",Math.max(ke-(z?2*Z+Ce:2*$+br),2)).call(o.stroke,O.outlinecolor).style({fill:"none","stroke-width":q}),k.attr("transform",r(fe.l-(z?Ye*xt:0),fe.t-(z?0:(1-Pe)*xt-tr))),!z&&(re||m(ie).getAlpha()&&!m.equals(ae.paper_bgcolor,ie))){var dr=qe.selectAll("text"),ht=dr[0].length,ut=k.select("."+L.cbbg).node(),wt=a.bBox(ut),St=a.getTranslate(k),Dt=2;dr.each(function(Mr,Xe){var je=0,It=ht-1;if(Xe===je||Xe===It){var _t=a.bBox(this),Zt=a.getTranslate(this),rr;if(Xe===It){var sr=_t.right+Zt.x,nr=wt.right+St.x+Ke-re-Dt+K;rr=nr-sr,rr>0&&(rr=0)}else if(Xe===je){var Bt=_t.left+Zt.x,hr=wt.left+St.x+Ke+re+Dt;rr=hr-Bt,rr<0&&(rr=0)}rr&&(ht<3?this.setAttribute("transform","translate("+rr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Mt={},zt=C[le],Vt=D[le],Kt=C[he],$t=D[he],ir=xt-Ae;z?(H==="pixels"?(Mt.y=Q,Mt.t=ke*Kt,Mt.b=ke*$t):(Mt.t=Mt.b=0,Mt.yt=Q+U*Kt,Mt.yb=Q-U*$t),W==="pixels"?(Mt.x=K,Mt.l=xt*zt,Mt.r=xt*Vt):(Mt.l=ir*zt,Mt.r=ir*Vt,Mt.xl=K-B*zt,Mt.xr=K+B*Vt)):(H==="pixels"?(Mt.x=K,Mt.l=ke*zt,Mt.r=ke*Vt):(Mt.l=Mt.r=0,Mt.xl=K+U*zt,Mt.xr=K-U*Vt),W==="pixels"?(Mt.y=1-Q,Mt.t=xt*Kt,Mt.b=xt*$t):(Mt.t=ir*Kt,Mt.b=ir*$t,Mt.yt=Q-B*Kt,Mt.yb=Q+B*$t)),t.autoMargin(G,O._id,Mt)}return d.syncOrAsync([t.previousPromises,Re,st,He,t.previousPromises,ct],G)}function f(k,O,G){var z=O.orientation==="v",U=G._fullLayout,H=U._size,B,W,q;l.init({element:k.node(),gd:G,prepFn:function(){B=k.attr("transform"),u(k)},moveFn:function(re,ie){k.attr("transform",B+r(re,ie)),W=l.align((z?O._uFrac:O._vFrac)+re/H.w,z?O._thickFrac:O._lenFrac,0,1,O.xanchor),q=l.align((z?O._vFrac:1-O._uFrac)-ie/H.h,z?O._lenFrac:O._thickFrac,0,1,O.yanchor);var le=l.getCursor(W,q,O.xanchor,O.yanchor);u(k,le)},doneFn:function(){if(u(k),W!==void 0&&q!==void 0){var re={};re[O._propPrefix+"x"]=W,re[O._propPrefix+"y"]=q,O._traceIndex!==void 0?y.call("_guiRestyle",G,re,O._traceIndex):y.call("_guiRelayout",G,re)}}})}function P(k,O,G){var z=O._levels,U=[],H=[],B,W,q=z.end+z.size/100,re=z.size,ie=1.001*G[0]-.001*G[1],le=1.001*G[1]-.001*G[0];for(W=0;W<1e5&&(B=z.start+W*re,!(re>0?B>=q:B<=q));W++)B>ie&&B0?B>=q:B<=q));W++)B>G[0]&&Bg-s?s=g-(b-g):b-g=0?h=r.colorscale.sequential:h=r.colorscale.sequentialminus,o._sync("colorscale",h)}}},33046:function(R,F,e){var i=e(71828),m=e(52075).hasColorscale,t=e(52075).extractOpts;R.exports=function(p,l){function d(s,b){var g=s["_"+b];g!==void 0&&(s[b]=g)}function r(s,b){var g=b.container?i.nestedProperty(s,b.container).get():s;if(g)if(g.coloraxis)g._colorAx=l[g.coloraxis];else{var A=t(g),v=A.auto;(v||A.min===void 0)&&d(g,b.min),(v||A.max===void 0)&&d(g,b.max),A.autocolorscale&&d(g,"colorscale")}}for(var n=0;n=0;h--,x++){var C=g[h];v[x]=[1-C[0],C[1]]}return v}function c(g,A){A=A||{};for(var v=g.domain,h=g.range,x=h.length,C=new Array(x),D=0;D1.3333333333333333-d?l:d}},70461:function(R,F,e){var i=e(71828),m=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];R.exports=function(y,p,l,d){return l==="left"?y=0:l==="center"?y=1:l==="right"?y=2:y=i.constrain(Math.floor(y*3),0,2),d==="bottom"?p=0:d==="middle"?p=1:d==="top"?p=2:p=i.constrain(Math.floor(p*3),0,2),m[p][y]}},64505:function(R,F){F.selectMode=function(e){return e==="lasso"||e==="select"},F.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"},F.openMode=function(e){return e==="drawline"||e==="drawopenpath"},F.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"},F.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"},F.selectingOrDrawing=function(e){return F.freeMode(e)||F.rectMode(e)}},28569:function(R,F,e){var i=e(48956),m=e(57035),t=e(38520),y=e(71828).removeElement,p=e(85555),l=R.exports={};l.align=e(92807),l.getCursor=e(70461);var d=e(26041);l.unhover=d.wrapped,l.unhoverRaw=d.raw,l.init=function(a){var o=a.gd,c=1,s=o._context.doubleClickDelay,b=a.element,g,A,v,h,x,C,D,L;o._mouseDownTime||(o._mouseDownTime=0),b.style.pointerEvents="all",b.onmousedown=S,t?(b._ontouchstart&&b.removeEventListener("touchstart",b._ontouchstart),b._ontouchstart=S,b.addEventListener("touchstart",S,{passive:!1})):b.ontouchstart=S;function w(E,k,O){return Math.abs(E)"u"&&typeof E.clientY>"u"&&(E.clientX=g,E.clientY=A),v=new Date().getTime(),v-o._mouseDownTimes&&(c=Math.max(c-1,1)),o._dragged)a.doneFn&&a.doneFn();else if(a.clickFn&&a.clickFn(c,C),!L){var k;try{k=new MouseEvent("click",E)}catch{var O=n(E);k=document.createEvent("MouseEvents"),k.initMouseEvent("click",E.bubbles,E.cancelable,E.view,E.detail,E.screenX,E.screenY,O[0],O[1],E.ctrlKey,E.altKey,E.shiftKey,E.metaKey,E.button,E.relatedTarget)}D.dispatchEvent(k)}o._dragging=!1,o._dragged=!1}};function r(){var u=document.createElement("div");u.className="dragcover";var a=u.style;return a.position="fixed",a.left=0,a.right=0,a.top=0,a.bottom=0,a.zIndex=999999999,a.background="none",document.body.appendChild(u),u}l.coverSlip=r;function n(u){return i(u.changedTouches?u.changedTouches[0]:u,document.body)}},26041:function(R,F,e){var i=e(11086),m=e(79990),t=e(24401).getGraphDiv,y=e(26675),p=R.exports={};p.wrapped=function(l,d,r){l=t(l),l._fullLayout&&m.clear(l._fullLayout._uid+y.HOVERID),p.raw(l,d,r)},p.raw=function(d,r){var n=d._fullLayout,u=d._hoverdata;r||(r={}),!(r.target&&!d._dragged&&i.triggerHandler(d,"plotly_beforehover",r)===!1)&&(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),d._hoverdata=void 0,r.target&&u&&d.emit("plotly_unhover",{event:r,points:u}))}},79952:function(R,F){F.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},F.u={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},91424:function(R,F,e){var i=e(39898),m=e(71828),t=m.numberFormat,y=e(92770),p=e(84267),l=e(73972),d=e(7901),r=e(21081),n=m.strTranslate,u=e(63893),a=e(77922),o=e(18783),c=o.LINE_SPACING,s=e(37822).DESELECTDIM,b=e(34098),g=e(39984),A=e(23469).appendArrayPointValue,v=R.exports={};v.font=function(Me,Ae,De,ke){m.isPlainObject(Ae)&&(ke=Ae.color,De=Ae.size,Ae=Ae.family),Ae&&Me.style("font-family",Ae),De+1&&Me.style("font-size",De+"px"),ke&&Me.call(d.fill,ke)},v.setPosition=function(Me,Ae,De){Me.attr("x",Ae).attr("y",De)},v.setSize=function(Me,Ae,De){Me.attr("width",Ae).attr("height",De)},v.setRect=function(Me,Ae,De,ke,We){Me.call(v.setPosition,Ae,De).call(v.setSize,ke,We)},v.translatePoint=function(Me,Ae,De,ke){var We=De.c2p(Me.x),_e=ke.c2p(Me.y);if(y(We)&&y(_e)&&Ae.node())Ae.node().nodeName==="text"?Ae.attr("x",We).attr("y",_e):Ae.attr("transform",n(We,_e));else return!1;return!0},v.translatePoints=function(Me,Ae,De){Me.each(function(ke){var We=i.select(this);v.translatePoint(ke,We,Ae,De)})},v.hideOutsideRangePoint=function(Me,Ae,De,ke,We,_e){Ae.attr("display",De.isPtWithinRange(Me,We)&&ke.isPtWithinRange(Me,_e)?null:"none")},v.hideOutsideRangePoints=function(Me,Ae){if(!!Ae._hasClipOnAxisFalse){var De=Ae.xaxis,ke=Ae.yaxis;Me.each(function(We){var _e=We[0].trace,Ye=_e.xcalendar,Pe=_e.ycalendar,Ve=l.traceIs(_e,"bar-like")?".bartext":".point,.textpoint";Me.selectAll(Ve).each(function(Ze){v.hideOutsideRangePoint(Ze,i.select(this),De,ke,Ye,Pe)})})}},v.crispRound=function(Me,Ae,De){return!Ae||!y(Ae)?De||0:Me._context.staticPlot?Ae:Ae<1?1:Math.round(Ae)},v.singleLineStyle=function(Me,Ae,De,ke,We){Ae.style("fill","none");var _e=(((Me||[])[0]||{}).trace||{}).line||{},Ye=De||_e.width||0,Pe=We||_e.dash||"";d.stroke(Ae,ke||_e.color),v.dashLine(Ae,Pe,Ye)},v.lineGroupStyle=function(Me,Ae,De,ke){Me.style("fill","none").each(function(We){var _e=(((We||[])[0]||{}).trace||{}).line||{},Ye=Ae||_e.width||0,Pe=ke||_e.dash||"";i.select(this).call(d.stroke,De||_e.color).call(v.dashLine,Pe,Ye)})},v.dashLine=function(Me,Ae,De){De=+De||0,Ae=v.dashStyle(Ae,De),Me.style({"stroke-dasharray":Ae,"stroke-width":De+"px"})},v.dashStyle=function(Me,Ae){Ae=+Ae||1;var De=Math.max(Ae,3);return Me==="solid"?Me="":Me==="dot"?Me=De+"px,"+De+"px":Me==="dash"?Me=3*De+"px,"+3*De+"px":Me==="longdash"?Me=5*De+"px,"+5*De+"px":Me==="dashdot"?Me=3*De+"px,"+De+"px,"+De+"px,"+De+"px":Me==="longdashdot"&&(Me=5*De+"px,"+2*De+"px,"+De+"px,"+2*De+"px"),Me};function h(Me,Ae,De){var ke=Ae.fillpattern,We=ke&&v.getPatternAttr(ke.shape,0,"");if(We){var _e=v.getPatternAttr(ke.bgcolor,0,null),Ye=v.getPatternAttr(ke.fgcolor,0,null),Pe=ke.fgopacity,Ve=v.getPatternAttr(ke.size,0,8),Ze=v.getPatternAttr(ke.solidity,0,.3),Ke=Ae.uid;v.pattern(Me,"point",De,Ke,We,Ve,Ze,void 0,ke.fillmode,_e,Ye,Pe)}else Ae.fillcolor&&Me.call(d.fill,Ae.fillcolor)}v.singleFillStyle=function(Me,Ae){var De=i.select(Me.node()),ke=De.data(),We=((ke[0]||[])[0]||{}).trace||{};h(Me,We,Ae)},v.fillGroupStyle=function(Me,Ae){Me.style("stroke-width",0).each(function(De){var ke=i.select(this);De[0].trace&&h(ke,De[0].trace,Ae)})};var x=e(90998);v.symbolNames=[],v.symbolFuncs=[],v.symbolBackOffs=[],v.symbolNeedLines={},v.symbolNoDot={},v.symbolNoFill={},v.symbolList=[],Object.keys(x).forEach(function(Me){var Ae=x[Me],De=Ae.n;v.symbolList.push(De,String(De),Me,De+100,String(De+100),Me+"-open"),v.symbolNames[De]=Me,v.symbolFuncs[De]=Ae.f,v.symbolBackOffs[De]=Ae.backoff||0,Ae.needLine&&(v.symbolNeedLines[De]=!0),Ae.noDot?v.symbolNoDot[De]=!0:v.symbolList.push(De+200,String(De+200),Me+"-dot",De+300,String(De+300),Me+"-open-dot"),Ae.noFill&&(v.symbolNoFill[De]=!0)});var C=v.symbolNames.length,D="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";v.symbolNumber=function(Me){if(y(Me))Me=+Me;else if(typeof Me=="string"){var Ae=0;Me.indexOf("-open")>0&&(Ae=100,Me=Me.replace("-open","")),Me.indexOf("-dot")>0&&(Ae+=200,Me=Me.replace("-dot","")),Me=v.symbolNames.indexOf(Me),Me>=0&&(Me+=Ae)}return Me%100>=C||Me>=400?0:Math.floor(Math.max(Me,0))};function L(Me,Ae,De,ke){var We=Me%100;return v.symbolFuncs[We](Ae,De,ke)+(Me>=200?D:"")}var w={x1:1,x2:0,y1:0,y2:0},M={x1:0,x2:0,y1:1,y2:0},S=t("~f"),f={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:w},horizontalreversed:{node:"linearGradient",attrs:w,reversed:!0},vertical:{node:"linearGradient",attrs:M},verticalreversed:{node:"linearGradient",attrs:M,reversed:!0}};v.gradient=function(Me,Ae,De,ke,We,_e){for(var Ye=We.length,Pe=f[ke],Ve=new Array(Ye),Ze=0;Ze=100;var Ze=Ie(Me,De),Ke=ae(Me,De);Ae.attr("d",L(Ve,Pe,Ze,Ke))}var lt=!1,vt,mt,Et;if(Me.so)Et=Ye.outlierwidth,mt=Ye.outliercolor,vt=_e.outliercolor;else{var et=(Ye||{}).width;Et=(Me.mlw+1||et+1||(Me.trace?(Me.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in Me?mt=Me.mlcc=ke.lineScale(Me.mlc):m.isArrayOrTypedArray(Ye.color)?mt=d.defaultLine:mt=Ye.color,m.isArrayOrTypedArray(_e.color)&&(vt=d.defaultLine,lt=!0),"mc"in Me?vt=Me.mcc=ke.markerScale(Me.mc):vt=_e.color||"rgba(0,0,0,0)",ke.selectedColorFn&&(vt=ke.selectedColorFn(Me))}if(Me.om)Ae.call(d.stroke,vt).style({"stroke-width":(Et||1)+"px",fill:"none"});else{Ae.style("stroke-width",(Me.isBlank?0:Et)+"px");var Ue=_e.gradient,Be=Me.mgt;Be?lt=!0:Be=Ue&&Ue.type,m.isArrayOrTypedArray(Be)&&(Be=Be[0],f[Be]||(Be=0));var rt=_e.pattern,ot=rt&&v.getPatternAttr(rt.shape,Me.i,"");if(Be&&Be!=="none"){var qe=Me.mgc;qe?lt=!0:qe=Ue.color;var Oe=De.uid;lt&&(Oe+="-"+Me.i),v.gradient(Ae,We,Oe,Be,[[0,qe],[1,vt]],"fill")}else if(ot){var Ce=v.getPatternAttr(rt.bgcolor,Me.i,null),pe=v.getPatternAttr(rt.fgcolor,Me.i,null),be=rt.fgopacity,Re=v.getPatternAttr(rt.size,Me.i,8),He=v.getPatternAttr(rt.solidity,Me.i,.3),st=Me.mcc||m.isArrayOrTypedArray(rt.shape)||m.isArrayOrTypedArray(rt.bgcolor)||m.isArrayOrTypedArray(rt.size)||m.isArrayOrTypedArray(rt.solidity),ct=De.uid;st&&(ct+="-"+Me.i),v.pattern(Ae,"point",We,ct,ot,Re,He,Me.mcc,rt.fillmode,Ce,pe,be)}else d.fill(Ae,vt);Et&&d.stroke(Ae,mt)}},v.makePointStyleFns=function(Me){var Ae={},De=Me.marker;return Ae.markerScale=v.tryColorscale(De,""),Ae.lineScale=v.tryColorscale(De,"line"),l.traceIs(Me,"symbols")&&(Ae.ms2mrc=b.isBubble(Me)?g(Me):function(){return(De.size||6)/2}),Me.selectedpoints&&m.extendFlat(Ae,v.makeSelectedPointStyleFns(Me)),Ae},v.makeSelectedPointStyleFns=function(Me){var Ae={},De=Me.selected||{},ke=Me.unselected||{},We=Me.marker||{},_e=De.marker||{},Ye=ke.marker||{},Pe=We.opacity,Ve=_e.opacity,Ze=Ye.opacity,Ke=Ve!==void 0,lt=Ze!==void 0;(m.isArrayOrTypedArray(Pe)||Ke||lt)&&(Ae.selectedOpacityFn=function(qe){var Oe=qe.mo===void 0?We.opacity:qe.mo;return qe.selected?Ke?Ve:Oe:lt?Ze:s*Oe});var vt=We.color,mt=_e.color,Et=Ye.color;(mt||Et)&&(Ae.selectedColorFn=function(qe){var Oe=qe.mcc||vt;return qe.selected?mt||Oe:Et||Oe});var et=We.size,Ue=_e.size,Be=Ye.size,rt=Ue!==void 0,ot=Be!==void 0;return l.traceIs(Me,"symbols")&&(rt||ot)&&(Ae.selectedSizeFn=function(qe){var Oe=qe.mrc||et/2;return qe.selected?rt?Ue/2:Oe:ot?Be/2:Oe}),Ae},v.makeSelectedTextStyleFns=function(Me){var Ae={},De=Me.selected||{},ke=Me.unselected||{},We=Me.textfont||{},_e=De.textfont||{},Ye=ke.textfont||{},Pe=We.color,Ve=_e.color,Ze=Ye.color;return Ae.selectedTextColorFn=function(Ke){var lt=Ke.tc||Pe;return Ke.selected?Ve||lt:Ze||(Ve?lt:d.addOpacity(lt,s))},Ae},v.selectedPointStyle=function(Me,Ae){if(!(!Me.size()||!Ae.selectedpoints)){var De=v.makeSelectedPointStyleFns(Ae),ke=Ae.marker||{},We=[];De.selectedOpacityFn&&We.push(function(_e,Ye){_e.style("opacity",De.selectedOpacityFn(Ye))}),De.selectedColorFn&&We.push(function(_e,Ye){d.fill(_e,De.selectedColorFn(Ye))}),De.selectedSizeFn&&We.push(function(_e,Ye){var Pe=Ye.mx||ke.symbol||0,Ve=De.selectedSizeFn(Ye);_e.attr("d",L(v.symbolNumber(Pe),Ve,Ie(Ye,Ae),ae(Ye,Ae))),Ye.mrc2=Ve}),We.length&&Me.each(function(_e){for(var Ye=i.select(this),Pe=0;Pe0?De:0}v.textPointStyle=function(Me,Ae,De){if(!!Me.size()){var ke;if(Ae.selectedpoints){var We=v.makeSelectedTextStyleFns(Ae);ke=We.selectedTextColorFn}var _e=Ae.texttemplate,Ye=De._fullLayout;Me.each(function(Pe){var Ve=i.select(this),Ze=_e?m.extractOption(Pe,Ae,"txt","texttemplate"):m.extractOption(Pe,Ae,"tx","text");if(!Ze&&Ze!==0){Ve.remove();return}if(_e){var Ke=Ae._module.formatLabels,lt=Ke?Ke(Pe,Ae,Ye):{},vt={};A(vt,Ae,Pe.i);var mt=Ae._meta||{};Ze=m.texttemplateString(Ze,lt,Ye._d3locale,vt,Pe,mt)}var Et=Pe.tp||Ae.textposition,et=k(Pe,Ae),Ue=ke?ke(Pe):Pe.tc||Ae.textfont.color;Ve.call(v.font,Pe.tf||Ae.textfont.family,et,Ue).text(Ze).call(u.convertToTspans,De).call(E,Et,et,Pe.mrc)})}},v.selectedTextStyle=function(Me,Ae){if(!(!Me.size()||!Ae.selectedpoints)){var De=v.makeSelectedTextStyleFns(Ae);Me.each(function(ke){var We=i.select(this),_e=De.selectedTextColorFn(ke),Ye=ke.tp||Ae.textposition,Pe=k(ke,Ae);d.fill(We,_e);var Ve=l.traceIs(Ae,"bar-like");E(We,Ye,Pe,ke.mrc2||ke.mrc,Ve)})}};var O=.5;v.smoothopen=function(Me,Ae){if(Me.length<3)return"M"+Me.join("L");var De="M"+Me[0],ke=[],We;for(We=1;We=Ve||qe>=Ke&&qe<=Ve)&&(Oe<=lt&&Oe>=Ze||Oe>=lt&&Oe<=Ze)&&(Me=[qe,Oe])}return Me}v.applyBackoff=ie,v.makeTester=function(){var Me=m.ensureSingleById(i.select("body"),"svg","js-plotly-tester",function(De){De.attr(a.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),Ae=m.ensureSingle(Me,"path","js-reference-point",function(De){De.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});v.tester=Me,v.testref=Ae},v.savedBBoxes={};var le=0,he=1e4;v.bBox=function(Me,Ae,De){De||(De=$(Me));var ke;if(De){if(ke=v.savedBBoxes[De],ke)return m.extendFlat({},ke)}else if(Me.childNodes.length===1){var We=Me.childNodes[0];if(De=$(We),De){var _e=+We.getAttribute("x")||0,Ye=+We.getAttribute("y")||0,Pe=We.getAttribute("transform");if(!Pe){var Ve=v.bBox(We,!1,De);return _e&&(Ve.left+=_e,Ve.right+=_e),Ye&&(Ve.top+=Ye,Ve.bottom+=Ye),Ve}if(De+="~"+_e+"~"+Ye+"~"+Pe,ke=v.savedBBoxes[De],ke)return m.extendFlat({},ke)}}var Ze,Ke;Ae?Ze=Me:(Ke=v.tester.node(),Ze=Me.cloneNode(!0),Ke.appendChild(Ze)),i.select(Ze).attr("transform",null).call(u.positionText,0,0);var lt=Ze.getBoundingClientRect(),vt=v.testref.node().getBoundingClientRect();Ae||Ke.removeChild(Ze);var mt={height:lt.height,width:lt.width,left:lt.left-vt.left,top:lt.top-vt.top,right:lt.right-vt.left,bottom:lt.bottom-vt.top};return le>=he&&(v.savedBBoxes={},le=0),De&&(v.savedBBoxes[De]=mt),le++,m.extendFlat({},mt)};function $(Me){var Ae=Me.getAttribute("data-unformatted");if(Ae!==null)return Ae+Me.getAttribute("data-math")+Me.getAttribute("text-anchor")+Me.getAttribute("style")}v.setClipUrl=function(Me,Ae,De){Me.attr("clip-path",Z(Ae,De))};function Z(Me,Ae){if(!Me)return null;var De=Ae._context,ke=De._exportedPlot?"":De._baseUrl||"";return ke?"url('"+ke+"#"+Me+"')":"url(#"+Me+")"}v.getTranslate=function(Me){var Ae=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,De=Me.attr?"attr":"getAttribute",ke=Me[De]("transform")||"",We=ke.replace(Ae,function(_e,Ye,Pe){return[Ye,Pe].join(" ")}).split(" ");return{x:+We[0]||0,y:+We[1]||0}},v.setTranslate=function(Me,Ae,De){var ke=/(\btranslate\(.*?\);?)/,We=Me.attr?"attr":"getAttribute",_e=Me.attr?"attr":"setAttribute",Ye=Me[We]("transform")||"";return Ae=Ae||0,De=De||0,Ye=Ye.replace(ke,"").trim(),Ye+=n(Ae,De),Ye=Ye.trim(),Me[_e]("transform",Ye),Ye},v.getScale=function(Me){var Ae=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,De=Me.attr?"attr":"getAttribute",ke=Me[De]("transform")||"",We=ke.replace(Ae,function(_e,Ye,Pe){return[Ye,Pe].join(" ")}).split(" ");return{x:+We[0]||1,y:+We[1]||1}},v.setScale=function(Me,Ae,De){var ke=/(\bscale\(.*?\);?)/,We=Me.attr?"attr":"getAttribute",_e=Me.attr?"attr":"setAttribute",Ye=Me[We]("transform")||"";return Ae=Ae||1,De=De||1,Ye=Ye.replace(ke,"").trim(),Ye+="scale("+Ae+","+De+")",Ye=Ye.trim(),Me[_e]("transform",Ye),Ye};var K=/\s*sc.*/;v.setPointGroupScale=function(Me,Ae,De){if(Ae=Ae||1,De=De||1,!!Me){var ke=Ae===1&&De===1?"":"scale("+Ae+","+De+")";Me.each(function(){var We=(this.getAttribute("transform")||"").replace(K,"");We+=ke,We=We.trim(),this.setAttribute("transform",We)})}};var Q=/translate\([^)]*\)\s*$/;v.setTextPointsScale=function(Me,Ae,De){!Me||Me.each(function(){var ke,We=i.select(this),_e=We.select("text");if(!!_e.node()){var Ye=parseFloat(_e.attr("x")||0),Pe=parseFloat(_e.attr("y")||0),Ve=(We.attr("transform")||"").match(Q);Ae===1&&De===1?ke=[]:ke=[n(Ye,Pe),"scale("+Ae+","+De+")",n(-Ye,-Pe)],Ve&&ke.push(Ve),We.attr("transform",ke.join(""))}})};function ae(Me,Ae){var De;return Me&&(De=Me.mf),De===void 0&&(De=Ae.marker&&Ae.marker.standoff||0),!Ae._geo&&!Ae._xA?-De:De}v.getMarkerStandoff=ae;var fe=Math.atan2,te=Math.cos,ne=Math.sin;function ce(Me,Ae){var De=Ae[0],ke=Ae[1];return[De*te(Me)-ke*ne(Me),De*ne(Me)+ke*te(Me)]}var oe,de,we,Se,Te,Fe;function Ie(Me,Ae){var De=Me.ma;De===void 0&&(De=Ae.marker.angle||0);var ke,We,_e=Ae.marker.angleref;if(_e==="previous"||_e==="north"){if(Ae._geo){var Ye=Ae._geo.project(Me.lonlat);ke=Ye[0],We=Ye[1]}else{var Pe=Ae._xA,Ve=Ae._yA;if(Pe&&Ve)ke=Pe.c2p(Me.x),We=Ve.c2p(Me.y);else return 90}if(Ae._geo){var Ze=Me.lonlat[0],Ke=Me.lonlat[1],lt=Ae._geo.project([Ze,Ke+1e-5]),vt=Ae._geo.project([Ze+1e-5,Ke]),mt=fe(vt[1]-We,vt[0]-ke),Et=fe(lt[1]-We,lt[0]-ke),et;if(_e==="north")et=De/180*Math.PI;else if(_e==="previous"){var Ue=Ze/180*Math.PI,Be=Ke/180*Math.PI,rt=oe/180*Math.PI,ot=de/180*Math.PI,qe=rt-Ue,Oe=te(ot)*ne(qe),Ce=ne(ot)*te(Be)-te(ot)*ne(Be)*te(qe);et=-fe(Oe,Ce)-Math.PI,oe=Ze,de=Ke}var pe=ce(mt,[te(et),0]),be=ce(Et,[ne(et),0]);De=fe(pe[1]+be[1],pe[0]+be[0])/Math.PI*180,_e==="previous"&&!(Fe===Ae.uid&&Me.i===Te+1)&&(De=null)}if(_e==="previous"&&!Ae._geo)if(Fe===Ae.uid&&Me.i===Te+1&&y(ke)&&y(We)){var Re=ke-we,He=We-Se,st=Ae.line&&Ae.line.shape||"",ct=st.slice(st.length-1);ct==="h"&&(He=0),ct==="v"&&(Re=0),De+=fe(He,Re)/Math.PI*180+90}else De=null}return we=ke,Se=We,Te=Me.i,Fe=Ae.uid,De}v.getMarkerAngle=Ie},90998:function(R,F,e){var i=e(95616),m=e(39898).round,t="M0,0Z",y=Math.sqrt(2),p=Math.sqrt(3),l=Math.PI,d=Math.cos,r=Math.sin;R.exports={circle:{n:0,f:function(b,g,A){if(n(g))return t;var v=m(b,2),h="M"+v+",0A"+v+","+v+" 0 1,1 0,-"+v+"A"+v+","+v+" 0 0,1 "+v+",0Z";return A?s(g,A,h):h}},square:{n:1,f:function(b,g,A){if(n(g))return t;var v=m(b,2);return s(g,A,"M"+v+","+v+"H-"+v+"V-"+v+"H"+v+"Z")}},diamond:{n:2,f:function(b,g,A){if(n(g))return t;var v=m(b*1.3,2);return s(g,A,"M"+v+",0L0,"+v+"L-"+v+",0L0,-"+v+"Z")}},cross:{n:3,f:function(b,g,A){if(n(g))return t;var v=m(b*.4,2),h=m(b*1.2,2);return s(g,A,"M"+h+","+v+"H"+v+"V"+h+"H-"+v+"V"+v+"H-"+h+"V-"+v+"H-"+v+"V-"+h+"H"+v+"V-"+v+"H"+h+"Z")}},x:{n:4,f:function(b,g,A){if(n(g))return t;var v=m(b*.8/y,2),h="l"+v+","+v,x="l"+v+",-"+v,C="l-"+v+",-"+v,D="l-"+v+","+v;return s(g,A,"M0,"+v+h+x+C+x+C+D+C+D+h+D+h+"Z")}},"triangle-up":{n:5,f:function(b,g,A){if(n(g))return t;var v=m(b*2/p,2),h=m(b/2,2),x=m(b,2);return s(g,A,"M-"+v+","+h+"H"+v+"L0,-"+x+"Z")}},"triangle-down":{n:6,f:function(b,g,A){if(n(g))return t;var v=m(b*2/p,2),h=m(b/2,2),x=m(b,2);return s(g,A,"M-"+v+",-"+h+"H"+v+"L0,"+x+"Z")}},"triangle-left":{n:7,f:function(b,g,A){if(n(g))return t;var v=m(b*2/p,2),h=m(b/2,2),x=m(b,2);return s(g,A,"M"+h+",-"+v+"V"+v+"L-"+x+",0Z")}},"triangle-right":{n:8,f:function(b,g,A){if(n(g))return t;var v=m(b*2/p,2),h=m(b/2,2),x=m(b,2);return s(g,A,"M-"+h+",-"+v+"V"+v+"L"+x+",0Z")}},"triangle-ne":{n:9,f:function(b,g,A){if(n(g))return t;var v=m(b*.6,2),h=m(b*1.2,2);return s(g,A,"M-"+h+",-"+v+"H"+v+"V"+h+"Z")}},"triangle-se":{n:10,f:function(b,g,A){if(n(g))return t;var v=m(b*.6,2),h=m(b*1.2,2);return s(g,A,"M"+v+",-"+h+"V"+v+"H-"+h+"Z")}},"triangle-sw":{n:11,f:function(b,g,A){if(n(g))return t;var v=m(b*.6,2),h=m(b*1.2,2);return s(g,A,"M"+h+","+v+"H-"+v+"V-"+h+"Z")}},"triangle-nw":{n:12,f:function(b,g,A){if(n(g))return t;var v=m(b*.6,2),h=m(b*1.2,2);return s(g,A,"M-"+v+","+h+"V-"+v+"H"+h+"Z")}},pentagon:{n:13,f:function(b,g,A){if(n(g))return t;var v=m(b*.951,2),h=m(b*.588,2),x=m(-b,2),C=m(b*-.309,2),D=m(b*.809,2);return s(g,A,"M"+v+","+C+"L"+h+","+D+"H-"+h+"L-"+v+","+C+"L0,"+x+"Z")}},hexagon:{n:14,f:function(b,g,A){if(n(g))return t;var v=m(b,2),h=m(b/2,2),x=m(b*p/2,2);return s(g,A,"M"+x+",-"+h+"V"+h+"L0,"+v+"L-"+x+","+h+"V-"+h+"L0,-"+v+"Z")}},hexagon2:{n:15,f:function(b,g,A){if(n(g))return t;var v=m(b,2),h=m(b/2,2),x=m(b*p/2,2);return s(g,A,"M-"+h+","+x+"H"+h+"L"+v+",0L"+h+",-"+x+"H-"+h+"L-"+v+",0Z")}},octagon:{n:16,f:function(b,g,A){if(n(g))return t;var v=m(b*.924,2),h=m(b*.383,2);return s(g,A,"M-"+h+",-"+v+"H"+h+"L"+v+",-"+h+"V"+h+"L"+h+","+v+"H-"+h+"L-"+v+","+h+"V-"+h+"Z")}},star:{n:17,f:function(b,g,A){if(n(g))return t;var v=b*1.4,h=m(v*.225,2),x=m(v*.951,2),C=m(v*.363,2),D=m(v*.588,2),L=m(-v,2),w=m(v*-.309,2),M=m(v*.118,2),S=m(v*.809,2),f=m(v*.382,2);return s(g,A,"M"+h+","+w+"H"+x+"L"+C+","+M+"L"+D+","+S+"L0,"+f+"L-"+D+","+S+"L-"+C+","+M+"L-"+x+","+w+"H-"+h+"L0,"+L+"Z")}},hexagram:{n:18,f:function(b,g,A){if(n(g))return t;var v=m(b*.66,2),h=m(b*.38,2),x=m(b*.76,2);return s(g,A,"M-"+x+",0l-"+h+",-"+v+"h"+x+"l"+h+",-"+v+"l"+h+","+v+"h"+x+"l-"+h+","+v+"l"+h+","+v+"h-"+x+"l-"+h+","+v+"l-"+h+",-"+v+"h-"+x+"Z")}},"star-triangle-up":{n:19,f:function(b,g,A){if(n(g))return t;var v=m(b*p*.8,2),h=m(b*.8,2),x=m(b*1.6,2),C=m(b*4,2),D="A "+C+","+C+" 0 0 1 ";return s(g,A,"M-"+v+","+h+D+v+","+h+D+"0,-"+x+D+"-"+v+","+h+"Z")}},"star-triangle-down":{n:20,f:function(b,g,A){if(n(g))return t;var v=m(b*p*.8,2),h=m(b*.8,2),x=m(b*1.6,2),C=m(b*4,2),D="A "+C+","+C+" 0 0 1 ";return s(g,A,"M"+v+",-"+h+D+"-"+v+",-"+h+D+"0,"+x+D+v+",-"+h+"Z")}},"star-square":{n:21,f:function(b,g,A){if(n(g))return t;var v=m(b*1.1,2),h=m(b*2,2),x="A "+h+","+h+" 0 0 1 ";return s(g,A,"M-"+v+",-"+v+x+"-"+v+","+v+x+v+","+v+x+v+",-"+v+x+"-"+v+",-"+v+"Z")}},"star-diamond":{n:22,f:function(b,g,A){if(n(g))return t;var v=m(b*1.4,2),h=m(b*1.9,2),x="A "+h+","+h+" 0 0 1 ";return s(g,A,"M-"+v+",0"+x+"0,"+v+x+v+",0"+x+"0,-"+v+x+"-"+v+",0Z")}},"diamond-tall":{n:23,f:function(b,g,A){if(n(g))return t;var v=m(b*.7,2),h=m(b*1.4,2);return s(g,A,"M0,"+h+"L"+v+",0L0,-"+h+"L-"+v+",0Z")}},"diamond-wide":{n:24,f:function(b,g,A){if(n(g))return t;var v=m(b*1.4,2),h=m(b*.7,2);return s(g,A,"M0,"+h+"L"+v+",0L0,-"+h+"L-"+v+",0Z")}},hourglass:{n:25,f:function(b,g,A){if(n(g))return t;var v=m(b,2);return s(g,A,"M"+v+","+v+"H-"+v+"L"+v+",-"+v+"H-"+v+"Z")},noDot:!0},bowtie:{n:26,f:function(b,g,A){if(n(g))return t;var v=m(b,2);return s(g,A,"M"+v+","+v+"V-"+v+"L-"+v+","+v+"V-"+v+"Z")},noDot:!0},"circle-cross":{n:27,f:function(b,g,A){if(n(g))return t;var v=m(b,2);return s(g,A,"M0,"+v+"V-"+v+"M"+v+",0H-"+v+"M"+v+",0A"+v+","+v+" 0 1,1 0,-"+v+"A"+v+","+v+" 0 0,1 "+v+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(b,g,A){if(n(g))return t;var v=m(b,2),h=m(b/y,2);return s(g,A,"M"+h+","+h+"L-"+h+",-"+h+"M"+h+",-"+h+"L-"+h+","+h+"M"+v+",0A"+v+","+v+" 0 1,1 0,-"+v+"A"+v+","+v+" 0 0,1 "+v+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(b,g,A){if(n(g))return t;var v=m(b,2);return s(g,A,"M0,"+v+"V-"+v+"M"+v+",0H-"+v+"M"+v+","+v+"H-"+v+"V-"+v+"H"+v+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(b,g,A){if(n(g))return t;var v=m(b,2);return s(g,A,"M"+v+","+v+"L-"+v+",-"+v+"M"+v+",-"+v+"L-"+v+","+v+"M"+v+","+v+"H-"+v+"V-"+v+"H"+v+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(b,g,A){if(n(g))return t;var v=m(b*1.3,2);return s(g,A,"M"+v+",0L0,"+v+"L-"+v+",0L0,-"+v+"ZM0,-"+v+"V"+v+"M-"+v+",0H"+v)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(b,g,A){if(n(g))return t;var v=m(b*1.3,2),h=m(b*.65,2);return s(g,A,"M"+v+",0L0,"+v+"L-"+v+",0L0,-"+v+"ZM-"+h+",-"+h+"L"+h+","+h+"M-"+h+","+h+"L"+h+",-"+h)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(b,g,A){if(n(g))return t;var v=m(b*1.4,2);return s(g,A,"M0,"+v+"V-"+v+"M"+v+",0H-"+v)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(b,g,A){if(n(g))return t;var v=m(b,2);return s(g,A,"M"+v+","+v+"L-"+v+",-"+v+"M"+v+",-"+v+"L-"+v+","+v)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(b,g,A){if(n(g))return t;var v=m(b*1.2,2),h=m(b*.85,2);return s(g,A,"M0,"+v+"V-"+v+"M"+v+",0H-"+v+"M"+h+","+h+"L-"+h+",-"+h+"M"+h+",-"+h+"L-"+h+","+h)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(b,g,A){if(n(g))return t;var v=m(b/2,2),h=m(b,2);return s(g,A,"M"+v+","+h+"V-"+h+"M"+(v-h)+",-"+h+"V"+h+"M"+h+","+v+"H-"+h+"M-"+h+","+(v-h)+"H"+h)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(b,g,A){if(n(g))return t;var v=m(b*1.2,2),h=m(b*1.6,2),x=m(b*.8,2);return s(g,A,"M-"+v+","+x+"L0,0M"+v+","+x+"L0,0M0,-"+h+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(b,g,A){if(n(g))return t;var v=m(b*1.2,2),h=m(b*1.6,2),x=m(b*.8,2);return s(g,A,"M-"+v+",-"+x+"L0,0M"+v+",-"+x+"L0,0M0,"+h+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(b,g,A){if(n(g))return t;var v=m(b*1.2,2),h=m(b*1.6,2),x=m(b*.8,2);return s(g,A,"M"+x+","+v+"L0,0M"+x+",-"+v+"L0,0M-"+h+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(b,g,A){if(n(g))return t;var v=m(b*1.2,2),h=m(b*1.6,2),x=m(b*.8,2);return s(g,A,"M-"+x+","+v+"L0,0M-"+x+",-"+v+"L0,0M"+h+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(b,g,A){if(n(g))return t;var v=m(b*1.4,2);return s(g,A,"M"+v+",0H-"+v)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(b,g,A){if(n(g))return t;var v=m(b*1.4,2);return s(g,A,"M0,"+v+"V-"+v)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(b,g,A){if(n(g))return t;var v=m(b,2);return s(g,A,"M"+v+",-"+v+"L-"+v+","+v)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(b,g,A){if(n(g))return t;var v=m(b,2);return s(g,A,"M"+v+","+v+"L-"+v+",-"+v)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(b,g,A){if(n(g))return t;var v=m(b,2),h=m(b*2,2);return s(g,A,"M0,0L-"+v+","+h+"H"+v+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(b,g,A){if(n(g))return t;var v=m(b,2),h=m(b*2,2);return s(g,A,"M0,0L-"+v+",-"+h+"H"+v+"Z")},noDot:!0},"arrow-left":{n:47,f:function(b,g,A){if(n(g))return t;var v=m(b*2,2),h=m(b,2);return s(g,A,"M0,0L"+v+",-"+h+"V"+h+"Z")},noDot:!0},"arrow-right":{n:48,f:function(b,g,A){if(n(g))return t;var v=m(b*2,2),h=m(b,2);return s(g,A,"M0,0L-"+v+",-"+h+"V"+h+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(b,g,A){if(n(g))return t;var v=m(b,2),h=m(b*2,2);return s(g,A,"M-"+v+",0H"+v+"M0,0L-"+v+","+h+"H"+v+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(b,g,A){if(n(g))return t;var v=m(b,2),h=m(b*2,2);return s(g,A,"M-"+v+",0H"+v+"M0,0L-"+v+",-"+h+"H"+v+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(b,g,A){if(n(g))return t;var v=m(b*2,2),h=m(b,2);return s(g,A,"M0,-"+h+"V"+h+"M0,0L"+v+",-"+h+"V"+h+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(b,g,A){if(n(g))return t;var v=m(b*2,2),h=m(b,2);return s(g,A,"M0,-"+h+"V"+h+"M0,0L-"+v+",-"+h+"V"+h+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(b,g,A){if(n(g))return t;var v=l/2.5,h=2*b*d(v),x=2*b*r(v);return s(g,A,"M0,0L"+-h+","+x+"L"+h+","+x+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(b,g,A){if(n(g))return t;var v=l/4,h=2*b*d(v),x=2*b*r(v);return s(g,A,"M0,0L"+-h+","+x+"A "+2*b+","+2*b+" 0 0 1 "+h+","+x+"Z")},backoff:.4,noDot:!0}};function n(b){return b===null}var u,a,o,c;function s(b,g,A){if((!b||b%360===0)&&!g)return A;if(o===b&&c===g&&u===A)return a;o=b,c=g,u=A;function v(O,G){var z=d(O),U=r(O),H=G[0],B=G[1]+(g||0);return[H*z-B*U,H*U+B*z]}for(var h=b/180*l,x=0,C=0,D=i(A),L="",w=0;w0,b=d._context.staticPlot;r.each(function(g){var A=g[0].trace,v=A.error_x||{},h=A.error_y||{},x;A.ids&&(x=function(w){return w.id});var C=y.hasMarkers(A)&&A.marker.maxdisplayed>0;!h.visible&&!v.visible&&(g=[]);var D=i.select(this).selectAll("g.errorbar").data(g,x);if(D.exit().remove(),!!g.length){v.visible||D.selectAll("path.xerror").remove(),h.visible||D.selectAll("path.yerror").remove(),D.style("opacity",1);var L=D.enter().append("g").classed("errorbar",!0);s&&L.style("opacity",0).transition().duration(u.duration).style("opacity",1),t.setClipUrl(D,n.layerClipId,d),D.each(function(w){var M=i.select(this),S=p(w,o,c);if(!(C&&!w.vis)){var f,P=M.select("path.yerror");if(h.visible&&m(S.x)&&m(S.yh)&&m(S.ys)){var E=h.width;f="M"+(S.x-E)+","+S.yh+"h"+2*E+"m-"+E+",0V"+S.ys,S.noYS||(f+="m-"+E+",0h"+2*E),a=!P.size(),a?P=M.append("path").style("vector-effect",b?"none":"non-scaling-stroke").classed("yerror",!0):s&&(P=P.transition().duration(u.duration).ease(u.easing)),P.attr("d",f)}else P.remove();var k=M.select("path.xerror");if(v.visible&&m(S.y)&&m(S.xh)&&m(S.xs)){var O=(v.copy_ystyle?h:v).width;f="M"+S.xh+","+(S.y-O)+"v"+2*O+"m0,-"+O+"H"+S.xs,S.noXS||(f+="m0,-"+O+"v"+2*O),a=!k.size(),a?k=M.append("path").style("vector-effect",b?"none":"non-scaling-stroke").classed("xerror",!0):s&&(k=k.transition().duration(u.duration).ease(u.easing)),k.attr("d",f)}else k.remove()}})}})};function p(l,d,r){var n={x:d.c2p(l.x),y:r.c2p(l.y)};return l.yh!==void 0&&(n.yh=r.c2p(l.yh),n.ys=r.c2p(l.ys),m(n.ys)||(n.noYS=!0,n.ys=r.c2p(l.ys,!0))),l.xh!==void 0&&(n.xh=d.c2p(l.xh),n.xs=d.c2p(l.xs),m(n.xs)||(n.noXS=!0,n.xs=d.c2p(l.xs,!0))),n}},62662:function(R,F,e){var i=e(39898),m=e(7901);R.exports=function(y){y.each(function(p){var l=p[0].trace,d=l.error_y||{},r=l.error_x||{},n=i.select(this);n.selectAll("path.yerror").style("stroke-width",d.thickness+"px").call(m.stroke,d.color),r.copy_ystyle&&(r=d),n.selectAll("path.xerror").style("stroke-width",r.thickness+"px").call(m.stroke,r.color)})}},77914:function(R,F,e){var i=e(41940),m=e(528).hoverlabel,t=e(1426).extendFlat;R.exports={hoverlabel:{bgcolor:t({},m.bgcolor,{arrayOk:!0}),bordercolor:t({},m.bordercolor,{arrayOk:!0}),font:i({arrayOk:!0,editType:"none"}),align:t({},m.align,{arrayOk:!0}),namelength:t({},m.namelength,{arrayOk:!0}),editType:"none"}}},30732:function(R,F,e){var i=e(71828),m=e(73972);R.exports=function(p){var l=p.calcdata,d=p._fullLayout;function r(c){return function(s){return i.coerceHoverinfo({hoverinfo:s},{_module:c._module},d)}}for(var n=0;n=0&&n.indexMe[0]._length||ct<0||ct>Ae[0]._length)return o.unhoverRaw(ae,fe)}if(fe.pointerX=st+Me[0]._offset,fe.pointerY=ct+Ae[0]._offset,"xval"in fe?lt=b.flat(oe,fe.xval):lt=b.p2c(Me,st),"yval"in fe?vt=b.flat(oe,fe.yval):vt=b.p2c(Ae,ct),!m(lt[0])||!m(vt[0]))return y.warn("Fx.hover failed",fe,ae),o.unhoverRaw(ae,fe)}var Ut=1/0;function Gt(cr,zr){for(Et=0;Etpe&&(Ze.splice(0,pe),Ut=Ze[0].distance),Te&&Ve!==0&&Ze.length===0){Ce.distance=Ve,Ce.index=!1;var bn=Ue._module.hoverPoints(Ce,qe,Oe,"closest",{hoverLayer:de._hoverlayer});if(bn&&(bn=bn.filter(function(ra){return ra.spikeDistance<=Ve})),bn&&bn.length){var _n,Qn=bn.filter(function(ra){return ra.xa.showspikes&&ra.xa.spikesnap!=="hovered data"});if(Qn.length){var sa=Qn[0];m(sa.x0)&&m(sa.y0)&&(_n=tr(sa),(!be.vLinePoint||be.vLinePoint.spikeDistance>_n.spikeDistance)&&(be.vLinePoint=_n))}var aa=bn.filter(function(ra){return ra.ya.showspikes&&ra.ya.spikesnap!=="hovered data"});if(aa.length){var fa=aa[0];m(fa.x0)&&m(fa.y0)&&(_n=tr(fa),(!be.hLinePoint||be.hLinePoint.spikeDistance>_n.spikeDistance)&&(be.hLinePoint=_n))}}}}}Gt();function Ft(cr,zr,kr){for(var un=null,xn=1/0,An,bn=0;bn0&&Math.abs(cr.distance)Mt-1;Xe--)Mr(Ze[Xe]);Ze=Kt,jt()}var je=ae._hoverdata,It=[],_t=Z(ae),Zt=K(ae);for(mt=0;mt1||Ze.length>1)||Ye==="closest"&&Re&&Ze.length>1,Kr=a.combine(de.plot_bgcolor||a.background,de.paper_bgcolor),Fn=O(Ze,{gd:ae,hovermode:Ye,rotateLabels:wn,bgColor:Kr,container:de._hoverlayer,outerContainer:de._paper.node(),commonLabelOpts:de.hoverlabel,hoverdistance:de.hoverdistance}),In=Fn.hoverLabels;if(b.isUnifiedHover(Ye)||(z(In,wn,de,Fn.commonLabelBoundingBox),B(In,wn,de._invScaleX,de._invScaleY)),ce&&ce.tagName){var mr=s.getComponentMethod("annotations","hasClickToShow")(ae,It);n(i.select(ce),mr?"pointer":"")}!ce||ne||!re(ae,fe,je)||(je&&ae.emit("plotly_unhover",{event:fe,points:je}),ae.emit("plotly_hover",{event:fe,points:ae._hoverdata,xaxes:Me,yaxes:Ae,xvals:lt,yvals:vt}))}function E(ae){return[ae.trace.index,ae.index,ae.x0,ae.y0,ae.name,ae.attr,ae.xa?ae.xa._id:"",ae.ya?ae.ya._id:""].join(",")}var k=/([\s\S]*)<\/extra>/;function O(ae,fe){var te=fe.gd,ne=te._fullLayout,ce=fe.hovermode,oe=fe.rotateLabels,de=fe.bgColor,we=fe.container,Se=fe.outerContainer,Te=fe.commonLabelOpts||{};if(ae.length===0)return[[]];var Fe=fe.fontFamily||g.HOVERFONT,Ie=fe.fontSize||g.HOVERFONTSIZE,Me=ae[0],Ae=Me.xa,De=Me.ya,ke=ce.charAt(0),We=ke+"Label",_e=Me[We];if(_e===void 0&&Ae.type==="multicategory")for(var Ye=0;Yene.width-Zt?(je=ne.width-Zt,zt.attr("d","M"+(Zt-w)+",0L"+Zt+","+_t+w+"v"+_t+(M*2+Xe.height)+"H-"+Zt+"V"+_t+w+"H"+(Zt-w*2)+"Z")):zt.attr("d","M0,0L"+w+","+_t+w+"H"+Zt+"v"+_t+(M*2+Xe.height)+"H-"+Zt+"V"+_t+w+"H-"+w+"Z"),Be.minX=je-Zt,Be.maxX=je+Zt,Ae.side==="top"?(Be.minY=It-(M*2+Xe.height),Be.maxY=It-M):(Be.minY=It+M,Be.maxY=It+(M*2+Xe.height))}else{var rr,sr,nr;De.side==="right"?(rr="start",sr=1,nr="",je=Ae._offset+Ae._length):(rr="end",sr=-1,nr="-",je=Ae._offset),It=De._offset+(Me.y0+Me.y1)/2,Vt.attr("text-anchor",rr),zt.attr("d","M0,0L"+nr+w+","+w+"V"+(M+Xe.height/2)+"h"+nr+(M*2+Xe.width)+"V-"+(M+Xe.height/2)+"H"+nr+w+"V-"+w+"Z"),Be.minY=It-(M+Xe.height/2),Be.maxY=It+(M+Xe.height/2),De.side==="right"?(Be.minX=je+w,Be.maxX=je+w+(M*2+Xe.width)):(Be.minX=je-w-(M*2+Xe.width),Be.maxX=je-w);var Bt=Xe.height/2,hr=Ve-Xe.top-Bt,pr="clip"+ne._uid+"commonlabel"+De._id,wr;if(je=0?wt=br:dr+Gt=0?wt=dr:ht+Gt=0?St=jt:Yt+Ft=0?St=Yt:ut+Ft=0,(Mt.idealAlign==="top"||!wn)&&Kr?(hr-=wr/2,Mt.anchor="end"):wn?(hr+=wr/2,Mt.anchor="start"):Mt.anchor="middle",Mt.crossPos=hr;else{if(Mt.pos=hr,wn=Bt+pr/2+Br<=Ze,Kr=Bt-pr/2-Br>=0,(Mt.idealAlign==="left"||!wn)&&Kr)Bt-=pr/2,Mt.anchor="end";else if(wn)Bt+=pr/2,Mt.anchor="start";else{Mt.anchor="middle";var Fn=Br/2,In=Bt+Fn-Ze,mr=Bt-Fn;In>0&&(Bt-=In),mr<0&&(Bt+=-mr)}Mt.crossPos=Bt}_t.attr("text-anchor",Mt.anchor),rr&&Zt.attr("text-anchor",Mt.anchor),zt.attr("transform",p(Bt,hr)+(oe?l(h):""))}),{hoverLabels:Dt,commonLabelBoundingBox:Be}}function G(ae,fe,te,ne,ce,oe){var de="",we="";ae.nameOverride!==void 0&&(ae.name=ae.nameOverride),ae.name&&(ae.trace._meta&&(ae.name=y.templateString(ae.name,ae.trace._meta)),de=le(ae.name,ae.nameLength));var Se=te.charAt(0),Te=Se==="x"?"y":"x";ae.zLabel!==void 0?(ae.xLabel!==void 0&&(we+="x: "+ae.xLabel+"
"),ae.yLabel!==void 0&&(we+="y: "+ae.yLabel+"
"),ae.trace.type!=="choropleth"&&ae.trace.type!=="choroplethmapbox"&&(we+=(we?"z: ":"")+ae.zLabel)):fe&&ae[Se+"Label"]===ce?we=ae[Te+"Label"]||"":ae.xLabel===void 0?ae.yLabel!==void 0&&ae.trace.type!=="scattercarpet"&&(we=ae.yLabel):ae.yLabel===void 0?we=ae.xLabel:we="("+ae.xLabel+", "+ae.yLabel+")",(ae.text||ae.text===0)&&!Array.isArray(ae.text)&&(we+=(we?"
":"")+ae.text),ae.extraText!==void 0&&(we+=(we?"
":"")+ae.extraText),oe&&we===""&&!ae.hovertemplate&&(de===""&&oe.remove(),we=de);var Fe=ae.hovertemplate||!1;if(Fe){var Ie=ae.hovertemplateLabels||ae;ae[Se+"Label"]!==ce&&(Ie[Se+"other"]=Ie[Se+"Val"],Ie[Se+"otherLabel"]=Ie[Se+"Label"]),we=y.hovertemplateString(Fe,Ie,ne._d3locale,ae.eventData[0]||{},ae.trace._meta),we=we.replace(k,function(Me,Ae){return de=le(Ae,ae.nameLength),""})}return[we,de]}function z(ae,fe,te,ne){var ce=fe?"xa":"ya",oe=fe?"ya":"xa",de=0,we=1,Se=ae.size(),Te=new Array(Se),Fe=0,Ie=ne.minX,Me=ne.maxX,Ae=ne.minY,De=ne.maxY,ke=function(qe){return qe*te._invScaleX},We=function(qe){return qe*te._invScaleY};ae.each(function(qe){var Oe=qe[ce],Ce=qe[oe],pe=Oe._id.charAt(0)==="x",be=Oe.range;Fe===0&&be&&be[0]>be[1]!==pe&&(we=-1);var Re=0,He=pe?te.width:te.height;if(te.hovermode==="x"||te.hovermode==="y"){var st=U(qe,fe),ct=qe.anchor,bt=ct==="end"?-1:1,Lt,Ut;if(ct==="middle")Lt=qe.crossPos+(pe?We(st.y-qe.by/2):ke(qe.bx/2+qe.tx2width/2)),Ut=Lt+(pe?We(qe.by):ke(qe.bx));else if(pe)Lt=qe.crossPos+We(w+st.y)-We(qe.by/2-w),Ut=Lt+We(qe.by);else{var Gt=ke(bt*w+st.x),Ft=Gt+ke(bt*qe.bx);Lt=qe.crossPos+Math.min(Gt,Ft),Ut=qe.crossPos+Math.max(Gt,Ft)}pe?Ae!==void 0&&De!==void 0&&Math.min(Ut,De)-Math.max(Lt,Ae)>1&&(Ce.side==="left"?(Re=Ce._mainLinePosition,He=te.width):He=Ce._mainLinePosition):Ie!==void 0&&Me!==void 0&&Math.min(Ut,Me)-Math.max(Lt,Ie)>1&&(Ce.side==="top"?(Re=Ce._mainLinePosition,He=te.height):He=Ce._mainLinePosition)}Te[Fe++]=[{datum:qe,traceIndex:qe.trace.index,dp:0,pos:qe.pos,posref:qe.posref,size:qe.by*(pe?C:1)/2,pmin:Re,pmax:He}]}),Te.sort(function(qe,Oe){return qe[0].posref-Oe[0].posref||we*(Oe[0].traceIndex-qe[0].traceIndex)});var _e,Ye,Pe,Ve,Ze,Ke,lt;function vt(qe){var Oe=qe[0],Ce=qe[qe.length-1];if(Ye=Oe.pmin-Oe.pos-Oe.dp+Oe.size,Pe=Ce.pos+Ce.dp+Ce.size-Oe.pmax,Ye>.01){for(Ze=qe.length-1;Ze>=0;Ze--)qe[Ze].dp+=Ye;_e=!1}if(!(Pe<.01)){if(Ye<-.01){for(Ze=qe.length-1;Ze>=0;Ze--)qe[Ze].dp-=Pe;_e=!1}if(!!_e){var pe=0;for(Ve=0;VeOe.pmax&&pe++;for(Ve=qe.length-1;Ve>=0&&!(pe<=0);Ve--)Ke=qe[Ve],Ke.pos>Oe.pmax-1&&(Ke.del=!0,pe--);for(Ve=0;Ve=0;Ze--)qe[Ze].dp-=Pe;for(Ve=qe.length-1;Ve>=0&&!(pe<=0);Ve--)Ke=qe[Ve],Ke.pos+Ke.dp+Ke.size>Oe.pmax&&(Ke.del=!0,pe--)}}}for(;!_e&&de<=Se;){for(de++,_e=!0,Ve=0;Ve.01&&et.pmin===Ue.pmin&&et.pmax===Ue.pmax){for(Ze=Et.length-1;Ze>=0;Ze--)Et[Ze].dp+=Ye;for(mt.push.apply(mt,Et),Te.splice(Ve+1,1),lt=0,Ze=mt.length-1;Ze>=0;Ze--)lt+=mt[Ze].dp;for(Pe=lt/mt.length,Ze=mt.length-1;Ze>=0;Ze--)mt[Ze].dp-=Pe;_e=!1}else Ve++}Te.forEach(vt)}for(Ve=Te.length-1;Ve>=0;Ve--){var Be=Te[Ve];for(Ze=Be.length-1;Ze>=0;Ze--){var rt=Be[Ze],ot=rt.datum;ot.offset=rt.dp,ot.del=rt.del}}}function U(ae,fe){var te=0,ne=ae.offset;return fe&&(ne*=-L,te=ae.offset*D),{x:te,y:ne}}function H(ae){var fe={start:1,end:-1,middle:0}[ae.anchor],te=fe*(w+M),ne=te+fe*(ae.txwidth+M),ce=ae.anchor==="middle";return ce&&(te-=ae.tx2width/2,ne+=ae.txwidth/2+M),{alignShift:fe,textShiftX:te,text2ShiftX:ne}}function B(ae,fe,te,ne){var ce=function(de){return de*te},oe=function(de){return de*ne};ae.each(function(de){var we=i.select(this);if(de.del)return we.remove();var Se=we.select("text.nums"),Te=de.anchor,Fe=Te==="end"?-1:1,Ie=H(de),Me=U(de,fe),Ae=Me.x,De=Me.y,ke=Te==="middle";we.select("path").attr("d",ke?"M-"+ce(de.bx/2+de.tx2width/2)+","+oe(De-de.by/2)+"h"+ce(de.bx)+"v"+oe(de.by)+"h-"+ce(de.bx)+"Z":"M0,0L"+ce(Fe*w+Ae)+","+oe(w+De)+"v"+oe(de.by/2-w)+"h"+ce(Fe*de.bx)+"v-"+oe(de.by)+"H"+ce(Fe*w+Ae)+"V"+oe(De-w)+"Z");var We=Ae+Ie.textShiftX,_e=De+de.ty0-de.by/2+M,Ye=de.textAlign||"auto";Ye!=="auto"&&(Ye==="left"&&Te!=="start"?(Se.attr("text-anchor","start"),We=ke?-de.bx/2-de.tx2width/2+M:-de.bx-M):Ye==="right"&&Te!=="end"&&(Se.attr("text-anchor","end"),We=ke?de.bx/2-de.tx2width/2-M:de.bx+M)),Se.call(r.positionText,ce(We),oe(_e)),de.tx2width&&(we.select("text.name").call(r.positionText,ce(Ie.text2ShiftX+Ie.alignShift*M+Ae),oe(De+de.ty0-de.by/2+M)),we.select("rect").call(u.setRect,ce(Ie.text2ShiftX+(Ie.alignShift-1)*de.tx2width/2+Ae),oe(De-de.by/2-1),ce(de.tx2width),oe(de.by+2)))})}function W(ae,fe){var te=ae.index,ne=ae.trace||{},ce=ae.cd[0],oe=ae.cd[te]||{};function de(Me){return Me||m(Me)&&Me===0}var we=Array.isArray(te)?function(Me,Ae){var De=y.castOption(ce,te,Me);return de(De)?De:y.extractOption({},ne,"",Ae)}:function(Me,Ae){return y.extractOption(oe,ne,Me,Ae)};function Se(Me,Ae,De){var ke=we(Ae,De);de(ke)&&(ae[Me]=ke)}if(Se("hoverinfo","hi","hoverinfo"),Se("bgcolor","hbg","hoverlabel.bgcolor"),Se("borderColor","hbc","hoverlabel.bordercolor"),Se("fontFamily","htf","hoverlabel.font.family"),Se("fontSize","hts","hoverlabel.font.size"),Se("fontColor","htc","hoverlabel.font.color"),Se("nameLength","hnl","hoverlabel.namelength"),Se("textAlign","hta","hoverlabel.align"),ae.posref=fe==="y"||fe==="closest"&&ne.orientation==="h"?ae.xa._offset+(ae.x0+ae.x1)/2:ae.ya._offset+(ae.y0+ae.y1)/2,ae.x0=y.constrain(ae.x0,0,ae.xa._length),ae.x1=y.constrain(ae.x1,0,ae.xa._length),ae.y0=y.constrain(ae.y0,0,ae.ya._length),ae.y1=y.constrain(ae.y1,0,ae.ya._length),ae.xLabelVal!==void 0&&(ae.xLabel="xLabel"in ae?ae.xLabel:c.hoverLabelText(ae.xa,ae.xLabelVal,ne.xhoverformat),ae.xVal=ae.xa.c2d(ae.xLabelVal)),ae.yLabelVal!==void 0&&(ae.yLabel="yLabel"in ae?ae.yLabel:c.hoverLabelText(ae.ya,ae.yLabelVal,ne.yhoverformat),ae.yVal=ae.ya.c2d(ae.yLabelVal)),ae.zLabelVal!==void 0&&ae.zLabel===void 0&&(ae.zLabel=String(ae.zLabelVal)),!isNaN(ae.xerr)&&!(ae.xa.type==="log"&&ae.xerr<=0)){var Te=c.tickText(ae.xa,ae.xa.c2l(ae.xerr),"hover").text;ae.xerrneg!==void 0?ae.xLabel+=" +"+Te+" / -"+c.tickText(ae.xa,ae.xa.c2l(ae.xerrneg),"hover").text:ae.xLabel+=" \xB1 "+Te,fe==="x"&&(ae.distance+=1)}if(!isNaN(ae.yerr)&&!(ae.ya.type==="log"&&ae.yerr<=0)){var Fe=c.tickText(ae.ya,ae.ya.c2l(ae.yerr),"hover").text;ae.yerrneg!==void 0?ae.yLabel+=" +"+Fe+" / -"+c.tickText(ae.ya,ae.ya.c2l(ae.yerrneg),"hover").text:ae.yLabel+=" \xB1 "+Fe,fe==="y"&&(ae.distance+=1)}var Ie=ae.hoverinfo||ae.trace.hoverinfo;return Ie&&Ie!=="all"&&(Ie=Array.isArray(Ie)?Ie:Ie.split("+"),Ie.indexOf("x")===-1&&(ae.xLabel=void 0),Ie.indexOf("y")===-1&&(ae.yLabel=void 0),Ie.indexOf("z")===-1&&(ae.zLabel=void 0),Ie.indexOf("text")===-1&&(ae.text=void 0),Ie.indexOf("name")===-1&&(ae.name=void 0)),ae}function q(ae,fe,te){var ne=te.container,ce=te.fullLayout,oe=ce._size,de=te.event,we=!!fe.hLinePoint,Se=!!fe.vLinePoint,Te,Fe;if(ne.selectAll(".spikeline").remove(),!!(Se||we)){var Ie=a.combine(ce.plot_bgcolor,ce.paper_bgcolor);if(we){var Me=fe.hLinePoint,Ae,De;Te=Me&&Me.xa,Fe=Me&&Me.ya;var ke=Fe.spikesnap;ke==="cursor"?(Ae=de.pointerX,De=de.pointerY):(Ae=Te._offset+Me.x,De=Fe._offset+Me.y);var We=t.readability(Me.color,Ie)<1.5?a.contrast(Ie):Me.color,_e=Fe.spikemode,Ye=Fe.spikethickness,Pe=Fe.spikecolor||We,Ve=c.getPxPosition(ae,Fe),Ze,Ke;if(_e.indexOf("toaxis")!==-1||_e.indexOf("across")!==-1){if(_e.indexOf("toaxis")!==-1&&(Ze=Ve,Ke=Ae),_e.indexOf("across")!==-1){var lt=Fe._counterDomainMin,vt=Fe._counterDomainMax;Fe.anchor==="free"&&(lt=Math.min(lt,Fe.position),vt=Math.max(vt,Fe.position)),Ze=oe.l+lt*oe.w,Ke=oe.l+vt*oe.w}ne.insert("line",":first-child").attr({x1:Ze,x2:Ke,y1:De,y2:De,"stroke-width":Ye,stroke:Pe,"stroke-dasharray":u.dashStyle(Fe.spikedash,Ye)}).classed("spikeline",!0).classed("crisp",!0),ne.insert("line",":first-child").attr({x1:Ze,x2:Ke,y1:De,y2:De,"stroke-width":Ye+2,stroke:Ie}).classed("spikeline",!0).classed("crisp",!0)}_e.indexOf("marker")!==-1&&ne.insert("circle",":first-child").attr({cx:Ve+(Fe.side!=="right"?Ye:-Ye),cy:De,r:Ye,fill:Pe}).classed("spikeline",!0)}if(Se){var mt=fe.vLinePoint,Et,et;Te=mt&&mt.xa,Fe=mt&&mt.ya;var Ue=Te.spikesnap;Ue==="cursor"?(Et=de.pointerX,et=de.pointerY):(Et=Te._offset+mt.x,et=Fe._offset+mt.y);var Be=t.readability(mt.color,Ie)<1.5?a.contrast(Ie):mt.color,rt=Te.spikemode,ot=Te.spikethickness,qe=Te.spikecolor||Be,Oe=c.getPxPosition(ae,Te),Ce,pe;if(rt.indexOf("toaxis")!==-1||rt.indexOf("across")!==-1){if(rt.indexOf("toaxis")!==-1&&(Ce=Oe,pe=et),rt.indexOf("across")!==-1){var be=Te._counterDomainMin,Re=Te._counterDomainMax;Te.anchor==="free"&&(be=Math.min(be,Te.position),Re=Math.max(Re,Te.position)),Ce=oe.t+(1-Re)*oe.h,pe=oe.t+(1-be)*oe.h}ne.insert("line",":first-child").attr({x1:Et,x2:Et,y1:Ce,y2:pe,"stroke-width":ot,stroke:qe,"stroke-dasharray":u.dashStyle(Te.spikedash,ot)}).classed("spikeline",!0).classed("crisp",!0),ne.insert("line",":first-child").attr({x1:Et,x2:Et,y1:Ce,y2:pe,"stroke-width":ot+2,stroke:Ie}).classed("spikeline",!0).classed("crisp",!0)}rt.indexOf("marker")!==-1&&ne.insert("circle",":first-child").attr({cx:Et,cy:Oe-(Te.side!=="top"?ot:-ot),r:ot,fill:qe}).classed("spikeline",!0)}}}function re(ae,fe,te){if(!te||te.length!==ae._hoverdata.length)return!0;for(var ne=te.length-1;ne>=0;ne--){var ce=te[ne],oe=ae._hoverdata[ne];if(ce.curveNumber!==oe.curveNumber||String(ce.pointNumber)!==String(oe.pointNumber)||String(ce.pointNumbers)!==String(oe.pointNumbers))return!0}return!1}function ie(ae,fe){return!fe||fe.vLinePoint!==ae._spikepoints.vLinePoint||fe.hLinePoint!==ae._spikepoints.hLinePoint}function le(ae,fe){return r.plainText(ae||"",{len:fe,allowedTags:["br","sub","sup","b","i","em"]})}function he(ae,fe){for(var te=fe.charAt(0),ne=[],ce=[],oe=[],de=0;de1)){delete c.grid;return}if(!A&&!v&&!h){var f=w("pattern")==="independent";f&&(A=!0)}L._hasSubplotGrid=A;var P=w("roworder"),E=P==="top to bottom",k=A?.2:.1,O=A?.3:.1,G,z;x&&c._splomGridDflt&&(G=c._splomGridDflt.xside,z=c._splomGridDflt.yside),L._domains={x:n("x",w,k,G,S),y:n("y",w,O,z,M,E)}}function n(o,c,s,b,g,A){var v=c(o+"gap",s),h=c("domain."+o);c(o+"side",b);for(var x=new Array(g),C=h[0],D=(h[1]-C)/(g-v),L=D*(1-v),w=0;w1);if(L===!1&&(u.legend=void 0),!(L===!1&&!o.uirevision)&&(s("uirevision",u.uirevision),L!==!1)){s("bgcolor",u.paper_bgcolor),s("bordercolor"),s("borderwidth");var w=m.coerceFont(s,"font",u.font),M=s("orientation"),S=M==="h",f,P,E;S?(f=0,i.getComponentMethod("rangeslider","isVisible")(n.xaxis)?(P=1.1,E="bottom"):(P=-.1,E="top")):(f=1.02,P=1,E="auto"),s("traceorder",C),d.isGrouped(u.legend)&&s("tracegroupgap"),s("entrywidth"),s("entrywidthmode"),s("itemsizing"),s("itemwidth"),s("itemclick"),s("itemdoubleclick"),s("groupclick"),s("x",f),s("xanchor"),s("y",P),s("yanchor",E),s("valign"),m.noneOrAll(o,c,["x","y"]);var k=s("title.text");if(k){s("title.side",S?"left":"top");var O=m.extendFlat({},w,{size:m.bigFont(w.size)});m.coerceFont(s,"title.font",O)}}}},43969:function(R,F,e){var i=e(39898),m=e(71828),t=e(74875),y=e(73972),p=e(11086),l=e(28569),d=e(91424),r=e(7901),n=e(63893),u=e(85167),a=e(14928),o=e(18783),c=o.LINE_SPACING,s=o.FROM_TL,b=o.FROM_BR,g=e(82424),A=e(53630),v=e(10130),h=1;R.exports=function(U,H){return H||(H=U._fullLayout.legend||{}),x(U,H)};function x(z,U){var H=z._fullLayout,B="legend"+H._uid,W,q=U._inHover;if(q?(W=U.layer,B+="-hover"):W=H._infolayer,!!W){z._legendMouseDownTime||(z._legendMouseDownTime=0);var re;if(q){if(!U.entries)return;re=g(U.entries,U)}else{if(!z.calcdata)return;re=H.showlegend&&g(z.calcdata,U)}var ie=H.hiddenlabels||[];if(!q&&(!H.showlegend||!re.length))return W.selectAll(".legend").remove(),H._topdefs.select("#"+B).remove(),t.autoMargin(z,"legend");var le=m.ensureSingle(W,"g","legend",function(ne){q||ne.attr("pointer-events","all")}),he=m.ensureSingleById(H._topdefs,"clipPath",B,function(ne){ne.append("rect")}),$=m.ensureSingle(le,"rect","bg",function(ne){ne.attr("shape-rendering","crispEdges")});$.call(r.stroke,U.bordercolor).call(r.fill,U.bgcolor).style("stroke-width",U.borderwidth+"px");var Z=m.ensureSingle(le,"g","scrollbox"),K=U.title;if(U._titleWidth=0,U._titleHeight=0,K.text){var Q=m.ensureSingle(Z,"text","legendtitletext");Q.attr("text-anchor","start").call(d.font,K.font).text(K.text),S(Q,Z,z,U,h)}else Z.selectAll(".legendtitletext").remove();var ae=m.ensureSingle(le,"rect","scrollbar",function(ne){ne.attr(a.scrollBarEnterAttrs).call(r.fill,a.scrollBarColor)}),fe=Z.selectAll("g.groups").data(re);fe.enter().append("g").attr("class","groups"),fe.exit().remove();var te=fe.selectAll("g.traces").data(m.identity);te.enter().append("g").attr("class","traces"),te.exit().remove(),te.style("opacity",function(ne){var ce=ne[0].trace;return y.traceIs(ce,"pie-like")?ie.indexOf(ne[0].label)!==-1?.5:1:ce.visible==="legendonly"?.5:1}).each(function(){i.select(this).call(L,z,U)}).call(A,z,U).each(function(){q||i.select(this).call(M,z)}),m.syncOrAsync([t.previousPromises,function(){return E(z,fe,te,U)},function(){var ne=H._size,ce=U.borderwidth;if(!q){var oe=k(z);if(oe)return;var de=ne.l+ne.w*U.x-s[O(U)]*U._width,we=ne.t+ne.h*(1-U.y)-s[G(U)]*U._effHeight;if(H.margin.autoexpand){var Se=de,Te=we;de=m.constrain(de,0,H.width-U._width),we=m.constrain(we,0,H.height-U._effHeight),de!==Se&&m.log("Constrain legend.x to make legend fit inside graph"),we!==Te&&m.log("Constrain legend.y to make legend fit inside graph")}d.setTranslate(le,de,we)}if(ae.on(".drag",null),le.on("wheel",null),q||U._height<=U._maxHeight||z._context.staticPlot){var Fe=U._effHeight;q&&(Fe=U._height),$.attr({width:U._width-ce,height:Fe-ce,x:ce/2,y:ce/2}),d.setTranslate(Z,0,0),he.select("rect").attr({width:U._width-2*ce,height:Fe-2*ce,x:ce,y:ce}),d.setClipUrl(Z,B,z),d.setRect(ae,0,0,0,0),delete U._scrollY}else{var Ie=Math.max(a.scrollBarMinHeight,U._effHeight*U._effHeight/U._height),Me=U._effHeight-Ie-2*a.scrollBarMargin,Ae=U._height-U._effHeight,De=Me/Ae,ke=Math.min(U._scrollY||0,Ae);$.attr({width:U._width-2*ce+a.scrollBarWidth+a.scrollBarMargin,height:U._effHeight-ce,x:ce/2,y:ce/2}),he.select("rect").attr({width:U._width-2*ce+a.scrollBarWidth+a.scrollBarMargin,height:U._effHeight-2*ce,x:ce,y:ce+ke}),d.setClipUrl(Z,B,z),lt(ke,Ie,De),le.on("wheel",function(){ke=m.constrain(U._scrollY+i.event.deltaY/Me*Ae,0,Ae),lt(ke,Ie,De),ke!==0&&ke!==Ae&&i.event.preventDefault()});var We,_e,Ye,Pe=function(Ue,Be,rt){var ot=(rt-Be)/De+Ue;return m.constrain(ot,0,Ae)},Ve=function(Ue,Be,rt){var ot=(Be-rt)/De+Ue;return m.constrain(ot,0,Ae)},Ze=i.behavior.drag().on("dragstart",function(){var Ue=i.event.sourceEvent;Ue.type==="touchstart"?We=Ue.changedTouches[0].clientY:We=Ue.clientY,Ye=ke}).on("drag",function(){var Ue=i.event.sourceEvent;Ue.buttons===2||Ue.ctrlKey||(Ue.type==="touchmove"?_e=Ue.changedTouches[0].clientY:_e=Ue.clientY,ke=Pe(Ye,We,_e),lt(ke,Ie,De))});ae.call(Ze);var Ke=i.behavior.drag().on("dragstart",function(){var Ue=i.event.sourceEvent;Ue.type==="touchstart"&&(We=Ue.changedTouches[0].clientY,Ye=ke)}).on("drag",function(){var Ue=i.event.sourceEvent;Ue.type==="touchmove"&&(_e=Ue.changedTouches[0].clientY,ke=Ve(Ye,We,_e),lt(ke,Ie,De))});Z.call(Ke)}function lt(Ue,Be,rt){U._scrollY=z._fullLayout.legend._scrollY=Ue,d.setTranslate(Z,0,-Ue),d.setRect(ae,U._width,a.scrollBarMargin+Ue*rt,a.scrollBarWidth,Be),he.select("rect").attr("y",ce+Ue)}if(z._context.edits.legendPosition){var vt,mt,Et,et;le.classed("cursor-move",!0),l.init({element:le.node(),gd:z,prepFn:function(){var Ue=d.getTranslate(le);Et=Ue.x,et=Ue.y},moveFn:function(Ue,Be){var rt=Et+Ue,ot=et+Be;d.setTranslate(le,rt,ot),vt=l.align(rt,0,ne.l,ne.l+ne.w,U.xanchor),mt=l.align(ot,0,ne.t+ne.h,ne.t,U.yanchor)},doneFn:function(){vt!==void 0&&mt!==void 0&&y.call("_guiRelayout",z,{"legend.x":vt,"legend.y":mt})},clickFn:function(Ue,Be){var rt=W.selectAll("g.traces").filter(function(){var ot=this.getBoundingClientRect();return Be.clientX>=ot.left&&Be.clientX<=ot.right&&Be.clientY>=ot.top&&Be.clientY<=ot.bottom});rt.size()>0&&D(z,le,rt,Ue,Be)}})}}],z)}}function C(z,U,H){var B=z[0],W=B.width,q=U.entrywidthmode,re=B.trace.legendwidth||U.entrywidth;return q==="fraction"?U._maxWidth*re:H+(re||W)}function D(z,U,H,B,W){var q=H.data()[0][0].trace,re={event:W,node:H.node(),curveNumber:q.index,expandedIndex:q._expandedIndex,data:z.data,layout:z.layout,frames:z._transitionData._frames,config:z._context,fullData:z._fullData,fullLayout:z._fullLayout};q._group&&(re.group=q._group),y.traceIs(q,"pie-like")&&(re.label=H.datum()[0].label);var ie=p.triggerHandler(z,"plotly_legendclick",re);if(ie!==!1){if(B===1)U._clickTimeout=setTimeout(function(){!z._fullLayout||u(H,z,B)},z._context.doubleClickDelay);else if(B===2){U._clickTimeout&&clearTimeout(U._clickTimeout),z._legendMouseDownTime=0;var le=p.triggerHandler(z,"plotly_legenddoubleclick",re);le!==!1&&u(H,z,B)}}}function L(z,U,H){var B=z.data()[0][0],W=B.trace,q=y.traceIs(W,"pie-like"),re=!H._inHover&&U._context.edits.legendText&&!q,ie=H._maxNameLength,le,he;B.groupTitle?(le=B.groupTitle.text,he=B.groupTitle.font):(he=H.font,H.entries?le=B.text:(le=q?B.label:W.name,W._meta&&(le=m.templateString(le,W._meta))));var $=m.ensureSingle(z,"text","legendtext");$.attr("text-anchor","start").call(d.font,he).text(re?w(le,ie):le);var Z=H.itemwidth+a.itemGap*2;n.positionText($,Z,0),re?$.call(n.makeEditable,{gd:U,text:le}).call(S,z,U,H).on("edit",function(K){this.text(w(K,ie)).call(S,z,U,H);var Q=B.trace._fullInput||{},ae={};if(y.hasTransform(Q,"groupby")){var fe=y.getTransformIndices(Q,"groupby"),te=fe[fe.length-1],ne=m.keyedContainer(Q,"transforms["+te+"].styles","target","value.name");ne.set(B.trace._group,K),ae=ne.constructUpdate()}else ae.name=K;return y.call("_guiRestyle",U,ae,W.index)}):S($,z,U,H)}function w(z,U){var H=Math.max(4,U);if(z&&z.trim().length>=H/2)return z;z=z||"";for(var B=H-z.length;B>0;B--)z+=" ";return z}function M(z,U){var H=U._context.doubleClickDelay,B,W=1,q=m.ensureSingle(z,"rect","legendtoggle",function(re){U._context.staticPlot||re.style("cursor","pointer").attr("pointer-events","all"),re.call(r.fill,"rgba(0,0,0,0)")});U._context.staticPlot||(q.on("mousedown",function(){B=new Date().getTime(),B-U._legendMouseDownTimeH&&(W=Math.max(W-1,1)),D(U,re,z,W,i.event)}}))}function S(z,U,H,B,W){B._inHover&&z.attr("data-notex",!0),n.convertToTspans(z,H,function(){f(U,H,B,W)})}function f(z,U,H,B){var W=z.data()[0][0];if(!H._inHover&&W&&!W.trace.showlegend){z.remove();return}var q=z.select("g[class*=math-group]"),re=q.node();H||(H=U._fullLayout.legend);var ie=H.borderwidth,le;B===h?le=H.title.font:W.groupTitle?le=W.groupTitle.font:le=H.font;var he=le.size*c,$,Z;if(re){var K=d.bBox(re);$=K.height,Z=K.width,B===h?d.setTranslate(q,ie,ie+$*.75):d.setTranslate(q,0,$*.25)}else{var Q=z.select(B===h?".legendtitletext":".legendtext"),ae=n.lineCount(Q),fe=Q.node();if($=he*ae,Z=fe?d.bBox(fe).width:0,B===h)H.title.side==="left"&&(Z+=a.itemGap*2),n.positionText(Q,ie+a.titlePad,ie+he);else{var te=a.itemGap*2+H.itemwidth;W.groupTitle&&(te=a.itemGap,Z-=H.itemwidth),n.positionText(Q,te,-he*((ae-1)/2-.3))}}B===h?(H._titleWidth=Z,H._titleHeight=$):(W.lineHeight=he,W.height=Math.max($,16)+3,W.width=Z)}function P(z){var U=0,H=0,B=z.title.side;return B&&(B.indexOf("left")!==-1&&(U=z._titleWidth),B.indexOf("top")!==-1&&(H=z._titleHeight)),[U,H]}function E(z,U,H,B){var W=z._fullLayout;B||(B=W.legend);var q=W._size,re=v.isVertical(B),ie=v.isGrouped(B),le=B.entrywidthmode==="fraction",he=B.borderwidth,$=2*he,Z=a.itemGap,K=B.itemwidth+Z*2,Q=2*(he+Z),ae=G(B),fe=B.y<0||B.y===0&&ae==="top",te=B.y>1||B.y===1&&ae==="bottom",ne=B.tracegroupgap,ce={};B._maxHeight=Math.max(fe||te?W.height/2:q.h,30);var oe=0;B._width=0,B._height=0;var de=P(B);if(re)H.each(function(Et){var et=Et[0].height;d.setTranslate(this,he+de[0],he+de[1]+B._height+et/2+Z),B._height+=et,B._width=Math.max(B._width,Et[0].width)}),oe=K+B._width,B._width+=Z+K+$,B._height+=Q,ie&&(U.each(function(Et,et){d.setTranslate(this,0,et*B.tracegroupgap)}),B._height+=(B._lgroupsLength-1)*B.tracegroupgap);else{var we=O(B),Se=B.x<0||B.x===0&&we==="right",Te=B.x>1||B.x===1&&we==="left",Fe=te||fe,Ie=W.width/2;B._maxWidth=Math.max(Se?Fe&&we==="left"?q.l+q.w:Ie:Te?Fe&&we==="right"?q.r+q.w:Ie:q.w,2*K);var Me=0,Ae=0;H.each(function(Et){var et=C(Et,B,K);Me=Math.max(Me,et),Ae+=et}),oe=null;var De=0;if(ie){var ke=0,We=0,_e=0;U.each(function(){var Et=0,et=0;i.select(this).selectAll("g.traces").each(function(Be){var rt=C(Be,B,K),ot=Be[0].height;d.setTranslate(this,de[0],de[1]+he+Z+ot/2+et),et+=ot,Et=Math.max(Et,rt),ce[Be[0].trace.legendgroup]=Et});var Ue=Et+Z;We>0&&Ue+he+We>B._maxWidth?(De=Math.max(De,We),We=0,_e+=ke+ne,ke=et):ke=Math.max(ke,et),d.setTranslate(this,We,_e),We+=Ue}),B._width=Math.max(De,We)+he,B._height=_e+ke+Q}else{var Ye=H.size(),Pe=Ae+$+(Ye-1)*Z=B._maxWidth&&(De=Math.max(De,lt),Ze=0,Ke+=Ve,B._height+=Ve,Ve=0),d.setTranslate(this,de[0]+he+Ze,de[1]+he+Ke+et/2+Z),lt=Ze+Ue+Z,Ze+=Be,Ve=Math.max(Ve,et)}),Pe?(B._width=Ze+$,B._height=Ve+Q):(B._width=Math.max(De,lt)+$,B._height+=Ve+Q)}}B._width=Math.ceil(Math.max(B._width+de[0],B._titleWidth+2*(he+a.titlePad))),B._height=Math.ceil(Math.max(B._height+de[1],B._titleHeight+2*(he+a.itemGap))),B._effHeight=Math.min(B._height,B._maxHeight);var vt=z._context.edits,mt=vt.legendText||vt.legendPosition;H.each(function(Et){var et=i.select(this).select(".legendtoggle"),Ue=Et[0].height,Be=Et[0].trace.legendgroup,rt=C(Et,B,K);ie&&Be!==""&&(rt=ce[Be]);var ot=mt?K:oe||rt;!re&&!le&&(ot+=Z/2),d.setRect(et,0,-Ue/2,ot,Ue)})}function k(z){var U=z._fullLayout,H=U.legend,B=O(H),W=G(H);return t.autoMargin(z,"legend",{x:H.x,y:H.y,l:H._width*s[B],r:H._width*b[B],b:H._effHeight*b[W],t:H._effHeight*s[W]})}function O(z){return m.isRightAnchor(z)?"right":m.isCenterAnchor(z)?"center":"left"}function G(z){return m.isBottomAnchor(z)?"bottom":m.isMiddleAnchor(z)?"middle":"top"}},82424:function(R,F,e){var i=e(73972),m=e(10130);R.exports=function(y,p){var l=p._inHover,d=m.isGrouped(p),r=m.isReversed(p),n={},u=[],a=!1,o={},c=0,s=0,b,g;function A(U,H){if(U===""||!m.isGrouped(p)){var B="~~i"+c;u.push(B),n[B]=[H],c++}else u.indexOf(U)===-1?(u.push(U),a=!0,n[U]=[H]):n[U].push(H)}for(b=0;bf&&(S=f)}w[b][0]._groupMinRank=S,w[b][0]._preGroupSort=b}var P=function(U,H){return U[0]._groupMinRank-H[0]._groupMinRank||U[0]._preGroupSort-H[0]._preGroupSort},E=function(U,H){return U.trace.legendrank-H.trace.legendrank||U._preSort-H._preSort};for(w.forEach(function(U,H){U[0]._preGroupSort=H}),w.sort(P),b=0;b0)ae=Z.width;else return 0;return M?Q:Math.min(ae,K)};C.each(function($){var Z=i.select(this),K=t.ensureSingle(Z,"g","layers");K.style("opacity",$[0].trace.opacity);var Q=L.valign,ae=$[0].lineHeight,fe=$[0].height;if(Q==="middle"||!ae||!fe)K.attr("transform",null);else{var te={top:1,bottom:-1}[Q],ne=te*(.5*(ae-fe+3));K.attr("transform",y(0,ne))}var ce=K.selectAll("g.legendfill").data([$]);ce.enter().append("g").classed("legendfill",!0);var oe=K.selectAll("g.legendlines").data([$]);oe.enter().append("g").classed("legendlines",!0);var de=K.selectAll("g.legendsymbols").data([$]);de.enter().append("g").classed("legendsymbols",!0),de.selectAll("g.legendpoints").data([$]).enter().append("g").classed("legendpoints",!0)}).each(he).each(G).each(U).each(z).each(B).each(ie).each(re).each(k).each(O).each(W).each(q);function k($){var Z=v($),K=Z.showFill,Q=Z.showLine,ae=Z.showGradientLine,fe=Z.showGradientFill,te=Z.anyFill,ne=Z.anyLine,ce=$[0],oe=ce.trace,de,we,Se=d(oe),Te=Se.colorscale,Fe=Se.reversescale,Ie=function(Ye){if(Ye.size())if(K)p.fillGroupStyle(Ye,D);else{var Pe="legendfill-"+oe.uid;p.gradient(Ye,D,Pe,A(Fe),Te,"fill")}},Me=function(Ye){if(Ye.size()){var Pe="legendline-"+oe.uid;p.lineGroupStyle(Ye),p.gradient(Ye,D,Pe,A(Fe),Te,"stroke")}},Ae=r.hasMarkers(oe)||!te?"M5,0":ne?"M5,-2":"M5,-3",De=i.select(this),ke=De.select(".legendfill").selectAll("path").data(K||fe?[$]:[]);if(ke.enter().append("path").classed("js-fill",!0),ke.exit().remove(),ke.attr("d",Ae+"h"+S+"v6h-"+S+"z").call(Ie),Q||ae){var We=E(void 0,oe.line,b,c);we=t.minExtend(oe,{line:{width:We}}),de=[t.minExtend(ce,{trace:we})]}var _e=De.select(".legendlines").selectAll("path").data(Q||ae?[de]:[]);_e.enter().append("path").classed("js-line",!0),_e.exit().remove(),_e.attr("d",Ae+(ae?"l"+S+",0.0001":"h"+S)).call(Q?p.lineGroupStyle:Me)}function O($){var Z=v($),K=Z.anyFill,Q=Z.anyLine,ae=Z.showLine,fe=Z.showMarker,te=$[0],ne=te.trace,ce=!fe&&!Q&&!K&&r.hasText(ne),oe,de;function we(ke,We,_e,Ye){var Pe=t.nestedProperty(ne,ke).get(),Ve=t.isArrayOrTypedArray(Pe)&&We?We(Pe):Pe;if(M&&Ve&&Ye!==void 0&&(Ve=Ye),_e){if(Ve<_e[0])return _e[0];if(Ve>_e[1])return _e[1]}return Ve}function Se(ke){return te._distinct&&te.index&&ke[te.index]?ke[te.index]:ke[0]}if(fe||ce||ae){var Te={},Fe={};if(fe){Te.mc=we("marker.color",Se),Te.mx=we("marker.symbol",Se),Te.mo=we("marker.opacity",t.mean,[.2,1]),Te.mlc=we("marker.line.color",Se),Te.mlw=we("marker.line.width",t.mean,[0,5],s),Fe.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Ie=we("marker.size",t.mean,[2,16],o);Te.ms=Ie,Fe.marker.size=Ie}ae&&(Fe.line={width:we("line.width",Se,[0,10],c)}),ce&&(Te.tx="Aa",Te.tp=we("textposition",Se),Te.ts=10,Te.tc=we("textfont.color",Se),Te.tf=we("textfont.family",Se)),oe=[t.minExtend(te,Te)],de=t.minExtend(ne,Fe),de.selectedpoints=null,de.texttemplate=null}var Me=i.select(this).select("g.legendpoints"),Ae=Me.selectAll("path.scatterpts").data(fe?oe:[]);Ae.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",P),Ae.exit().remove(),Ae.call(p.pointStyle,de,D),fe&&(oe[0].mrc=3);var De=Me.selectAll("g.pointtext").data(ce?oe:[]);De.enter().append("g").classed("pointtext",!0).append("text").attr("transform",P),De.exit().remove(),De.selectAll("text").call(p.textPointStyle,de,D)}function G($){var Z=$[0].trace,K=Z.type==="waterfall";if($[0]._distinct&&K){var Q=$[0].trace[$[0].dir].marker;return $[0].mc=Q.color,$[0].mlw=Q.line.width,$[0].mlc=Q.line.color,H($,this,"waterfall")}var ae=[];Z.visible&&K&&(ae=$[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var fe=i.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(ae);fe.enter().append("path").classed("legendwaterfall",!0).attr("transform",P).style("stroke-miterlimit",1),fe.exit().remove(),fe.each(function(te){var ne=i.select(this),ce=Z[te[0]].marker,oe=E(void 0,ce.line,g,s);ne.attr("d",te[1]).style("stroke-width",oe+"px").call(l.fill,ce.color),oe&&ne.call(l.stroke,ce.line.color)})}function z($){H($,this)}function U($){H($,this,"funnel")}function H($,Z,K){var Q=$[0].trace,ae=Q.marker||{},fe=ae.line||{},te=K?Q.visible&&Q.type===K:m.traceIs(Q,"bar"),ne=i.select(Z).select("g.legendpoints").selectAll("path.legend"+K).data(te?[$]:[]);ne.enter().append("path").classed("legend"+K,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",P),ne.exit().remove(),ne.each(function(ce){var oe=i.select(this),de=ce[0],we=E(de.mlw,ae.line,g,s);oe.style("stroke-width",we+"px");var Se=de.mcc;if(!L._inHover&&"mc"in de){var Te=d(ae),Fe=Te.mid;Fe===void 0&&(Fe=(Te.max+Te.min)/2),Se=p.tryColorscale(ae,"")(Fe)}var Ie=Se||de.mc||ae.color,Me=ae.pattern,Ae=Me&&p.getPatternAttr(Me.shape,0,"");if(Ae){var De=p.getPatternAttr(Me.bgcolor,0,null),ke=p.getPatternAttr(Me.fgcolor,0,null),We=Me.fgopacity,_e=h(Me.size,8,10),Ye=h(Me.solidity,.5,1),Pe="legend-"+Q.uid;oe.call(p.pattern,"legend",D,Pe,Ae,_e,Ye,Se,Me.fillmode,De,ke,We)}else oe.call(l.fill,Ie);we&&l.stroke(oe,de.mlc||fe.color)})}function B($){var Z=$[0].trace,K=i.select(this).select("g.legendpoints").selectAll("path.legendbox").data(Z.visible&&m.traceIs(Z,"box-violin")?[$]:[]);K.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",P),K.exit().remove(),K.each(function(){var Q=i.select(this);if((Z.boxpoints==="all"||Z.points==="all")&&l.opacity(Z.fillcolor)===0&&l.opacity((Z.line||{}).color)===0){var ae=t.minExtend(Z,{marker:{size:M?o:t.constrain(Z.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});K.call(p.pointStyle,ae,D)}else{var fe=E(void 0,Z.line,g,s);Q.style("stroke-width",fe+"px").call(l.fill,Z.fillcolor),fe&&l.stroke(Q,Z.line.color)}})}function W($){var Z=$[0].trace,K=i.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(Z.visible&&Z.type==="candlestick"?[$,$]:[]);K.enter().append("path").classed("legendcandle",!0).attr("d",function(Q,ae){return ae?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",P).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(Q,ae){var fe=i.select(this),te=Z[ae?"increasing":"decreasing"],ne=E(void 0,te.line,g,s);fe.style("stroke-width",ne+"px").call(l.fill,te.fillcolor),ne&&l.stroke(fe,te.line.color)})}function q($){var Z=$[0].trace,K=i.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(Z.visible&&Z.type==="ohlc"?[$,$]:[]);K.enter().append("path").classed("legendohlc",!0).attr("d",function(Q,ae){return ae?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",P).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(Q,ae){var fe=i.select(this),te=Z[ae?"increasing":"decreasing"],ne=E(void 0,te.line,g,s);fe.style("fill","none").call(p.dashLine,te.line.dash,ne),ne&&l.stroke(fe,te.line.color)})}function re($){le($,this,"pie")}function ie($){le($,this,"funnelarea")}function le($,Z,K){var Q=$[0],ae=Q.trace,fe=K?ae.visible&&ae.type===K:m.traceIs(ae,K),te=i.select(Z).select("g.legendpoints").selectAll("path.legend"+K).data(fe?[$]:[]);if(te.enter().append("path").classed("legend"+K,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",P),te.exit().remove(),te.size()){var ne=(ae.marker||{}).line,ce=E(u(ne.width,Q.pts),ne,g,s),oe=t.minExtend(ae,{marker:{line:{width:ce}}});oe.marker.line.color=ne.color;var de=t.minExtend(Q,{trace:oe});n(te,de,oe)}}function he($){var Z=$[0].trace,K,Q=[];if(Z.visible)switch(Z.type){case"histogram2d":case"heatmap":Q=[["M-15,-2V4H15V-2Z"]],K=!0;break;case"choropleth":case"choroplethmapbox":Q=[["M-6,-6V6H6V-6Z"]],K=!0;break;case"densitymapbox":Q=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],K="radial";break;case"cone":Q=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],K=!1;break;case"streamtube":Q=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],K=!1;break;case"surface":Q=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],K=!0;break;case"mesh3d":Q=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!1;break;case"volume":Q=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!0;break;case"isosurface":Q=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],K=!1;break}var ae=i.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(Q);ae.enter().append("path").classed("legend3dandfriends",!0).attr("transform",P).style("stroke-miterlimit",1),ae.exit().remove(),ae.each(function(fe,te){var ne=i.select(this),ce=d(Z),oe=ce.colorscale,de=ce.reversescale,we=function(Ie){if(Ie.size()){var Me="legendfill-"+Z.uid;p.gradient(Ie,D,Me,A(de,K==="radial"),oe,"fill")}},Se;if(oe){if(!K){var Fe=oe.length;Se=te===0?oe[de?Fe-1:0][1]:te===1?oe[de?0:Fe-1][1]:oe[Math.floor((Fe-1)/2)][1]}}else{var Te=Z.vertexcolor||Z.facecolor||Z.color;Se=t.isArrayOrTypedArray(Te)?Te[te]||Te[0]:Te}ne.attr("d",fe[0]),Se?ne.call(l.fill,Se):ne.call(we)})}};function A(x,C){var D=C?"radial":"horizontal";return D+(x?"":"reversed")}function v(x){var C=x[0].trace,D=C.contours,L=r.hasLines(C),w=r.hasMarkers(C),M=C.visible&&C.fill&&C.fill!=="none",S=!1,f=!1;if(D){var P=D.coloring;P==="lines"?S=!0:L=P==="none"||P==="heatmap"||D.showlines,D.type==="constraint"?M=D._operation!=="=":(P==="fill"||P==="heatmap")&&(f=!0)}return{showMarker:w,showLine:L,showFill:M,showGradientLine:S,showGradientFill:f,anyLine:L||S,anyFill:M||f}}function h(x,C,D){return x&&t.isArrayOrTypedArray(x)?C:x>D?D:x}},42068:function(R,F,e){e(93348),R.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},26023:function(R,F,e){var i=e(73972),m=e(74875),t=e(41675),y=e(24255),p=e(34031).eraseActiveShape,l=e(71828),d=l._,r=R.exports={};r.toImage={name:"toImage",title:function(x){var C=x._context.toImageButtonOptions||{},D=C.format||"png";return D==="png"?d(x,"Download plot as a png"):d(x,"Download plot")},icon:y.camera,click:function(x){var C=x._context.toImageButtonOptions,D={format:C.format||"png"};l.notifier(d(x,"Taking snapshot - this may take a few seconds"),"long"),D.format!=="svg"&&l.isIE()&&(l.notifier(d(x,"IE only supports svg. Changing format to svg."),"long"),D.format="svg"),["filename","width","height","scale"].forEach(function(L){L in C&&(D[L]=C[L])}),i.call("downloadImage",x,D).then(function(L){l.notifier(d(x,"Snapshot succeeded")+" - "+L,"long")}).catch(function(){l.notifier(d(x,"Sorry, there was a problem downloading your snapshot!"),"long")})}},r.sendDataToCloud={name:"sendDataToCloud",title:function(x){return d(x,"Edit in Chart Studio")},icon:y.disk,click:function(x){m.sendDataToCloud(x)}},r.editInChartStudio={name:"editInChartStudio",title:function(x){return d(x,"Edit in Chart Studio")},icon:y.pencil,click:function(x){m.sendDataToCloud(x)}},r.zoom2d={name:"zoom2d",_cat:"zoom",title:function(x){return d(x,"Zoom")},attr:"dragmode",val:"zoom",icon:y.zoombox,click:n},r.pan2d={name:"pan2d",_cat:"pan",title:function(x){return d(x,"Pan")},attr:"dragmode",val:"pan",icon:y.pan,click:n},r.select2d={name:"select2d",_cat:"select",title:function(x){return d(x,"Box Select")},attr:"dragmode",val:"select",icon:y.selectbox,click:n},r.lasso2d={name:"lasso2d",_cat:"lasso",title:function(x){return d(x,"Lasso Select")},attr:"dragmode",val:"lasso",icon:y.lasso,click:n},r.drawclosedpath={name:"drawclosedpath",title:function(x){return d(x,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:y.drawclosedpath,click:n},r.drawopenpath={name:"drawopenpath",title:function(x){return d(x,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:y.drawopenpath,click:n},r.drawline={name:"drawline",title:function(x){return d(x,"Draw line")},attr:"dragmode",val:"drawline",icon:y.drawline,click:n},r.drawrect={name:"drawrect",title:function(x){return d(x,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:y.drawrect,click:n},r.drawcircle={name:"drawcircle",title:function(x){return d(x,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:y.drawcircle,click:n},r.eraseshape={name:"eraseshape",title:function(x){return d(x,"Erase active shape")},icon:y.eraseshape,click:p},r.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(x){return d(x,"Zoom in")},attr:"zoom",val:"in",icon:y.zoom_plus,click:n},r.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(x){return d(x,"Zoom out")},attr:"zoom",val:"out",icon:y.zoom_minus,click:n},r.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(x){return d(x,"Autoscale")},attr:"zoom",val:"auto",icon:y.autoscale,click:n},r.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(x){return d(x,"Reset axes")},attr:"zoom",val:"reset",icon:y.home,click:n},r.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(x){return d(x,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:y.tooltip_basic,gravity:"ne",click:n},r.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(x){return d(x,"Compare data on hover")},attr:"hovermode",val:function(x){return x._fullLayout._isHoriz?"y":"x"},icon:y.tooltip_compare,gravity:"ne",click:n};function n(x,C){var D=C.currentTarget,L=D.getAttribute("data-attr"),w=D.getAttribute("data-val")||!0,M=x._fullLayout,S={},f=t.list(x,null,!0),P=M._cartesianSpikesEnabled,E,k;if(L==="zoom"){var O=w==="in"?.5:2,G=(1+O)/2,z=(1-O)/2,U;for(k=0;k1?(le=["toggleHover"],he=["resetViews"]):S?(ie=["zoomInGeo","zoomOutGeo"],le=["hoverClosestGeo"],he=["resetGeo"]):M?(le=["hoverClosest3d"],he=["resetCameraDefault3d","resetCameraLastSave3d"]):O?(ie=["zoomInMapbox","zoomOutMapbox"],le=["toggleHover"],he=["resetViewMapbox"]):E?le=["hoverClosestGl2d"]:f?le=["hoverClosestPie"]:U?(le=["hoverClosestCartesian","hoverCompareCartesian"],he=["resetViewSankey"]):le=["toggleHover"],w&&(le=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(o(A)||B)&&(le=[]),(w||E)&&!H&&(ie=["zoomIn2d","zoomOut2d","autoScale2d"],he[0]!=="resetViews"&&(he=["resetScale2d"])),M?$=["zoom3d","pan3d","orbitRotation","tableRotation"]:(w||E)&&!H||k?$=["zoom2d","pan2d"]:O||S?$=["pan2d"]:G&&($=["zoom2d"]),a(A)&&$.push("select2d","lasso2d");var Z=[],K=function(te){Z.indexOf(te)===-1&&le.indexOf(te)!==-1&&Z.push(te)};if(Array.isArray(D)){for(var Q=[],ae=0;ae0);if(h){var x=r(a,o,c);A("x",x[0]),A("y",x[1]),i.noneOrAll(u,a,["x","y"]),A("xanchor"),A("yanchor"),i.coerceFont(A,"font",o.font);var C=A("bgcolor");A("activecolor",m.contrast(C,l.lightAmount,l.darkAmount)),A("bordercolor"),A("borderwidth")}};function d(n,u,a,o){var c=o.calendar;function s(A,v){return i.coerce(n,u,p.buttons,A,v)}var b=s("visible");if(b){var g=s("step");g!=="all"&&(c&&c!=="gregorian"&&(g==="month"||g==="year")?u.stepmode="backward":s("stepmode"),s("count")),s("label")}}function r(n,u,a){for(var o=a.filter(function(g){return u[g].anchor===n._id}),c=0,s=0;s=Ie.max)Te=ce[Fe+1];else if(Se=Ie.pmax)Te=ce[Fe+1];else if(SeS._length||W+$<0)return;Z=B+$,K=W+$;break;case E:if(Q="col-resize",B+$>S._length)return;Z=B+$,K=W;break;case k:if(Q="col-resize",W+$<0)return;Z=B,K=W+$;break;default:Q="ew-resize",Z=H,K=H+$;break}if(K=0;G--){var z=D.append("path").attr(w).style("opacity",G?.1:M).call(y.stroke,f).call(y.fill,S).call(p.dashLine,G?"solid":E,G?4+P:P);if(o(z,g,h),k){var U=l(g.layout,"selections",h);z.style({cursor:"move"});var H={element:z.node(),plotinfo:x,gd:g,editHelpers:U,isActiveSelection:!0},B=i(L,g);m(B,z,H)}else z.style("pointer-events",G?"all":"none");O[G]=z}var W=O[0],q=O[1];q.node().addEventListener("click",function(){return c(g,W)})}}function o(g,A,v){var h=v.xref+v.yref;p.setClipUrl(g,"clip"+A._fullLayout._uid+h,A)}function c(g,A){if(!!u(g)){var v=A.node(),h=+v.getAttribute("data-index");if(h>=0){if(h===g._fullLayout._activeSelectionIndex){b(g);return}g._fullLayout._activeSelectionIndex=h,g._fullLayout._deactivateSelection=b,n(g)}}}function s(g){if(!!u(g)){var A=g._fullLayout.selections.length-1;g._fullLayout._activeSelectionIndex=A,g._fullLayout._deactivateSelection=b,n(g)}}function b(g){if(!!u(g)){var A=g._fullLayout._activeSelectionIndex;A>=0&&(t(g),delete g._fullLayout._activeSelectionIndex,n(g))}}},53777:function(R,F,e){var i=e(79952).P,m=e(1426).extendFlat;R.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:m({},i,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},90849:function(R){R.exports=function(e,i,m){m("newselection.mode");var t=m("newselection.line.width");t&&(m("newselection.line.color"),m("newselection.line.dash")),m("activeselection.fillcolor"),m("activeselection.opacity")}},35855:function(R,F,e){var i=e(64505),m=i.selectMode,t=e(51873),y=t.clearOutline,p=e(60165),l=p.readPaths,d=p.writePaths,r=p.fixDatesForPaths;R.exports=function(u,a){if(!!u.length){var o=u[0][0];if(!!o){var c=o.getAttribute("d"),s=a.gd,b=s._fullLayout.newselection,g=a.plotinfo,A=g.xaxis,v=g.yaxis,h=a.isActiveSelection,x=a.dragmode,C=(s.layout||{}).selections||[];if(!m(x)&&h!==void 0){var D=s._fullLayout._activeSelectionIndex;if(D=0){tr._fullLayout._deactivateShape(tr);return}if(!bt){var Fn=lr.clickmode;f.done(vr).then(function(){if(f.clear(vr),wn===2){for(nr.remove(),Zt=0;Zt<_r.length;Zt++)rr=_r[Zt],rr._module.selectPoints(rr,!1);if(Ie(tr,_r),te(pe),ot(tr),_r.length){var In=_r[0].xaxis,mr=_r[0].yaxis;if(In&&mr){for(var cr=[],zr=tr._fullLayout.selections,kr=0;kr-1&&le(Kr,tr,pe.xaxes,pe.yaxes,pe.subplot,pe,nr),Fn==="event"&&rt(tr,void 0);l.click(tr,Kr)}).catch(w.error)}},pe.doneFn=function(){wr.remove(),f.done(vr).then(function(){f.clear(vr),!Or&&_t&&pe.selectionDefs&&(_t.subtract=Mr,pe.selectionDefs.push(_t),pe.mergedPolygons.length=0,[].push.apply(pe.mergedPolygons,It)),(Or||bt)&&te(pe,Or),pe.doneFnCompleted&&pe.doneFnCompleted(Jr),Lt&&rt(tr,sr)}).catch(w.error)}}function le(qe,Oe,Ce,pe,be,Re,He){var st=Oe._hoverdata,ct=Oe._fullLayout,bt=ct.clickmode,Lt=bt.indexOf("event")>-1,Ut=[],Gt,Ft,tr,lr,Or,xt,jt,Yt,br,dr;if(de(st)){Q(qe,Oe,Re),Gt=ce(Oe,Ce,pe,be);var ht=we(st,Gt),ut=ht.pointNumbers.length>0;if(ut?Te(Gt,ht):Fe(Gt)&&(jt=Se(ht))){for(He&&He.remove(),dr=0;dr=0}function fe(qe){return qe._fullLayout._activeSelectionIndex>=0}function te(qe,Oe){var Ce=qe.dragmode,pe=qe.plotinfo,be=qe.gd;ae(be)&&be._fullLayout._deactivateShape(be),fe(be)&&be._fullLayout._deactivateSelection(be);var Re=be._fullLayout,He=Re._zoomlayer,st=a(Ce),ct=c(Ce);if(st||ct){var bt=He.selectAll(".select-outline-"+pe.id);if(bt&&be._fullLayout._outlining){var Lt;st&&(Lt=C(bt,qe)),Lt&&t.call("_guiRelayout",be,{shapes:Lt});var Ut;ct&&!re(qe)&&(Ut=D(bt,qe)),Ut&&(be._fullLayout._noEmitSelectedAtStart=!0,t.call("_guiRelayout",be,{selections:Ut}).then(function(){Oe&&L(be)})),be._fullLayout._outlining=!1}}pe.selection={},pe.selection.selectionDefs=qe.selectionDefs=[],pe.selection.mergedPolygons=qe.mergedPolygons=[]}function ne(qe){return qe._id}function ce(qe,Oe,Ce,pe){if(!qe.calcdata)return[];var be=[],Re=Oe.map(ne),He=Ce.map(ne),st,ct,bt;for(bt=0;bt0,Re=be?pe[0]:Ce;return Oe.selectedpoints?Oe.selectedpoints.indexOf(Re)>-1:!1}function Te(qe,Oe){var Ce=[],pe,be,Re,He;for(He=0;He0&&Ce.push(pe);if(Ce.length===1&&(Re=Ce[0]===Oe.searchInfo,Re&&(be=Oe.searchInfo.cd[0].trace,be.selectedpoints.length===Oe.pointNumbers.length))){for(He=0;He1||(Oe+=pe.selectedpoints.length,Oe>1)))return!1;return Oe===1}function Ie(qe,Oe,Ce){var pe;for(pe=0;pe-1&&Oe;if(!He&&Oe){var Kr=Ke(qe,!0);if(Kr.length){var Fn=Kr[0].xref,In=Kr[0].yref;if(Fn&&In){var mr=mt(Kr),cr=et([P(qe,Fn,"x"),P(qe,In,"y")]);cr(_r,mr)}}qe._fullLayout._noEmitSelectedAtStart?qe._fullLayout._noEmitSelectedAtStart=!1:wn&&rt(qe,_r),Gt._reselect=!1}if(!He&&Gt._deselect){var zr=Gt._deselect;st=zr.xref,ct=zr.yref,Pe(st,ct,Lt)||Ve(qe,st,ct,pe),wn&&(_r.points.length?rt(qe,_r):ot(qe)),Gt._deselect=!1}return{eventData:_r,selectionTesters:Ce}}function Ye(qe){var Oe=qe.calcdata;if(!!Oe)for(var Ce=0;Ce0?v+b:b;return{ppad:b,ppadplus:g?x:C,ppadminus:g?C:x}}else return{ppad:b}}function r(n,u,a,o,c){var s=n.type==="category"||n.type==="multicategory"?n.r2c:n.d2c;if(u!==void 0)return[s(u),s(a)];if(!!o){var b=1/0,g=-1/0,A=o.match(t.segmentRE),v,h,x,C,D;for(n.type==="date"&&(s=y.decodeDate(s)),v=0;vg&&(g=D)));if(g>=b)return[b,g]}}},21459:function(R){R.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},84726:function(R,F,e){var i=e(71828),m=e(89298),t=e(85501),y=e(89827),p=e(30477);R.exports=function(n,u){t(n,u,{name:"shapes",handleItemDefaults:d})};function l(r,n){return r?"bottom":n.indexOf("top")!==-1?"top":n.indexOf("bottom")!==-1?"bottom":"middle"}function d(r,n,u){function a(le,he){return i.coerce(r,n,y,le,he)}var o=a("visible");if(!!o){var c=a("path"),s=c?"path":"rect",b=a("type",s),g=b!=="path";g&&delete n.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule");var A=a("line.width");A&&(a("line.color"),a("line.dash"));for(var v=a("xsizemode"),h=a("ysizemode"),x=["x","y"],C=0;C<2;C++){var D=x[C],L=D+"anchor",w=D==="x"?v:h,M={_fullLayout:u},S,f,P,E=m.coerceRef(r,n,M,D,void 0,"paper"),k=m.getRefType(E);if(k==="range"?(S=m.getFromId(M,E),S._shapeIndices.push(n._index),P=p.rangeToShapePosition(S),f=p.shapePositionToRange(S)):f=P=i.identity,g){var O=.25,G=.75,z=D+"0",U=D+"1",H=r[z],B=r[U];r[z]=f(r[z],!0),r[U]=f(r[U],!0),w==="pixel"?(a(z,0),a(U,10)):(m.coercePosition(n,M,a,E,z,O),m.coercePosition(n,M,a,E,U,G)),n[z]=P(n[z]),n[U]=P(n[U]),r[z]=H,r[U]=B}if(w==="pixel"){var W=r[L];r[L]=f(r[L],!0),m.coercePosition(n,M,a,E,L,.25),n[L]=P(n[L]),r[L]=W}}g&&i.noneOrAll(r,n,["x0","x1","y0","y1"]);var q=b==="line",re=a("label.text");if(re){a("label.textangle");var ie=a("label.textposition",q?"middle":"middle center");a("label.xanchor"),a("label.yanchor",l(q,ie)),a("label.padding"),i.coerceFont(a,"label.font",u.font)}}}},42359:function(R,F,e){var i=e(71828),m=i.strTranslate,t=e(28569),y=e(64505),p=y.drawMode,l=y.selectMode,d=e(73972),r=e(7901),n=e(89995),u=n.i000,a=n.i090,o=n.i180,c=n.i270,s=e(51873),b=s.clearOutlineControllers,g=e(60165),A=g.pointsOnRectangle,v=g.pointsOnEllipse,h=g.writePaths,x=e(90551),C=e(35855);R.exports=function M(S,f,P,E){E||(E=0);var k=P.gd;function O(){M(S,f,P,E++),(v(S[0])||P.hasText)&&G({redrawing:!0})}function G(Te){var Fe={};P.isActiveShape!==void 0&&(P.isActiveShape=!1,Fe=x(f,P)),P.isActiveSelection!==void 0&&(P.isActiveSelection=!1,Fe=C(f,P),k._fullLayout._reselect=!0),Object.keys(Fe).length&&d.call((Te||{}).redrawing?"relayout":"_guiRelayout",k,Fe)}var z=k._fullLayout,U=z._zoomlayer,H=P.dragmode,B=p(H),W=l(H);(B||W)&&(k._fullLayout._outlining=!0),b(k),f.attr("d",h(S));var q,re,ie,le,he;if(!E&&(P.isActiveShape||P.isActiveSelection)){he=D([],S);var $=U.append("g").attr("class","outline-controllers");te($),Se()}function Z(Te){ie=+Te.srcElement.getAttribute("data-i"),le=+Te.srcElement.getAttribute("data-j"),q[ie][le].moveFn=K}function K(Te,Fe){if(!!S.length){var Ie=he[ie][le][1],Me=he[ie][le][2],Ae=S[ie],De=Ae.length;if(A(Ae)){var ke=Te,We=Fe;if(P.isActiveSelection){var _e=L(Ae,le);_e[1]===Ae[le][1]?We=0:ke=0}for(var Ye=0;Ye1&&!(Te.length===2&&Te[1][0]==="Z")&&(le===0&&(Te[0][0]="M"),S[ie]=Te,O(),G())}}function fe(Te,Fe){if(Te===2){ie=+Fe.srcElement.getAttribute("data-i"),le=+Fe.srcElement.getAttribute("data-j");var Ie=S[ie];!A(Ie)&&!v(Ie)&&ae()}}function te(Te){q=[];for(var Fe=0;FeW&&He>q&&!pe.shiftKey?a.getCursor(st/Re,1-ct/He):"move";o(G,bt),lt=bt.split("-")[0]}}function et(pe){h(O)||(re&&(fe=_e(z.xanchor)),ie&&(te=Ye(z.yanchor)),z.type==="path"?Ie=z.path:(Z=re?z.x0:_e(z.x0),K=ie?z.y0:Ye(z.y0),Q=re?z.x1:_e(z.x1),ae=ie?z.y1:Ye(z.y1)),Zae?(ne=K,we="y0",ce=ae,Se="y1"):(ne=ae,we="y1",ce=K,Se="y0"),Et(pe),qe(H,z),Ce(G,z,O),Ke.moveFn=lt==="move"?rt:ot,Ke.altKey=pe.altKey)}function Ue(){h(O)||(o(G),Oe(H),D(G,O,z),m.call("_guiRelayout",O,B.getUpdateObj()))}function Be(){h(O)||Oe(H)}function rt(pe,be){if(z.type==="path"){var Re=function(ct){return ct},He=Re,st=Re;re?$("xanchor",z.xanchor=Pe(fe+pe)):(He=function(bt){return Pe(_e(bt)+pe)},Ae&&Ae.type==="date"&&(He=b.encodeDate(He))),ie?$("yanchor",z.yanchor=Ve(te+be)):(st=function(bt){return Ve(Ye(bt)+be)},ke&&ke.type==="date"&&(st=b.encodeDate(st))),$("path",z.path=f(Ie,He,st))}else re?$("xanchor",z.xanchor=Pe(fe+pe)):($("x0",z.x0=Pe(Z+pe)),$("x1",z.x1=Pe(Q+pe))),ie?$("yanchor",z.yanchor=Ve(te+be)):($("y0",z.y0=Ve(K+be)),$("y1",z.y1=Ve(ae+be)));G.attr("d",g(O,z)),qe(H,z),w(O,U,z,Me)}function ot(pe,be){if(he){var Re=function(dr){return dr},He=Re,st=Re;re?$("xanchor",z.xanchor=Pe(fe+pe)):(He=function(ht){return Pe(_e(ht)+pe)},Ae&&Ae.type==="date"&&(He=b.encodeDate(He))),ie?$("yanchor",z.yanchor=Ve(te+be)):(st=function(ht){return Ve(Ye(ht)+be)},ke&&ke.type==="date"&&(st=b.encodeDate(st))),$("path",z.path=f(Ie,He,st))}else if(le){if(lt==="resize-over-start-point"){var ct=Z+pe,bt=ie?K-be:K+be;$("x0",z.x0=re?ct:Pe(ct)),$("y0",z.y0=ie?bt:Ve(bt))}else if(lt==="resize-over-end-point"){var Lt=Q+pe,Ut=ie?ae-be:ae+be;$("x1",z.x1=re?Lt:Pe(Lt)),$("y1",z.y1=ie?Ut:Ve(Ut))}}else{var Gt=function(dr){return lt.indexOf(dr)!==-1},Ft=Gt("n"),tr=Gt("s"),lr=Gt("w"),Or=Gt("e"),xt=Ft?ne+be:ne,jt=tr?ce+be:ce,Yt=lr?oe+pe:oe,br=Or?de+pe:de;ie&&(Ft&&(xt=ne-be),tr&&(jt=ce-be)),(!ie&&jt-xt>q||ie&&xt-jt>q)&&($(we,z[we]=ie?xt:Ve(xt)),$(Se,z[Se]=ie?jt:Ve(jt))),br-Yt>W&&($(Te,z[Te]=re?Yt:Pe(Yt)),$(Fe,z[Fe]=re?br:Pe(br)))}G.attr("d",g(O,z)),qe(H,z),w(O,U,z,Me)}function qe(pe,be){(re||ie)&&Re();function Re(){var He=be.type!=="path",st=pe.selectAll(".visual-cue").data([0]),ct=1;st.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":ct}).classed("visual-cue",!0);var bt=_e(re?be.xanchor:t.midRange(He?[be.x0,be.x1]:b.extractPathCoords(be.path,s.paramIsX))),Lt=Ye(ie?be.yanchor:t.midRange(He?[be.y0,be.y1]:b.extractPathCoords(be.path,s.paramIsY)));if(bt=b.roundPositionForSharpStrokeRendering(bt,ct),Lt=b.roundPositionForSharpStrokeRendering(Lt,ct),re&&ie){var Ut="M"+(bt-1-ct)+","+(Lt-1-ct)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";st.attr("d",Ut)}else if(re){var Gt="M"+(bt-1-ct)+","+(Lt-9-ct)+"v18 h2 v-18 Z";st.attr("d",Gt)}else{var Ft="M"+(bt-9-ct)+","+(Lt-1-ct)+"h18 v2 h-18 Z";st.attr("d",Ft)}}}function Oe(pe){pe.selectAll(".visual-cue").remove()}function Ce(pe,be,Re){var He=be.xref,st=be.yref,ct=y.getFromId(Re,He),bt=y.getFromId(Re,st),Lt="";He!=="paper"&&!ct.autorange&&(Lt+=He),st!=="paper"&&!bt.autorange&&(Lt+=st),n.setClipUrl(pe,Lt?"clip"+Re._fullLayout._uid+Lt:null,Re)}}function w(O,G,z,U){if(U.selectAll(".shape-label").remove(),!!z.label.text){var H={"data-index":G},B=z.label.text,W=z.label.font,q={"data-notex":1},re=U.append("g").attr(H).classed("shape-label",!0),ie=re.append("text").attr(q).classed("shape-label-text",!0).text(B),le,he,$,Z;if(z.path){var K=g(O,z),Q=p(K,O);le=1/0,$=1/0,he=-1/0,Z=-1/0;for(var ae=0;ae=O?H=G-U:H=U-G,-180/Math.PI*Math.atan2(H,B)}function S(O,G,z,U,H,B,W){var q=H.label.textposition,re=H.label.textangle,ie=H.label.padding,le=H.type,he=Math.PI/180*B,$=Math.sin(he),Z=Math.cos(he),K=H.label.xanchor,Q=H.label.yanchor,ae,fe,te,ne;if(le==="line"){q==="start"?(ae=O,fe=G):q==="end"?(ae=z,fe=U):(ae=(O+z)/2,fe=(G+U)/2),K==="auto"&&(q==="start"?re==="auto"?z>O?K="left":zO?K="right":zO?K="right":zO?K="left":z=re||(W[H]?le=G(le):q[H]&&(le=z(le)),H++),le});return B+ie})}function P(O,G){if(!!x(O)){var z=G.node(),U=+z.getAttribute("data-index");if(U>=0){if(U===O._fullLayout._activeShapeIndex){E(O);return}O._fullLayout._activeShapeIndex=U,O._fullLayout._deactivateShape=E,v(O)}}}function E(O){if(!!x(O)){var G=O._fullLayout._activeShapeIndex;G>=0&&(d(O),delete O._fullLayout._activeShapeIndex,v(O))}}function k(O){if(!!x(O)){d(O);var G=O._fullLayout._activeShapeIndex,z=(O.layout||{}).shapes||[];if(G0&&xv&&(x="X"),x});return s>v&&(h=h.replace(/[\s,]*X.*/,""),m.log("Ignoring extra params in segment "+c)),b+h})}},89853:function(R,F,e){var i=e(34031);R.exports={moduleType:"component",name:"shapes",layoutAttributes:e(89827),supplyLayoutDefaults:e(84726),supplyDrawNewShapeDefaults:e(45547),includeBasePlot:e(76325)("shapes"),calcAutorange:e(5627),draw:i.draw,drawOne:i.drawOne}},75067:function(R,F,e){var i=e(41940),m=e(35025),t=e(1426).extendDeepAll,y=e(30962).overrideAll,p=e(85594),l=e(44467).templatedArray,d=e(98292),r=l("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});R.exports=y(l("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:r,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:t(m({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:p.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:i({})},font:i({}),activebgcolor:{valType:"color",dflt:d.gripBgActiveColor},bgcolor:{valType:"color",dflt:d.railBgColor},bordercolor:{valType:"color",dflt:d.railBorderColor},borderwidth:{valType:"number",min:0,dflt:d.railBorderWidth},ticklen:{valType:"number",min:0,dflt:d.tickLength},tickcolor:{valType:"color",dflt:d.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:d.minorTickLength}}),"arraydraw","from-root")},98292:function(R){R.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},12343:function(R,F,e){var i=e(71828),m=e(85501),t=e(75067),y=e(98292),p=y.name,l=t.steps;R.exports=function(u,a){m(u,a,{name:p,handleItemDefaults:d})};function d(n,u,a){function o(x,C){return i.coerce(n,u,t,x,C)}for(var c=m(n,u,{name:"steps",handleItemDefaults:r}),s=0,b=0;b0?[0]:[]);q.enter().append("g").classed(n.containerClassName,!0).style("cursor",H?null:"ew-resize");function re($){$._commandObserver&&($._commandObserver.remove(),delete $._commandObserver),m.autoMargin(U,s($))}if(q.exit().each(function(){i.select(this).selectAll("g."+n.groupClassName).each(re)}).remove(),W.length!==0){var ie=q.selectAll("g."+n.groupClassName).data(W,g);ie.enter().append("g").classed(n.groupClassName,!0),ie.exit().each(re).remove();for(var le=0;le0&&(ie=ie.transition().duration(U.transition.duration).ease(U.transition.easing)),ie.attr("transform",l(re-n.gripWidth*.5,U._dims.currentValueTotalHeight))}}function E(z,U){var H=z._dims;return H.inputAreaStart+n.stepInset+(H.inputAreaLength-2*n.stepInset)*Math.min(1,Math.max(0,U))}function k(z,U){var H=z._dims;return Math.min(1,Math.max(0,(U-n.stepInset-H.inputAreaStart)/(H.inputAreaLength-2*n.stepInset-2*H.inputAreaStart)))}function O(z,U,H){var B=H._dims,W=p.ensureSingle(z,"rect",n.railTouchRectClass,function(q){q.call(M,U,z,H).style("pointer-events","all")});W.attr({width:B.inputAreaLength,height:Math.max(B.inputAreaWidth,n.tickOffset+H.ticklen+B.labelHeight)}).call(t.fill,H.bgcolor).attr("opacity",0),y.setTranslate(W,0,B.currentValueTotalHeight)}function G(z,U){var H=U._dims,B=H.inputAreaLength-n.railInset*2,W=p.ensureSingle(z,"rect",n.railRectClass);W.attr({width:B,height:n.railWidth,rx:n.railRadius,ry:n.railRadius,"shape-rendering":"crispEdges"}).call(t.stroke,U.bordercolor).call(t.fill,U.bgcolor).style("stroke-width",U.borderwidth+"px"),y.setTranslate(W,n.railInset,(H.inputAreaWidth-n.railWidth)*.5+H.currentValueTotalHeight)}},23243:function(R,F,e){var i=e(98292);R.exports={moduleType:"component",name:i.name,layoutAttributes:e(75067),supplyLayoutDefaults:e(12343),draw:e(44504)}},92998:function(R,F,e){var i=e(39898),m=e(92770),t=e(74875),y=e(73972),p=e(71828),l=p.strTranslate,d=e(91424),r=e(7901),n=e(63893),u=e(37822),a=e(18783).OPPOSITE_SIDE,o=/ [XY][0-9]* /;function c(s,b,g){var A=g.propContainer,v=g.propName,h=g.placeholder,x=g.traceIndex,C=g.avoid||{},D=g.attributes,L=g.transform,w=g.containerGroup,M=s._fullLayout,S=1,f=!1,P=A.title,E=(P&&P.text?P.text:"").trim(),k=P&&P.font?P.font:{},O=k.family,G=k.size,z=k.color,U;v==="title.text"?U="titleText":v.indexOf("axis")!==-1?U="axisTitleText":v.indexOf("colorbar"!==-1)&&(U="colorbarTitleText");var H=s._context.edits[U];E===""?S=0:E.replace(o," % ")===h.replace(o," % ")&&(S=.2,f=!0,H||(E="")),g._meta?E=p.templateString(E,g._meta):M._meta&&(E=p.templateString(E,M._meta));var B=E||H,W;w||(w=p.ensureSingle(M._infolayer,"g","g-"+b),W=M._hColorbarMoveTitle);var q=w.selectAll("text").data(B?[0]:[]);if(q.enter().append("text"),q.text(E).attr("class",b),q.exit().remove(),!B)return w;function re($){p.syncOrAsync([ie,le],$)}function ie($){var Z;return!L&&W&&(L={}),L?(Z="",L.rotate&&(Z+="rotate("+[L.rotate,D.x,D.y]+")"),(L.offset||W)&&(Z+=l(0,(L.offset||0)-(W||0)))):Z=null,$.attr("transform",Z),$.style({"font-family":O,"font-size":i.round(G,2)+"px",fill:r.rgb(z),opacity:S*r.opacity(z),"font-weight":t.fontWeight}).attr(D).call(n.convertToTspans,s),t.previousPromises(s)}function le($){var Z=i.select($.node().parentNode);if(C&&C.selection&&C.side&&E){Z.attr("transform",null);var K=a[C.side],Q=C.side==="left"||C.side==="top"?-1:1,ae=m(C.pad)?C.pad:2,fe=d.bBox(Z.node()),te={t:0,b:0,l:0,r:0},ne=s._fullLayout._reservedMargin;for(var ce in ne)for(var oe in ne[ce]){var de=ne[ce][oe];te[oe]=Math.max(te[oe],de)}var we={left:te.l,top:te.t,right:M.width-te.r,bottom:M.height-te.b},Se=C.maxShift||Q*(we[C.side]-fe[C.side]),Te=0;if(Se<0)Te=Se;else{var Fe=C.offsetLeft||0,Ie=C.offsetTop||0;fe.left-=Fe,fe.right-=Fe,fe.top-=Ie,fe.bottom-=Ie,C.selection.each(function(){var Ae=d.bBox(this);p.bBoxIntersect(fe,Ae,ae)&&(Te=Math.max(Te,Q*(Ae[C.side]-fe[K])+ae))}),Te=Math.min(Se,Te),A._titleScoot=Math.abs(Te)}if(Te>0||Se<0){var Me={left:[-Te,0],right:[Te,0],top:[0,-Te],bottom:[0,Te]}[C.side];Z.attr("transform",l(Me[0],Me[1]))}}}q.call(re);function he(){S=0,f=!0,q.text(h).on("mouseover.opacity",function(){i.select(this).transition().duration(u.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){i.select(this).transition().duration(u.HIDE_PLACEHOLDER).style("opacity",0)})}return H&&(E?q.on(".opacity",null):he(),q.call(n.makeEditable,{gd:s}).on("edit",function($){x!==void 0?y.call("_guiRestyle",s,v,$,x):y.call("_guiRelayout",s,v,$)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(re)}).on("input",function($){this.text($||" ").call(n.positionText,D.x,D.y)})),q.classed("js-placeholder",f),w}R.exports={draw:c}},7163:function(R,F,e){var i=e(41940),m=e(22399),t=e(1426).extendFlat,y=e(30962).overrideAll,p=e(35025),l=e(44467).templatedArray,d=l("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});R.exports=y(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:d,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:t(p({editType:"arraydraw"}),{}),font:i({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:m.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},75909:function(R){R.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25C4",right:"\u25BA",up:"\u25B2",down:"\u25BC"}}},64897:function(R,F,e){var i=e(71828),m=e(85501),t=e(7163),y=e(75909),p=y.name,l=t.buttons;R.exports=function(u,a){var o={name:p,handleItemDefaults:d};m(u,a,o)};function d(n,u,a){function o(b,g){return i.coerce(n,u,t,b,g)}var c=m(n,u,{name:"buttons",handleItemDefaults:r}),s=o("visible",c.length>0);!s||(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),i.noneOrAll(n,u,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),i.coerceFont(o,"font",a.font),o("bgcolor",a.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function r(n,u){function a(c,s){return i.coerce(n,u,l,c,s)}var o=a("visible",n.method==="skip"||Array.isArray(n.args));o&&(a("method"),a("args"),a("args2"),a("label"),a("execute"))}},13689:function(R,F,e){var i=e(39898),m=e(74875),t=e(7901),y=e(91424),p=e(71828),l=e(63893),d=e(44467).arrayEditor,r=e(18783).LINE_SPACING,n=e(75909),u=e(25849);R.exports=function(k){var O=k._fullLayout,G=p.filterVisible(O[n.name]);function z(le){m.autoMargin(k,S(le))}var U=O._menulayer.selectAll("g."+n.containerClassName).data(G.length>0?[0]:[]);if(U.enter().append("g").classed(n.containerClassName,!0).style("cursor","pointer"),U.exit().each(function(){i.select(this).selectAll("g."+n.headerGroupClassName).each(z)}).remove(),G.length!==0){var H=U.selectAll("g."+n.headerGroupClassName).data(G,a);H.enter().append("g").classed(n.headerGroupClassName,!0);for(var B=p.ensureSingle(U,"g",n.dropdownButtonGroupClassName,function(le){le.style("pointer-events","all")}),W=0;WD,k=p.barLength+2*p.barPad,O=p.barWidth+2*p.barPad,G=c,z=b+g;z+O>o&&(z=o-O);var U=this.container.selectAll("rect.scrollbar-horizontal").data(E?[0]:[]);U.exit().on(".drag",null).remove(),U.enter().append("rect").classed("scrollbar-horizontal",!0).call(m.fill,p.barColor),E?(this.hbar=U.attr({rx:p.barRadius,ry:p.barRadius,x:G,y:z,width:k,height:O}),this._hbarXMin=G+k/2,this._hbarTranslateMax=D-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var H=g>L,B=p.barWidth+2*p.barPad,W=p.barLength+2*p.barPad,q=c+s,re=b;q+B>a&&(q=a-B);var ie=this.container.selectAll("rect.scrollbar-vertical").data(H?[0]:[]);ie.exit().on(".drag",null).remove(),ie.enter().append("rect").classed("scrollbar-vertical",!0).call(m.fill,p.barColor),H?(this.vbar=ie.attr({rx:p.barRadius,ry:p.barRadius,x:q,y:re,width:B,height:W}),this._vbarYMin=re+W/2,this._vbarTranslateMax=L-W):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var le=this.id,he=w-.5,$=H?M+B+.5:M+.5,Z=S-.5,K=E?f+O+.5:f+.5,Q=u._topdefs.selectAll("#"+le).data(E||H?[0]:[]);if(Q.exit().remove(),Q.enter().append("clipPath").attr("id",le).append("rect"),E||H?(this._clipRect=Q.select("rect").attr({x:Math.floor(he),y:Math.floor(Z),width:Math.ceil($)-Math.floor(he),height:Math.ceil(K)-Math.floor(Z)}),this.container.call(t.setClipUrl,le,this.gd),this.bg.attr({x:c,y:b,width:s,height:g})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(t.setClipUrl,null),delete this._clipRect),E||H){var ae=i.behavior.drag().on("dragstart",function(){i.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(ae);var fe=i.behavior.drag().on("dragstart",function(){i.event.sourceEvent.preventDefault(),i.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));E&&this.hbar.on(".drag",null).call(fe),H&&this.vbar.on(".drag",null).call(fe)}this.setTranslate(r,n)},p.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(t.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},p.prototype._onBoxDrag=function(){var d=this.translateX,r=this.translateY;this.hbar&&(d-=i.event.dx),this.vbar&&(r-=i.event.dy),this.setTranslate(d,r)},p.prototype._onBoxWheel=function(){var d=this.translateX,r=this.translateY;this.hbar&&(d+=i.event.deltaY),this.vbar&&(r+=i.event.deltaY),this.setTranslate(d,r)},p.prototype._onBarDrag=function(){var d=this.translateX,r=this.translateY;if(this.hbar){var n=d+this._hbarXMin,u=n+this._hbarTranslateMax,a=y.constrain(i.event.x,n,u),o=(a-n)/(u-n),c=this.position.w-this._box.w;d=o*c}if(this.vbar){var s=r+this._vbarYMin,b=s+this._vbarTranslateMax,g=y.constrain(i.event.y,s,b),A=(g-s)/(b-s),v=this.position.h-this._box.h;r=A*v}this.setTranslate(d,r)},p.prototype.setTranslate=function(d,r){var n=this.position.w-this._box.w,u=this.position.h-this._box.h;if(d=y.constrain(d||0,0,n),r=y.constrain(r||0,0,u),this.translateX=d,this.translateY=r,this.container.call(t.setTranslate,this._box.l-this.position.l-d,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+d-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var a=d/n;this.hbar.call(t.setTranslate,d+a*this._hbarTranslateMax,r)}if(this.vbar){var o=r/u;this.vbar.call(t.setTranslate,d,r+o*this._vbarTranslateMax)}}},18783:function(R){R.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},24695:function(R){R.exports={axisRefDescription:function(F,e,i){return["If set to a",F,"axis id (e.g. *"+F+"* or","*"+F+"2*), the `"+F+"` position refers to a",F,"coordinate. If set to *paper*, the `"+F+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+i+"). If set to a",F,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",e,"of the domain of that axis: e.g.,","*"+F+"2 domain* refers to the domain of the second",F," axis and a",F,"position of 0.5 refers to the","point between the",e,"and the",i,"of the domain of the","second",F,"axis."].join(" ")}}},22372:function(R){R.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}},31562:function(R){R.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},74808:function(R){R.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},29659:function(R){R.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},87381:function(R){R.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}},37822:function(R){R.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},50606:function(R){R.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"\u2212"}},77922:function(R,F){F.xmlns="http://www.w3.org/2000/xmlns/",F.svg="http://www.w3.org/2000/svg",F.xlink="http://www.w3.org/1999/xlink",F.svgAttrs={xmlns:F.svg,"xmlns:xlink":F.xlink}},8729:function(R,F,e){F.version=e(11506).version,e(7417),e(98847);for(var i=e(73972),m=F.register=i.register,t=e(10641),y=Object.keys(t),p=0;p",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},99863:function(R,F){F.isLeftAnchor=function(i){return i.xanchor==="left"||i.xanchor==="auto"&&i.x<=.3333333333333333},F.isCenterAnchor=function(i){return i.xanchor==="center"||i.xanchor==="auto"&&i.x>.3333333333333333&&i.x<.6666666666666666},F.isRightAnchor=function(i){return i.xanchor==="right"||i.xanchor==="auto"&&i.x>=.6666666666666666},F.isTopAnchor=function(i){return i.yanchor==="top"||i.yanchor==="auto"&&i.y>=.6666666666666666},F.isMiddleAnchor=function(i){return i.yanchor==="middle"||i.yanchor==="auto"&&i.y>.3333333333333333&&i.y<.6666666666666666},F.isBottomAnchor=function(i){return i.yanchor==="bottom"||i.yanchor==="auto"&&i.y<=.3333333333333333}},26348:function(R,F,e){var i=e(64872),m=i.mod,t=i.modHalf,y=Math.PI,p=2*y;function l(A){return A/180*y}function d(A){return A/y*180}function r(A){return Math.abs(A[1]-A[0])>p-1e-14}function n(A,v){return t(v-A,p)}function u(A,v){return Math.abs(n(A,v))}function a(A,v){if(r(v))return!0;var h,x;v[0]x&&(x+=p);var C=m(A,p),D=C+p;return C>=h&&C<=x||D>=h&&D<=x}function o(A,v,h,x){if(!a(v,x))return!1;var C,D;return h[0]=C&&A<=D}function c(A,v,h,x,C,D,L){C=C||0,D=D||0;var w=r([h,x]),M,S,f,P,E;w?(M=0,S=y,f=p):hb.max?c.set(s):c.set(+o)}},integer:{coerceFunction:function(o,c,s,b){o%1||!i(o)||b.min!==void 0&&ob.max?c.set(s):c.set(+o)}},string:{coerceFunction:function(o,c,s,b){if(typeof o!="string"){var g=typeof o=="number";b.strict===!0||!g?c.set(s):c.set(String(o))}else b.noBlank&&!o?c.set(s):c.set(o)}},color:{coerceFunction:function(o,c,s){m(o).isValid()?c.set(o):c.set(s)}},colorlist:{coerceFunction:function(o,c,s){function b(g){return m(g).isValid()}!Array.isArray(o)||!o.length?c.set(s):o.every(b)?c.set(o):c.set(s)}},colorscale:{coerceFunction:function(o,c,s){c.set(y.get(o,s))}},angle:{coerceFunction:function(o,c,s){o==="auto"?c.set("auto"):i(o)?c.set(n(+o,360)):c.set(s)}},subplotid:{coerceFunction:function(o,c,s,b){var g=b.regex||r(s);if(typeof o=="string"&&g.test(o)){c.set(o);return}c.set(s)},validateFunction:function(o,c){var s=c.dflt;return o===s?!0:typeof o!="string"?!1:!!r(s).test(o)}},flaglist:{coerceFunction:function(o,c,s,b){if((b.extras||[]).indexOf(o)!==-1){c.set(o);return}if(typeof o!="string"){c.set(s);return}for(var g=o.split("+"),A=0;A=h&&z<=x?z:l}if(typeof z!="string"&&typeof z!="number")return l;z=String(z);var q=A(U),re=z.charAt(0);q&&(re==="G"||re==="g")&&(z=z.substr(1),U="");var ie=q&&U.substr(0,7)==="chinese",le=z.match(ie?b:s);if(!le)return l;var he=le[1],$=le[3]||"1",Z=Number(le[5]||1),K=Number(le[7]||0),Q=Number(le[9]||0),ae=Number(le[11]||0);if(q){if(he.length===2)return l;he=Number(he);var fe;try{var te=o.getComponentMethod("calendars","getCal")(U);if(ie){var ne=$.charAt($.length-1)==="i";$=parseInt($,10),fe=te.newDate(he,te.toMonthIndex(he,$,ne),Z)}else fe=te.newDate(he,Number($),Z)}catch{return l}return fe?(fe.toJD()-a)*d+K*r+Q*n+ae*u:l}he.length===2?he=(Number(he)+2e3-g)%100+g:he=Number(he),$-=1;var ce=new Date(Date.UTC(2e3,$,Z,K,Q));return ce.setUTCFullYear(he),ce.getUTCMonth()!==$||ce.getUTCDate()!==Z?l:ce.getTime()+ae*u},h=F.MIN_MS=F.dateTime2ms("-9999"),x=F.MAX_MS=F.dateTime2ms("9999-12-31 23:59:59.9999"),F.isDateTime=function(z,U){return F.dateTime2ms(z,U)!==l};function C(z,U){return String(z+Math.pow(10,U)).substr(1)}var D=90*d,L=3*r,w=5*n;F.ms2DateTime=function(z,U,H){if(typeof z!="number"||!(z>=h&&z<=x))return l;U||(U=0);var B=Math.floor(y(z+.05,1)*10),W=Math.round(z-B/10),q,re,ie,le,he,$;if(A(H)){var Z=Math.floor(W/d)+a,K=Math.floor(y(z,d));try{q=o.getComponentMethod("calendars","getCal")(H).fromJD(Z).formatDate("yyyy-mm-dd")}catch{q=c("G%Y-%m-%d")(new Date(W))}if(q.charAt(0)==="-")for(;q.length<11;)q="-0"+q.substr(1);else for(;q.length<10;)q="0"+q;re=U=h+d&&z<=x-d))return l;var U=Math.floor(y(z+.05,1)*10),H=new Date(Math.round(z-U/10)),B=i("%Y-%m-%d")(H),W=H.getHours(),q=H.getMinutes(),re=H.getSeconds(),ie=H.getUTCMilliseconds()*10+U;return M(B,W,q,re,ie)};function M(z,U,H,B,W){if((U||H||B||W)&&(z+=" "+C(U,2)+":"+C(H,2),(B||W)&&(z+=":"+C(B,2),W))){for(var q=4;W%10===0;)q-=1,W/=10;z+="."+C(W,q)}return z}F.cleanDate=function(z,U,H){if(z===l)return U;if(F.isJSDate(z)||typeof z=="number"&&isFinite(z)){if(A(H))return t.error("JS Dates and milliseconds are incompatible with world calendars",z),U;if(z=F.ms2DateTimeLocal(+z),!z&&U!==void 0)return U}else if(!F.isDateTime(z,H))return t.error("unrecognized date",z),U;return z};var S=/%\d?f/g,f=/%h/g,P={1:"1",2:"1",3:"2",4:"2"};function E(z,U,H,B){z=z.replace(S,function(q){var re=Math.min(+q.charAt(1)||6,6),ie=(U/1e3%1+2).toFixed(re).substr(2).replace(/0+$/,"")||"0";return ie});var W=new Date(Math.floor(U+.05));if(z=z.replace(f,function(){return P[H("%q")(W)]}),A(B))try{z=o.getComponentMethod("calendars","worldCalFmt")(z,U,B)}catch{return"Invalid"}return H(z)(W)}var k=[59,59.9,59.99,59.999,59.9999];function O(z,U){var H=y(z+.05,d),B=C(Math.floor(H/r),2)+":"+C(y(Math.floor(H/n),60),2);if(U!=="M"){m(U)||(U=0);var W=Math.min(y(z/u,60),k[U]),q=(100+W).toFixed(U).substr(1);U>0&&(q=q.replace(/0+$/,"").replace(/[\.]$/,"")),B+=":"+q}return B}F.formatDate=function(z,U,H,B,W,q){if(W=A(W)&&W,!U)if(H==="y")U=q.year;else if(H==="m")U=q.month;else if(H==="d")U=q.dayMonth+` +`+q.year;else return O(z,H)+` +`+E(q.dayMonthYear,z,B,W);return E(U,z,B,W)};var G=3*d;F.incrementMonth=function(z,U,H){H=A(H)&&H;var B=y(z,d);if(z=Math.round(z-B),H)try{var W=Math.round(z/d)+a,q=o.getComponentMethod("calendars","getCal")(H),re=q.fromJD(W);return U%12?q.add(re,U,"m"):q.add(re,U/12,"y"),(re.toJD()-a)*d+B}catch{t.error("invalid ms "+z+" in calendar "+H)}var ie=new Date(z+G);return ie.setUTCMonth(ie.getUTCMonth()+U)+B-G},F.findExactDates=function(z,U){for(var H=0,B=0,W=0,q=0,re,ie,le=A(U)&&o.getComponentMethod("calendars","getCal")(U),he=0;he0&&O[G+1][0]<0)return G;return null}switch(w==="RUS"||w==="FJI"?S=function(O){var G;if(k(O)===null)G=O;else for(G=new Array(O.length),E=0;EG?z[U++]=[O[E][0]+360,O[E][1]]:E===G?(z[U++]=O[E],z[U++]=[O[E][0],-90]):z[U++]=O[E];var H=u.tester(z);H.pts.pop(),M.push(H)}:S=function(O){M.push(u.tester(O))},D.type){case"MultiPolygon":for(f=0;fM&&(M=P,L=f)}else L=D;return y.default(L).geometry.coordinates}function h(C){var D=window.PlotlyGeoAssets||{},L=[];function w(E){return new Promise(function(k,O){i.json(E,function(G,z){if(G){delete D[E];var U=G.status===404?'GeoJSON at URL "'+E+'" does not exist.':"Unexpected error while fetching from "+E;return O(new Error(U))}return D[E]=z,k(z)})})}function M(E){return new Promise(function(k,O){var G=0,z=setInterval(function(){if(D[E]&&D[E]!=="pending")return clearInterval(z),k(D[E]);if(G>100)return clearInterval(z),O("Unexpected error while fetching from "+E);G++},50)})}for(var S=0;S0&&(p.push(l),l=[])}return l.length>0&&p.push(l),p},F.makeLine=function(m){return m.length===1?{type:"LineString",coordinates:m[0]}:{type:"MultiLineString",coordinates:m}},F.makePolygon=function(m){if(m.length===1)return{type:"Polygon",coordinates:m};for(var t=new Array(m.length),y=0;y1||D<0||D>1?null:{x:d+b*D,y:r+v*D}}F.segmentDistance=function(r,n,u,a,o,c,s,b){if(m(r,n,u,a,o,c,s,b))return 0;var g=u-r,A=a-n,v=s-o,h=b-c,x=g*g+A*A,C=v*v+h*h,D=Math.min(t(g,A,x,o-r,c-n),t(g,A,x,s-r,b-n),t(v,h,C,r-o,n-c),t(v,h,C,u-o,a-c));return Math.sqrt(D)};function t(d,r,n,u,a){var o=u*d+a*r;if(o<0)return u*u+a*a;if(o>n){var c=u-d,s=a-r;return c*c+s*s}else{var b=u*r-a*d;return b*b/n}}var y,p,l;F.getTextLocation=function(r,n,u,a){if((r!==p||a!==l)&&(y={},p=r,l=a),y[u])return y[u];var o=r.getPointAtLength(i(u-a/2,n)),c=r.getPointAtLength(i(u+a/2,n)),s=Math.atan((c.y-o.y)/(c.x-o.x)),b=r.getPointAtLength(i(u,n)),g=(b.x*4+o.x+c.x)/6,A=(b.y*4+o.y+c.y)/6,v={x:g,y:A,theta:s};return y[u]=v,v},F.clearLocationCache=function(){p=null},F.getVisibleSegment=function(r,n,u){var a=n.left,o=n.right,c=n.top,s=n.bottom,b=0,g=r.getTotalLength(),A=g,v,h;function x(D){var L=r.getPointAtLength(D);D===0?v=L:D===g&&(h=L);var w=L.xo?L.x-o:0,M=L.ys?L.y-s:0;return Math.sqrt(w*w+M*M)}for(var C=x(b);C;){if(b+=C+u,b>A)return;C=x(b)}for(C=x(A);C;){if(A-=C+u,b>A)return;C=x(A)}return{min:b,max:A,len:A-b,total:g,isClosed:b===0&&A===g&&Math.abs(v.x-h.x)<.1&&Math.abs(v.y-h.y)<.1}},F.findPointOnPath=function(r,n,u,a){a=a||{};for(var o=a.pathLength||r.getTotalLength(),c=a.tolerance||.001,s=a.iterationLimit||30,b=r.getPointAtLength(0)[u]>r.getPointAtLength(o)[u]?-1:1,g=0,A=0,v=o,h,x,C;g0?v=h:A=h,g++}return x}},81697:function(R,F,e){var i=e(92770),m=e(84267),t=e(25075),y=e(21081),p=e(22399).defaultLine,l=e(73627).isArrayOrTypedArray,d=t(p),r=1;function n(s,b){var g=s;return g[3]*=b,g}function u(s){if(i(s))return d;var b=t(s);return b.length?b:d}function a(s){return i(s)?s:r}function o(s,b,g){var A=s.color,v=l(A),h=l(b),x=y.extractOpts(s),C=[],D,L,w,M,S;if(x.colorscale!==void 0?D=y.makeColorScaleFuncFromTrace(s):D=u,v?L=function(P,E){return P[E]===void 0?d:t(D(P[E]))}:L=u,h?w=function(P,E){return P[E]===void 0?r:a(P[E])}:w=a,v||h)for(var f=0;f1?(m*e+m*i)/m:e+i,y=String(t).length;if(y>16){var p=String(i).length,l=String(e).length;if(y>=l+p){var d=parseFloat(t).toPrecision(12);d.indexOf("e+")===-1&&(t=+d)}}return t}},71828:function(R,F,e){var i=e(39898),m=e(84096).g0,t=e(60721).WU,y=e(92770),p=e(50606),l=p.FP_SAFE,d=-l,r=p.BADNUM,n=R.exports={};n.adjustFormat=function($){return!$||/^\d[.]\df/.test($)||/[.]\d%/.test($)?$:$==="0.f"?"~f":/^\d%/.test($)?"~%":/^\ds/.test($)?"~s":!/^[~,.0$]/.test($)&&/[&fps]/.test($)?"~"+$:$};var u={};n.warnBadFormat=function(he){var $=String(he);u[$]||(u[$]=1,n.warn('encountered bad format: "'+$+'"'))},n.noFormat=function(he){return String(he)},n.numberFormat=function(he){var $;try{$=t(n.adjustFormat(he))}catch{return n.warnBadFormat(he),n.noFormat}return $},n.nestedProperty=e(65487),n.keyedContainer=e(66636),n.relativeAttr=e(6962),n.isPlainObject=e(41965),n.toLogRange=e(58163),n.relinkPrivateKeys=e(51332);var a=e(73627);n.isTypedArray=a.isTypedArray,n.isArrayOrTypedArray=a.isArrayOrTypedArray,n.isArray1D=a.isArray1D,n.ensureArray=a.ensureArray,n.concat=a.concat,n.maxRowLength=a.maxRowLength,n.minRowLength=a.minRowLength;var o=e(64872);n.mod=o.mod,n.modHalf=o.modHalf;var c=e(96554);n.valObjectMeta=c.valObjectMeta,n.coerce=c.coerce,n.coerce2=c.coerce2,n.coerceFont=c.coerceFont,n.coercePattern=c.coercePattern,n.coerceHoverinfo=c.coerceHoverinfo,n.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,n.validate=c.validate;var s=e(41631);n.dateTime2ms=s.dateTime2ms,n.isDateTime=s.isDateTime,n.ms2DateTime=s.ms2DateTime,n.ms2DateTimeLocal=s.ms2DateTimeLocal,n.cleanDate=s.cleanDate,n.isJSDate=s.isJSDate,n.formatDate=s.formatDate,n.incrementMonth=s.incrementMonth,n.dateTick0=s.dateTick0,n.dfltRange=s.dfltRange,n.findExactDates=s.findExactDates,n.MIN_MS=s.MIN_MS,n.MAX_MS=s.MAX_MS;var b=e(65888);n.findBin=b.findBin,n.sorterAsc=b.sorterAsc,n.sorterDes=b.sorterDes,n.distinctVals=b.distinctVals,n.roundUp=b.roundUp,n.sort=b.sort,n.findIndexOfMin=b.findIndexOfMin,n.sortObjectKeys=e(78607);var g=e(80038);n.aggNums=g.aggNums,n.len=g.len,n.mean=g.mean,n.median=g.median,n.midRange=g.midRange,n.variance=g.variance,n.stdev=g.stdev,n.interp=g.interp;var A=e(35657);n.init2dArray=A.init2dArray,n.transposeRagged=A.transposeRagged,n.dot=A.dot,n.translationMatrix=A.translationMatrix,n.rotationMatrix=A.rotationMatrix,n.rotationXYMatrix=A.rotationXYMatrix,n.apply3DTransform=A.apply3DTransform,n.apply2DTransform=A.apply2DTransform,n.apply2DTransform2=A.apply2DTransform2,n.convertCssMatrix=A.convertCssMatrix,n.inverseTransformMatrix=A.inverseTransformMatrix;var v=e(26348);n.deg2rad=v.deg2rad,n.rad2deg=v.rad2deg,n.angleDelta=v.angleDelta,n.angleDist=v.angleDist,n.isFullCircle=v.isFullCircle,n.isAngleInsideSector=v.isAngleInsideSector,n.isPtInsideSector=v.isPtInsideSector,n.pathArc=v.pathArc,n.pathSector=v.pathSector,n.pathAnnulus=v.pathAnnulus;var h=e(99863);n.isLeftAnchor=h.isLeftAnchor,n.isCenterAnchor=h.isCenterAnchor,n.isRightAnchor=h.isRightAnchor,n.isTopAnchor=h.isTopAnchor,n.isMiddleAnchor=h.isMiddleAnchor,n.isBottomAnchor=h.isBottomAnchor;var x=e(87642);n.segmentsIntersect=x.segmentsIntersect,n.segmentDistance=x.segmentDistance,n.getTextLocation=x.getTextLocation,n.clearLocationCache=x.clearLocationCache,n.getVisibleSegment=x.getVisibleSegment,n.findPointOnPath=x.findPointOnPath;var C=e(1426);n.extendFlat=C.extendFlat,n.extendDeep=C.extendDeep,n.extendDeepAll=C.extendDeepAll,n.extendDeepNoArrays=C.extendDeepNoArrays;var D=e(47769);n.log=D.log,n.warn=D.warn,n.error=D.error;var L=e(30587);n.counterRegex=L.counter;var w=e(79990);n.throttle=w.throttle,n.throttleDone=w.done,n.clearThrottle=w.clear;var M=e(24401);n.getGraphDiv=M.getGraphDiv,n.isPlotDiv=M.isPlotDiv,n.removeElement=M.removeElement,n.addStyleRule=M.addStyleRule,n.addRelatedStyleRule=M.addRelatedStyleRule,n.deleteRelatedStyleRule=M.deleteRelatedStyleRule,n.getFullTransformMatrix=M.getFullTransformMatrix,n.getElementTransformMatrix=M.getElementTransformMatrix,n.getElementAndAncestors=M.getElementAndAncestors,n.equalDomRects=M.equalDomRects,n.clearResponsive=e(86367),n.preserveDrawingBuffer=e(45142),n.makeTraceGroups=e(77310),n._=e(15867),n.notifier=e(75046),n.filterUnique=e(75744),n.filterVisible=e(76756),n.pushUnique=e(75138),n.increment=e(39240),n.cleanNumber=e(95218),n.ensureNumber=function($){return y($)?($=Number($),$>l||$=$?!1:y(he)&&he>=0&&he%1===0},n.noop=e(64213),n.identity=e(23389),n.repeat=function(he,$){for(var Z=new Array($),K=0;K<$;K++)Z[K]=he;return Z},n.swapAttrs=function(he,$,Z,K){Z||(Z="x"),K||(K="y");for(var Q=0;Q<$.length;Q++){var ae=$[Q],fe=n.nestedProperty(he,ae.replace("?",Z)),te=n.nestedProperty(he,ae.replace("?",K)),ne=fe.get();fe.set(te.get()),te.set(ne)}},n.raiseToTop=function($){$.parentNode.appendChild($)},n.cancelTransition=function(he){return he.transition().duration(0)},n.constrain=function(he,$,Z){return $>Z?Math.max(Z,Math.min($,he)):Math.max($,Math.min(Z,he))},n.bBoxIntersect=function(he,$,Z){return Z=Z||0,he.left<=$.right+Z&&$.left<=he.right+Z&&he.top<=$.bottom+Z&&$.top<=he.bottom+Z},n.simpleMap=function(he,$,Z,K,Q){for(var ae=he.length,fe=new Array(ae),te=0;te=Math.pow(2,Z)?Q>10?(n.warn("randstr failed uniqueness"),fe):he($,Z,K,(Q||0)+1):fe},n.OptionControl=function(he,$){he||(he={}),$||($="opt");var Z={};return Z.optionList=[],Z._newoption=function(K){K[$]=he,Z[K.name]=K,Z.optionList.push(K)},Z["_"+$]=he,Z},n.smooth=function(he,$){if($=Math.round($)||0,$<2)return he;var Z=he.length,K=2*Z,Q=2*$-1,ae=new Array(Q),fe=new Array(Z),te,ne,ce,oe;for(te=0;te=K&&(ce-=K*Math.floor(ce/K)),ce<0?ce=-1-ce:ce>=Z&&(ce=K-1-ce),oe+=he[ce]*ae[ne];fe[te]=oe}return fe},n.syncOrAsync=function(he,$,Z){var K,Q;function ae(){return n.syncOrAsync(he,$,Z)}for(;he.length;)if(Q=he.splice(0,1)[0],K=Q($),K&&K.then)return K.then(ae);return Z&&Z($)},n.stripTrailingSlash=function(he){return he.substr(-1)==="/"?he.substr(0,he.length-1):he},n.noneOrAll=function(he,$,Z){if(!!he){var K=!1,Q=!0,ae,fe;for(ae=0;ae0?Q:0})},n.fillArray=function(he,$,Z,K){if(K=K||n.identity,n.isArrayOrTypedArray(he))for(var Q=0;Q<$.length;Q++)$[Q][Z]=K(he[Q])},n.castOption=function(he,$,Z,K){K=K||n.identity;var Q=n.nestedProperty(he,Z).get();return n.isArrayOrTypedArray(Q)?Array.isArray($)&&n.isArrayOrTypedArray(Q[$[0]])?K(Q[$[0]][$[1]]):K(Q[$]):Q},n.extractOption=function(he,$,Z,K){if(Z in he)return he[Z];var Q=n.nestedProperty($,K).get();if(!Array.isArray(Q))return Q};function S(he){var $={};for(var Z in he)for(var K=he[Z],Q=0;Q1?Q+fe[1]:"";if(ae&&(fe.length>1||te.length>4||Z))for(;K.test(te);)te=te.replace(K,"$1"+ae+"$2");return te+ne},n.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var G=/^\w*$/;n.templateString=function(he,$){var Z={};return he.replace(n.TEMPLATE_STRING_REGEX,function(K,Q){var ae;return G.test(Q)?ae=$[Q]:(Z[Q]=Z[Q]||n.nestedProperty($,Q).get,ae=Z[Q]()),n.isValidTextValue(ae)?ae:""})};var z={max:10,count:0,name:"hovertemplate"};n.hovertemplateString=function(){return B.apply(z,arguments)};var U={max:10,count:0,name:"texttemplate"};n.texttemplateString=function(){return B.apply(U,arguments)};var H=/^[:|\|]/;function B(he,$,Z){var K=this,Q=arguments;$||($={});var ae={};return he.replace(n.TEMPLATE_STRING_REGEX,function(fe,te,ne){var ce=te==="xother"||te==="yother",oe=te==="_xother"||te==="_yother",de=te==="_xother_"||te==="_yother_",we=te==="xother_"||te==="yother_",Se=ce||oe||we||de,Te=te;(oe||de)&&(Te=Te.substring(1)),(we||de)&&(Te=Te.substring(0,Te.length-1));var Fe;if(Se){if(Fe=$[Te],Fe===void 0)return""}else{var Ie,Me;for(Me=3;Me=W&&fe<=q,ce=te>=W&&te<=q;if(ne&&(K=10*K+fe-W),ce&&(Q=10*Q+te-W),!ne||!ce){if(K!==Q)return K-Q;if(fe!==te)return fe-te}}return Q-K};var re=2e9;n.seedPseudoRandom=function(){re=2e9},n.pseudoRandom=function(){var he=re;return re=(69069*re+1)%4294967296,Math.abs(re-he)<429496729?n.pseudoRandom():re/4294967296},n.fillText=function(he,$,Z){var K=Array.isArray(Z)?function(fe){Z.push(fe)}:function(fe){Z.text=fe},Q=n.extractOption(he,$,"htx","hovertext");if(n.isValidTextValue(Q))return K(Q);var ae=n.extractOption(he,$,"tx","text");if(n.isValidTextValue(ae))return K(ae)},n.isValidTextValue=function(he){return he||he===0},n.formatPercent=function(he,$){$=$||0;for(var Z=(Math.round(100*he*Math.pow(10,$))*Math.pow(.1,$)).toFixed($)+"%",K=0;K<$;K++)Z.indexOf(".")!==-1&&(Z=Z.replace("0%","%"),Z=Z.replace(".%","%"));return Z},n.isHidden=function(he){var $=window.getComputedStyle(he).display;return!$||$==="none"},n.strTranslate=function(he,$){return he||$?"translate("+he+","+$+")":""},n.strRotate=function(he){return he?"rotate("+he+")":""},n.strScale=function(he){return he!==1?"scale("+he+")":""},n.getTextTransform=function(he){var $=he.noCenter,Z=he.textX,K=he.textY,Q=he.targetX,ae=he.targetY,fe=he.anchorX||0,te=he.anchorY||0,ne=he.rotate,ce=he.scale;return ce?ce>1&&(ce=1):ce=0,n.strTranslate(Q-ce*(Z+fe),ae-ce*(K+te))+n.strScale(ce)+(ne?"rotate("+ne+($?"":" "+Z+" "+K)+")":"")},n.setTransormAndDisplay=function(he,$){he.attr("transform",n.getTextTransform($)),he.style("display",$.scale?null:"none")},n.ensureUniformFontSize=function(he,$){var Z=n.extendFlat({},$);return Z.size=Math.max($.size,he._fullLayout.uniformtext.minsize||0),Z},n.join2=function(he,$,Z){var K=he.length;return K>1?he.slice(0,-1).join($)+Z+he[K-1]:he.join($)},n.bigFont=function(he){return Math.round(1.2*he)};var ie=n.getFirefoxVersion(),le=ie!==null&&ie<86;n.getPositionFromD3Event=function(){return le?[i.event.layerX,i.event.layerY]:[i.event.offsetX,i.event.offsetY]}},41965:function(R){R.exports=function(e){return window&&window.process&&window.process.versions?Object.prototype.toString.call(e)==="[object Object]":Object.prototype.toString.call(e)==="[object Object]"&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}},66636:function(R,F,e){var i=e(65487),m=/^\w*$/,t=0,y=1,p=2,l=3,d=4;R.exports=function(n,u,a,o){a=a||"name",o=o||"value";var c,s,b,g={};u&&u.length?(b=i(n,u),s=b.get()):s=n,u=u||"";var A={};if(s)for(c=0;c2)return g[C]=g[C]|p,h.set(x,null);if(v){for(c=C;c1){var p=["LOG:"];for(y=0;y1){var l=[];for(y=0;y"),"long")}},t.warn=function(){var y;if(i.logging>0){var p=["WARN:"];for(y=0;y0){var l=[];for(y=0;y"),"stick")}},t.error=function(){var y;if(i.logging>0){var p=["ERROR:"];for(y=0;y0){var l=[];for(y=0;y"),"stick")}}},77310:function(R,F,e){var i=e(39898);R.exports=function(t,y,p){var l=t.selectAll("g."+p.replace(/\s/g,".")).data(y,function(r){return r[0].trace.uid});l.exit().remove(),l.enter().append("g").attr("class",p),l.order();var d=t.classed("rangeplot")?"nodeRangePlot3":"node3";return l.each(function(r){r[0][d]=i.select(this)}),l}},35657:function(R,F,e){var i=e(79576);F.init2dArray=function(m,t){for(var y=new Array(m),p=0;pm/2?i-Math.round(i/m)*m:i}R.exports={mod:F,modHalf:e}},65487:function(R,F,e){var i=e(92770),m=e(73627).isArrayOrTypedArray;R.exports=function(o,c){if(i(c))c=String(c);else if(typeof c!="string"||c.substr(c.length-4)==="[-1]")throw"bad property string";for(var s=0,b=c.split("."),g,A,v;s/g),s=0;sr||C===m||Cu||h&&c(v))}function b(v,h){var x=v[0],C=v[1];if(x===m||xr||C===m||Cu)return!1;var D=l.length,L=l[0][0],w=l[0][1],M=0,S,f,P,E,k;for(S=1;SMath.max(f,L)||C>Math.max(P,w)))if(Ca||Math.abs(i(b,c))>r)return!0;return!1},t.filter=function(p,l){var d=[p[0]],r=0,n=0;function u(o){p.push(o);var c=d.length,s=r;d.splice(n+1);for(var b=s+1;b1){var a=p.pop();u(a)}return{addPt:u,raw:p,filtered:d}}},79749:function(R,F,e){var i=e(58617),m=e(98580);R.exports=function(y,p,l){var d=y._fullLayout,r=!0;return d._glcanvas.each(function(n){if(n.regl){n.regl.preloadCachedCode(l);return}if(!(n.pick&&!d._has("parcoords"))){try{n.regl=m({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:y._context.plotGlPixelRatio||e.g.devicePixelRatio,extensions:p||[],cachedCode:l||{}})}catch{r=!1}n.regl||(r=!1),r&&this.addEventListener("webglcontextlost",function(u){y&&y.emit&&y.emit("plotly_webglcontextlost",{event:u,layer:n.key})},!1)}}),r||i({container:d._glcontainer.node()}),r}},45142:function(R,F,e){var i=e(92770),m=e(35791);R.exports=function(p){var l;if(p&&p.hasOwnProperty("userAgent")?l=p.userAgent:l=t(),typeof l!="string")return!0;var d=m({ua:{headers:{"user-agent":l}},tablet:!0,featureDetect:!1});if(!d)for(var r=l.split(" "),n=1;n-1;a--){var o=r[a];if(o.substr(0,8)==="Version/"){var c=o.substr(8).split(".")[0];if(i(c)&&(c=+c),c>=13)return!0}}}return d};function t(){var y;return typeof navigator<"u"&&(y=navigator.userAgent),y&&y.headers&&typeof y.headers["user-agent"]=="string"&&(y=y.headers["user-agent"]),y}},75138:function(R){R.exports=function(e,i){if(i instanceof RegExp){for(var m=i.toString(),t=0;tm.queueLength&&(p.undoQueue.queue.shift(),p.undoQueue.index--)},y.startSequence=function(p){p.undoQueue=p.undoQueue||{index:0,queue:[],sequence:!1},p.undoQueue.sequence=!0,p.undoQueue.beginSequence=!0},y.stopSequence=function(p){p.undoQueue=p.undoQueue||{index:0,queue:[],sequence:!1},p.undoQueue.sequence=!1,p.undoQueue.beginSequence=!1},y.undo=function(l){var d,r;if(!(l.undoQueue===void 0||isNaN(l.undoQueue.index)||l.undoQueue.index<=0)){for(l.undoQueue.index--,d=l.undoQueue.queue[l.undoQueue.index],l.undoQueue.inSequence=!0,r=0;r=l.undoQueue.queue.length)){for(d=l.undoQueue.queue[l.undoQueue.index],l.undoQueue.inSequence=!0,r=0;r1?(a[s-1]-a[0])/(s-1):1,A,v;for(g>=0?v=o?l:d:v=o?n:r,u+=g*p*(o?-1:1)*(g>=0?1:-1);c90&&m.log("Long binary search..."),c-1};function l(u,a){return ua}function n(u,a){return u>=a}F.sorterAsc=function(u,a){return u-a},F.sorterDes=function(u,a){return a-u},F.distinctVals=function(u){var a=u.slice();a.sort(F.sorterAsc);var o;for(o=a.length-1;o>-1&&a[o]===y;o--);for(var c=a[o]-a[0]||1,s=c/(o||1)/1e4,b=[],g,A=0;A<=o;A++){var v=a[A],h=v-g;g===void 0?(b.push(v),g=v):h>s&&(c=Math.min(c,h),b.push(v),g=v)}return{vals:b,minDiff:c}},F.roundUp=function(u,a,o){for(var c=0,s=a.length-1,b,g=0,A=o?0:1,v=o?1:0,h=o?Math.ceil:Math.floor;c0&&(c=1),o&&c)return u.sort(a)}return c?u:u.reverse()},F.findIndexOfMin=function(u,a){a=a||t;for(var o=1/0,c,s=0;sp.length)&&(l=p.length),i(y)||(y=!1),m(p[0])){for(r=new Array(l),d=0;dt.length-1)return t[t.length-1];var p=y%1;return p*t[Math.ceil(y)]+(1-p)*t[Math.floor(y)]}},78614:function(R,F,e){var i=e(25075);function m(t){return t?i(t):[0,0,0,1]}R.exports=m},63893:function(R,F,e){var i=e(39898),m=e(71828),t=m.strTranslate,y=e(77922),p=e(18783).LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;F.convertToTspans=function(H,B,W){var q=H.text(),re=!H.attr("data-notex")&&B&&B._context.typesetMath&&typeof MathJax<"u"&&q.match(l),ie=i.select(H.node().parentNode);if(ie.empty())return;var le=H.attr("class")?H.attr("class").split(" ")[0]:"text";le+="-math",ie.selectAll("svg."+le).remove(),ie.selectAll("g."+le+"-group").remove(),H.style("display",null).attr({"data-unformatted":q,"data-math":"N"});function he(){ie.empty()||(le=H.attr("class")+"-math",ie.select("svg."+le).remove()),H.text("").style("white-space","pre");var $=O(H.node(),q);$&&H.style("pointer-events","all"),F.positionText(H),W&&W.call(H)}return re?(B&&B._promises||[]).push(new Promise(function($){H.style("display","none");var Z=parseInt(H.node().style.fontSize,10),K={fontSize:Z};a(re[2],K,function(Q,ae,fe){ie.selectAll("svg."+le).remove(),ie.selectAll("g."+le+"-group").remove();var te=Q&&Q.select("svg");if(!te||!te.node()){he(),$();return}var ne=ie.append("g").classed(le+"-group",!0).attr({"pointer-events":"none","data-unformatted":q,"data-math":"Y"});ne.node().appendChild(te.node()),ae&&ae.node()&&te.node().insertBefore(ae.node().cloneNode(!0),te.node().firstChild);var ce=fe.width,oe=fe.height;te.attr({class:le,height:oe,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var de=H.node().style.fill||"black",we=te.select("g");we.attr({fill:de,stroke:de});var Se=we.node().getBoundingClientRect(),Te=Se.width,Fe=Se.height;(Te>ce||Fe>oe)&&(te.style("overflow","hidden"),Se=te.node().getBoundingClientRect(),Te=Se.width,Fe=Se.height);var Ie=+H.attr("x"),Me=+H.attr("y"),Ae=Z||H.node().getBoundingClientRect().height,De=-Ae/4;if(le[0]==="y")ne.attr({transform:"rotate("+[-90,Ie,Me]+")"+t(-Te/2,De-Fe/2)});else if(le[0]==="l")Me=De-Fe/2;else if(le[0]==="a"&&le.indexOf("atitle")!==0)Ie=0,Me=De;else{var ke=H.attr("text-anchor");Ie=Ie-Te*(ke==="middle"?.5:ke==="end"?1:0),Me=Me+De-Fe/2}te.attr({x:Ie,y:Me}),W&&W.call(H,ne),$(ne)})})):he(),H};var d=/(<|<|<)/g,r=/(>|>|>)/g;function n(H){return H.replace(d,"\\lt ").replace(r,"\\gt ")}var u=[["$","$"],["\\(","\\)"]];function a(H,B,W){var q=parseInt((MathJax.version||"").split(".")[0]);if(q!==2&&q!==3){m.warn("No MathJax version:",MathJax.version);return}var re,ie,le,he,$=function(){return ie=m.extendDeepAll({},MathJax.Hub.config),le=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:u},displayAlign:"left"})},Z=function(){ie=m.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=u},K=function(){if(re=MathJax.Hub.config.menuSettings.renderer,re!=="SVG")return MathJax.Hub.setRenderer("SVG")},Q=function(){re=MathJax.config.startup.output,re!=="svg"&&(MathJax.config.startup.output="svg")},ae=function(){var de="math-output-"+m.randstr({},64);he=i.select("body").append("div").attr({id:de}).style({visibility:"hidden",position:"absolute","font-size":B.fontSize+"px"}).text(n(H));var we=he.node();return q===2?MathJax.Hub.Typeset(we):MathJax.typeset([we])},fe=function(){var de=he.select(q===2?".MathJax_SVG":".MathJax"),we=!de.empty()&&he.select("svg").node();if(!we)m.log("There was an error in the tex syntax.",H),W();else{var Se=we.getBoundingClientRect(),Te;q===2?Te=i.select("body").select("#MathJax_SVG_glyphs"):Te=de.select("defs"),W(de,Te,Se)}he.remove()},te=function(){if(re!=="SVG")return MathJax.Hub.setRenderer(re)},ne=function(){re!=="svg"&&(MathJax.config.startup.output=re)},ce=function(){return le!==void 0&&(MathJax.Hub.processSectionDelay=le),MathJax.Hub.Config(ie)},oe=function(){MathJax.config=ie};q===2?MathJax.Hub.Queue($,K,ae,fe,te,ce):q===3&&(Z(),Q(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){ae(),fe(),ne(),oe()}))}var o={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},c={sub:"0.3em",sup:"-0.6em"},s={sub:"-0.21em",sup:"0.42em"},b="\u200B",g=["http:","https:","mailto:","",void 0,":"],A=F.NEWLINES=/(\r\n?|\n)/g,v=/(<[^<>]*>)/,h=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=//i;F.BR_TAG_ALL=//gi;var C=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,D=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,L=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,w=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function M(H,B){if(!H)return null;var W=H.match(B),q=W&&(W[3]||W[4]);return q&&E(q)}var S=/(^|;)\s*color:/;F.plainText=function(H,B){B=B||{};for(var W=B.len!==void 0&&B.len!==-1?B.len:1/0,q=B.allowedTags!==void 0?B.allowedTags:["br"],re="...",ie=re.length,le=H.split(v),he=[],$="",Z=0,K=0;Kie?he.push(Q.substr(0,ne-ie)+re):he.push(Q.substr(0,ne));break}$=""}}return he.join("")};var f={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},P=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(H){return H.replace(P,function(B,W){var q;return W.charAt(0)==="#"?q=k(W.charAt(1)==="x"?parseInt(W.substr(2),16):parseInt(W.substr(1),10)):q=f[W],q||B})}F.convertEntities=E;function k(H){if(!(H>1114111)){var B=String.fromCodePoint;if(B)return B(H);var W=String.fromCharCode;return H<=65535?W(H):W((H>>10)+55232,H%1024+56320)}}function O(H,B){B=B.replace(A," ");var W=!1,q=[],re,ie=-1;function le(){ie++;var Fe=document.createElementNS(y.svg,"tspan");i.select(Fe).attr({class:"line",dy:ie*p+"em"}),H.appendChild(Fe),re=Fe;var Ie=q;if(q=[{node:Fe}],Ie.length>1)for(var Me=1;Me.",B);return}var Ie=q.pop();Fe!==Ie.type&&m.log("Start tag <"+Ie.type+"> doesnt match end tag <"+Fe+">. Pretending it did match.",B),re=q[q.length-1].node}var K=x.test(B);K?le():(re=H,q=[{node:H}]);for(var Q=B.split(v),ae=0;ael.ts+y){n();return}l.timer=setTimeout(function(){n(),l.timer=null},y)},F.done=function(m){var t=e[m];return!t||!t.timer?Promise.resolve():new Promise(function(y){var p=t.onDone;t.onDone=function(){p&&p(),y(),t.onDone=null}})},F.clear=function(m){if(m)i(e[m]),delete e[m];else for(var t in e)F.clear(t)};function i(m){m&&m.timer!==null&&(clearTimeout(m.timer),m.timer=null)}},58163:function(R,F,e){var i=e(92770);R.exports=function(t,y){if(t>0)return Math.log(t)/Math.LN10;var p=Math.log(Math.min(y[0],y[1]))/Math.LN10;return i(p)||(p=Math.log(Math.max(y[0],y[1]))/Math.LN10-6),p}},90973:function(R,F,e){var i=R.exports={},m=e(78776).locationmodeToLayer,t=e(96892).zL;i.getTopojsonName=function(y){return[y.scope.replace(/ /g,"-"),"_",y.resolution.toString(),"m"].join("")},i.getTopojsonPath=function(y,p){return y+p+".json"},i.getTopojsonFeatures=function(y,p){var l=m[y.locationmode],d=p.objects[l];return t(p,d).features}},37815:function(R){R.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},92177:function(R){R.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},14458:function(R,F,e){var i=e(73972);R.exports=function(t){for(var y=i.layoutArrayContainers,p=i.layoutArrayRegexes,l=t.split("[")[0],d,r,n=0;n0&&y.log("Clearing previous rejected promises from queue."),x._promises=[]},F.cleanLayout=function(x){var C,D;x||(x={}),x.xaxis1&&(x.xaxis||(x.xaxis=x.xaxis1),delete x.xaxis1),x.yaxis1&&(x.yaxis||(x.yaxis=x.yaxis1),delete x.yaxis1),x.scene1&&(x.scene||(x.scene=x.scene1),delete x.scene1);var L=(p.subplotsRegistry.cartesian||{}).attrRegex,w=(p.subplotsRegistry.polar||{}).attrRegex,M=(p.subplotsRegistry.ternary||{}).attrRegex,S=(p.subplotsRegistry.gl3d||{}).attrRegex,f=Object.keys(x);for(C=0;C3?(K.x=1.02,K.xanchor="left"):K.x<-2&&(K.x=-.02,K.xanchor="right"),K.y>3?(K.y=1.02,K.yanchor="bottom"):K.y<-2&&(K.y=-.02,K.yanchor="top")),o(x),x.dragmode==="rotate"&&(x.dragmode="orbit"),d.clean(x),x.template&&x.template.layout&&F.cleanLayout(x.template.layout),x};function a(x,C){var D=x[C],L=C.charAt(0);D&&D!=="paper"&&(x[C]=r(D,L,!0))}function o(x){x&&((typeof x.title=="string"||typeof x.title=="number")&&(x.title={text:x.title}),C("titlefont","font"),C("titleposition","position"),C("titleside","side"),C("titleoffset","offset"));function C(D,L){var w=x[D],M=x.title&&x.title[L];w&&!M&&(x.title||(x.title={}),x.title[L]=x[D],delete x[D])}}F.cleanData=function(x){for(var C=0;C0)return x.substr(0,C)}F.hasParent=function(x,C){for(var D=v(C);D;){if(D in x)return!0;D=v(D)}return!1};var h=["x","y","z"];F.clearAxisTypes=function(x,C,D){for(var L=0;L1&&t.warn("Full array edits are incompatible with other edits",s);var C=a[""][""];if(d(C))u.set(null);else if(Array.isArray(C))u.set(C);else return t.warn("Unrecognized full array edit value",s,C),!0;return v?!1:(b(h,x),g(n),!0)}var D=Object.keys(a).map(Number).sort(y),L=u.get(),w=L||[],M=c(x,s).get(),S=[],f=-1,P=w.length,E,k,O,G,z,U,H,B;for(E=0;Ew.length-(H?0:1)){t.warn("index out of range",s,O);continue}if(U!==void 0)z.length>1&&t.warn("Insertion & removal are incompatible with edits to the same index.",s,O),d(U)?S.push(O):H?(U==="add"&&(U={}),w.splice(O,0,U),M&&M.splice(O,0,{})):t.warn("Unrecognized full object edit value",s,O,U),f===-1&&(f=O);else for(k=0;k=0;E--)w.splice(S[E],1),M&&M.splice(S[E],1);if(w.length?L||u.set(w):u.set(null),v)return!1;if(b(h,x),A!==m){var W;if(f===-1)W=D;else{for(P=Math.max(w.length,P),W=[],E=0;E=f));E++)W.push(O);for(E=f;E=pe.data.length||st<-pe.data.length)throw new Error(Re+" must be valid indices for gd.data.");if(be.indexOf(st,He+1)>-1||st>=0&&be.indexOf(-pe.data.length+st)>-1||st<0&&be.indexOf(pe.data.length+st)>-1)throw new Error("each index in "+Re+" must be unique.")}}function H(pe,be,Re){if(!Array.isArray(pe.data))throw new Error("gd.data must be an array.");if(typeof be>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(be)||(be=[be]),U(pe,be,"currentIndices"),typeof Re<"u"&&!Array.isArray(Re)&&(Re=[Re]),typeof Re<"u"&&U(pe,Re,"newIndices"),typeof Re<"u"&&be.length!==Re.length)throw new Error("current and new indices must be of equal length.")}function B(pe,be,Re){var He,st;if(!Array.isArray(pe.data))throw new Error("gd.data must be an array.");if(typeof be>"u")throw new Error("traces must be defined.");for(Array.isArray(be)||(be=[be]),He=0;He"u")throw new Error("indices must be an integer or array of integers");U(pe,Re,"indices");for(var ct in be){if(!Array.isArray(be[ct])||be[ct].length!==Re.length)throw new Error("attribute "+ct+" must be an array of length equal to indices array length");if(st&&(!(ct in He)||!Array.isArray(He[ct])||He[ct].length!==be[ct].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}function q(pe,be,Re,He){var st=y.isPlainObject(He),ct=[],bt,Lt,Ut,Gt,Ft;Array.isArray(Re)||(Re=[Re]),Re=z(Re,pe.data.length-1);for(var tr in be)for(var lr=0;lr=0&&Ft=0&&Ft"u")return Gt=F.redraw(pe),d.add(pe,st,bt,ct,Lt),Gt;Array.isArray(Re)||(Re=[Re]);try{H(pe,He,Re)}catch(Ft){throw pe.data.splice(pe.data.length-be.length,be.length),Ft}return d.startSequence(pe),d.add(pe,st,bt,ct,Lt),Gt=F.moveTraces(pe,He,Re),d.stopSequence(pe),Gt}function Z(pe,be){pe=y.getGraphDiv(pe);var Re=[],He=F.addTraces,st=Z,ct=[pe,Re,be],bt=[pe,be],Lt,Ut;if(typeof be>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(be)||(be=[be]),U(pe,be,"indices"),be=z(be,pe.data.length-1),be.sort(y.sorterDes),Lt=0;Lt"u")for(Re=[],Gt=0;Gt-1&&ct.indexOf("grouptitlefont")===-1?Lt(ct,ct.replace("titlefont","title.font")):ct.indexOf("titleposition")>-1?Lt(ct,ct.replace("titleposition","title.position")):ct.indexOf("titleside")>-1?Lt(ct,ct.replace("titleside","title.side")):ct.indexOf("titleoffset")>-1&&Lt(ct,ct.replace("titleoffset","title.offset"));function Lt(Ut,Gt){pe[Gt]=pe[Ut],delete pe[Ut]}}function de(pe,be,Re){pe=y.getGraphDiv(pe),h.clearPromiseQueue(pe);var He={};if(typeof be=="string")He[be]=Re;else if(y.isPlainObject(be))He=y.extendFlat({},be);else return y.warn("Relayout fail.",be,Re),Promise.reject();Object.keys(He).length&&(pe.changed=!0);var st=Me(pe,He),ct=st.flags;ct.calc&&(pe.calcdata=void 0);var bt=[u.previousPromises];ct.layoutReplot?bt.push(x.layoutReplot):Object.keys(He).length&&(we(pe,ct,st)||u.supplyDefaults(pe),ct.legend&&bt.push(x.doLegend),ct.layoutstyle&&bt.push(x.layoutStyles),ct.axrange&&Se(bt,st.rangesAltered),ct.ticks&&bt.push(x.doTicksRelayout),ct.modebar&&bt.push(x.doModeBar),ct.camera&&bt.push(x.doCamera),ct.colorbars&&bt.push(x.doColorBars),bt.push(S)),bt.push(u.rehover,u.redrag,u.reselect),d.add(pe,de,[pe,st.undoit],de,[pe,st.redoit]);var Lt=y.syncOrAsync(bt,pe);return(!Lt||!Lt.then)&&(Lt=Promise.resolve(pe)),Lt.then(function(){return pe.emit("plotly_relayout",st.eventData),pe})}function we(pe,be,Re){var He=pe._fullLayout;if(!be.axrange)return!1;for(var st in be)if(st!=="axrange"&&be[st])return!1;for(var ct in Re.rangesAltered){var bt=a.id2name(ct),Lt=pe.layout[bt],Ut=He[bt];if(Ut.autorange=Lt.autorange,Lt.range&&(Ut.range=Lt.range.slice()),Ut.cleanRange(),Ut._matchGroup){for(var Gt in Ut._matchGroup)if(Gt!==ct){var Ft=He[a.id2name(Gt)];Ft.autorange=Ut.autorange,Ft.range=Ut.range.slice(),Ft._input.range=Ut.range.slice()}}}return!0}function Se(pe,be){var Re=be?function(He){var st=[],ct=!0;for(var bt in be){var Lt=a.getFromId(He,bt);if(st.push(bt),(Lt.ticklabelposition||"").indexOf("inside")!==-1&&Lt._anchorAxis&&st.push(Lt._anchorAxis._id),Lt._matchGroup)for(var Ut in Lt._matchGroup)be[Ut]||st.push(Ut)}return a.draw(He,st,{skipTitle:ct})}:function(He){return a.draw(He,"redraw")};pe.push(g,x.doAutoRangeAndConstraints,Re,x.drawData,x.finalDraw)}var Te=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Fe=/^[xyz]axis[0-9]*\.autorange$/,Ie=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Me(pe,be){var Re=pe.layout,He=pe._fullLayout,st=He._guiEditing,ct=fe(He._preGUI,st),bt=Object.keys(be),Lt=a.list(pe),Ut=y.extendDeepAll({},be),Gt={},Ft,tr,lr;for(oe(be),bt=Object.keys(be),tr=0;tr0&&typeof Mt.parts[Kt]!="string";)Kt--;var $t=Mt.parts[Kt],ir=Mt.parts[Kt-1]+"."+$t,Mr=Mt.parts.slice(0,Kt).join("."),Xe=p(pe.layout,Mr).get(),je=p(He,Mr).get(),It=Mt.get();if(zt!==void 0){br[Dt]=zt,dr[Dt]=$t==="reverse"?zt:ae(It);var _t=n.getLayoutValObject(He,Mt.parts);if(_t&&_t.impliedEdits&&zt!==null)for(var Zt in _t.impliedEdits)ht(y.relativeAttr(Dt,Zt),_t.impliedEdits[Zt]);if(["width","height"].indexOf(Dt)!==-1)if(zt){ht("autosize",null);var rr=Dt==="height"?"width":"height";ht(rr,He[rr])}else He[Dt]=pe._initialAutoSize[Dt];else if(Dt==="autosize")ht("width",zt?null:He.width),ht("height",zt?null:He.height);else if(ir.match(Te))St(ir),p(He,Mr+"._inputRange").set(null);else if(ir.match(Fe)){St(ir),p(He,Mr+"._inputRange").set(null);var sr=p(He,Mr).get();sr._inputDomain&&(sr._input.domain=sr._inputDomain.slice())}else ir.match(Ie)&&p(He,Mr+"._inputDomain").set(null);if($t==="type"){wt=Xe;var nr=je.type==="linear"&&zt==="log",Bt=je.type==="log"&&zt==="linear";if(nr||Bt){if(!wt||!wt.range)ht(Mr+".autorange",!0);else if(je.autorange)nr&&(wt.range=wt.range[1]>wt.range[0]?[1,2]:[2,1]);else{var hr=wt.range[0],pr=wt.range[1];nr?(hr<=0&&pr<=0&&ht(Mr+".autorange",!0),hr<=0?hr=pr/1e6:pr<=0&&(pr=hr/1e6),ht(Mr+".range[0]",Math.log(hr)/Math.LN10),ht(Mr+".range[1]",Math.log(pr)/Math.LN10)):(ht(Mr+".range[0]",Math.pow(10,hr)),ht(Mr+".range[1]",Math.pow(10,pr)))}Array.isArray(He._subplots.polar)&&He._subplots.polar.length&&He[Mt.parts[0]]&&Mt.parts[1]==="radialaxis"&&delete He[Mt.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(pe,je,zt,ht),r.getComponentMethod("images","convertCoords")(pe,je,zt,ht)}else ht(Mr+".autorange",!0),ht(Mr+".range",null);p(He,Mr+"._inputRange").set(null)}else if($t.match(D)){var wr=p(He,Dt).get(),vr=(zt||{}).type;(!vr||vr==="-")&&(vr="linear"),r.getComponentMethod("annotations","convertCoords")(pe,wr,vr,ht),r.getComponentMethod("images","convertCoords")(pe,wr,vr,ht)}var Jr=v.containerArrayMatch(Dt);if(Jr){Ft=Jr.array,tr=Jr.index;var _r=Jr.property,Br=_t||{editType:"calc"};tr!==""&&_r===""&&(v.isAddVal(zt)?dr[Dt]=null:v.isRemoveVal(zt)?dr[Dt]=(p(Re,Ft).get()||[])[tr]:y.warn("unrecognized full object value",be)),C.update(Yt,Br),Gt[Ft]||(Gt[Ft]={});var wn=Gt[Ft][tr];wn||(wn=Gt[Ft][tr]={}),wn[_r]=zt,delete be[Dt]}else $t==="reverse"?(Xe.range?Xe.range.reverse():(ht(Mr+".autorange",!0),Xe.range=[1,0]),je.autorange?Yt.calc=!0:Yt.plot=!0):(Dt==="dragmode"&&(zt===!1&&It!==!1||zt!==!1&&It===!1)||He._has("scatter-like")&&He._has("regl")&&Dt==="dragmode"&&(zt==="lasso"||zt==="select")&&!(It==="lasso"||It==="select")||He._has("gl2d")?Yt.plot=!0:_t?C.update(Yt,_t):Yt.calc=!0,Mt.set(zt))}}for(Ft in Gt){var Kr=v.applyContainerArrayChanges(pe,ct(Re,Ft),Gt[Ft],Yt,ct);Kr||(Yt.plot=!0)}for(var Fn in ut){wt=a.getFromId(pe,Fn);var In=wt&&wt._constraintGroup;if(In){Yt.calc=!0;for(var mr in In)ut[mr]||(a.getFromId(pe,mr)._constraintShrinkable=!0)}}return(Ae(pe)||be.height||be.width)&&(Yt.plot=!0),(Yt.plot||Yt.calc)&&(Yt.layoutReplot=!0),{flags:Yt,rangesAltered:ut,undoit:dr,redoit:br,eventData:Ut}}function Ae(pe){var be=pe._fullLayout,Re=be.width,He=be.height;return pe.layout.autosize&&u.plotAutoSize(pe,pe.layout,be),be.width!==Re||be.height!==He}function De(pe,be,Re,He){pe=y.getGraphDiv(pe),h.clearPromiseQueue(pe),y.isPlainObject(be)||(be={}),y.isPlainObject(Re)||(Re={}),Object.keys(be).length&&(pe.changed=!0),Object.keys(Re).length&&(pe.changed=!0);var st=h.coerceTraceIndices(pe,He),ct=ce(pe,y.extendFlat({},be),st),bt=ct.flags,Lt=Me(pe,y.extendFlat({},Re)),Ut=Lt.flags;(bt.calc||Ut.calc)&&(pe.calcdata=void 0),bt.clearAxisTypes&&h.clearAxisTypes(pe,st,Re);var Gt=[];Ut.layoutReplot?Gt.push(x.layoutReplot):bt.fullReplot?Gt.push(F._doPlot):(Gt.push(u.previousPromises),we(pe,Ut,Lt)||u.supplyDefaults(pe),bt.style&&Gt.push(x.doTraceStyle),(bt.colorbars||Ut.colorbars)&&Gt.push(x.doColorBars),Ut.legend&&Gt.push(x.doLegend),Ut.layoutstyle&&Gt.push(x.layoutStyles),Ut.axrange&&Se(Gt,Lt.rangesAltered),Ut.ticks&&Gt.push(x.doTicksRelayout),Ut.modebar&&Gt.push(x.doModeBar),Ut.camera&&Gt.push(x.doCamera),Gt.push(S)),Gt.push(u.rehover,u.redrag,u.reselect),d.add(pe,De,[pe,ct.undoit,Lt.undoit,ct.traces],De,[pe,ct.redoit,Lt.redoit,ct.traces]);var Ft=y.syncOrAsync(Gt,pe);return(!Ft||!Ft.then)&&(Ft=Promise.resolve(pe)),Ft.then(function(){return pe.emit("plotly_update",{data:ct.eventData,layout:Lt.eventData}),pe})}function ke(pe){return function(Re){Re._fullLayout._guiEditing=!0;var He=pe.apply(null,arguments);return Re._fullLayout._guiEditing=!1,He}}var We=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],_e=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function Ye(pe,be){for(var Re=0;Re1;)if(He.pop(),Re=p(be,He.join(".")+".uirevision").get(),Re!==void 0)return Re;return be.uirevision}function Ve(pe,be){for(var Re=0;Re=st.length?st[0]:st[Gt]:st}function Lt(Gt){return Array.isArray(ct)?Gt>=ct.length?ct[0]:ct[Gt]:ct}function Ut(Gt,Ft){var tr=0;return function(){if(Gt&&++tr===Ft)return Gt()}}return new Promise(function(Gt,Ft){function tr(){if(He._frameQueue.length!==0){for(;He._frameQueue.length;){var $t=He._frameQueue.pop();$t.onInterrupt&&$t.onInterrupt()}pe.emit("plotly_animationinterrupted",[])}}function lr($t){if($t.length!==0){for(var ir=0;ir<$t.length;ir++){var Mr;$t[ir].type==="byname"?Mr=u.computeFrame(pe,$t[ir].name):Mr=$t[ir].data;var Xe=Lt(ir),je=bt(ir);je.duration=Math.min(je.duration,Xe.duration);var It={frame:Mr,name:$t[ir].name,frameOpts:Xe,transitionOpts:je};ir===$t.length-1&&(It.onComplete=Ut(Gt,2),It.onInterrupt=Ft),He._frameQueue.push(It)}Re.mode==="immediate"&&(He._lastFrameAt=-1/0),He._animationRaf||jt()}}function Or(){pe.emit("plotly_animated"),window.cancelAnimationFrame(He._animationRaf),He._animationRaf=null}function xt(){He._currentFrame&&He._currentFrame.onComplete&&He._currentFrame.onComplete();var $t=He._currentFrame=He._frameQueue.shift();if($t){var ir=$t.name?$t.name.toString():null;pe._fullLayout._currentFrame=ir,He._lastFrameAt=Date.now(),He._timeToNext=$t.frameOpts.duration,u.transition(pe,$t.frame.data,$t.frame.layout,h.coerceTraceIndices(pe,$t.frame.traces),$t.frameOpts,$t.transitionOpts).then(function(){$t.onComplete&&$t.onComplete()}),pe.emit("plotly_animatingframe",{name:ir,frame:$t.frame,animation:{frame:$t.frameOpts,transition:$t.transitionOpts}})}else Or()}function jt(){pe.emit("plotly_animating"),He._lastFrameAt=-1/0,He._timeToNext=0,He._runningTransitions=0,He._currentFrame=null;var $t=function(){He._animationRaf=window.requestAnimationFrame($t),Date.now()-He._lastFrameAt>He._timeToNext&&xt()};$t()}var Yt=0;function br($t){return Array.isArray(st)?Yt>=st.length?$t.transitionOpts=st[Yt]:$t.transitionOpts=st[0]:$t.transitionOpts=st,Yt++,$t}var dr,ht,ut=[],wt=be==null,St=Array.isArray(be),Dt=!wt&&!St&&y.isPlainObject(be);if(Dt)ut.push({type:"object",data:br(y.extendFlat({},be))});else if(wt||["string","number"].indexOf(typeof be)!==-1)for(dr=0;dr0&&VtVt)&&Kt.push(ht);ut=Kt}}ut.length>0?lr(ut):(pe.emit("plotly_animated"),Gt())})}function rt(pe,be,Re){if(pe=y.getGraphDiv(pe),be==null)return Promise.resolve();if(!y.isPlotDiv(pe))throw new Error("This element is not a Plotly plot: "+pe+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var He,st,ct,bt,Lt=pe._transitionData._frames,Ut=pe._transitionData._frameHash;if(!Array.isArray(be))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+be);var Gt=Lt.length+be.length*2,Ft=[],tr={};for(He=be.length-1;He>=0;He--)if(!!y.isPlainObject(be[He])){var lr=be[He].name,Or=(Ut[lr]||tr[lr]||{}).name,xt=be[He].name,jt=Ut[Or]||tr[Or];Or&&xt&&typeof xt=="number"&&jt&&LMt.index?-1:Dt.index=0;He--){if(st=Ft[He].frame,typeof st.name=="number"&&y.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!st.name)for(;Ut[st.name="frame "+pe._transitionData._counter++];);if(Ut[st.name]){for(ct=0;ct=0;Re--)He=be[Re],ct.push({type:"delete",index:He}),bt.unshift({type:"insert",index:He,value:st[He]});var Lt=u.modifyFrames,Ut=u.modifyFrames,Gt=[pe,bt],Ft=[pe,ct];return d&&d.add(pe,Lt,Gt,Ut,Ft),u.modifyFrames(pe,ct)}function qe(pe){pe=y.getGraphDiv(pe);var be=pe._fullLayout||{},Re=pe._fullData||[];return u.cleanPlot([],{},Re,be),u.purge(pe),l.purge(pe),be._container&&be._container.remove(),delete pe._context,pe}function Oe(pe){var be=pe._fullLayout,Re=pe.getBoundingClientRect();if(!y.equalDomRects(Re,be._lastBBox)){var He=be._invTransform=y.inverseTransformMatrix(y.getFullTransformMatrix(pe));be._invScaleX=Math.sqrt(He[0][0]*He[0][0]+He[0][1]*He[0][1]+He[0][2]*He[0][2]),be._invScaleY=Math.sqrt(He[1][0]*He[1][0]+He[1][1]*He[1][1]+He[1][2]*He[1][2]),be._lastBBox=Re}}function Ce(pe){var be=i.select(pe),Re=pe._fullLayout;if(Re._calcInverseTransform=Oe,Re._calcInverseTransform(pe),Re._container=be.selectAll(".plot-container").data([0]),Re._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),Re._paperdiv=Re._container.selectAll(".svg-container").data([0]),Re._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),Re._glcontainer=Re._paperdiv.selectAll(".gl-container").data([{}]),Re._glcontainer.enter().append("div").classed("gl-container",!0),Re._paperdiv.selectAll(".main-svg").remove(),Re._paperdiv.select(".modebar-container").remove(),Re._paper=Re._paperdiv.insert("svg",":first-child").classed("main-svg",!0),Re._toppaper=Re._paperdiv.append("svg").classed("main-svg",!0),Re._modebardiv=Re._paperdiv.append("div"),delete Re._modeBar,Re._hoverpaper=Re._paperdiv.append("svg").classed("main-svg",!0),!Re._uid){var He={};i.selectAll("defs").each(function(){this.id&&(He[this.id.split("-")[1]]=1)}),Re._uid=y.randstr(He)}Re._paperdiv.selectAll(".main-svg").attr(b.svgAttrs),Re._defs=Re._paper.append("defs").attr("id","defs-"+Re._uid),Re._clips=Re._defs.append("g").classed("clips",!0),Re._topdefs=Re._toppaper.append("defs").attr("id","topdefs-"+Re._uid),Re._topclips=Re._topdefs.append("g").classed("clips",!0),Re._bgLayer=Re._paper.append("g").classed("bglayer",!0),Re._draggers=Re._paper.append("g").classed("draglayer",!0);var st=Re._paper.append("g").classed("layer-below",!0);Re._imageLowerLayer=st.append("g").classed("imagelayer",!0),Re._shapeLowerLayer=st.append("g").classed("shapelayer",!0),Re._cartesianlayer=Re._paper.append("g").classed("cartesianlayer",!0),Re._polarlayer=Re._paper.append("g").classed("polarlayer",!0),Re._smithlayer=Re._paper.append("g").classed("smithlayer",!0),Re._ternarylayer=Re._paper.append("g").classed("ternarylayer",!0),Re._geolayer=Re._paper.append("g").classed("geolayer",!0),Re._funnelarealayer=Re._paper.append("g").classed("funnelarealayer",!0),Re._pielayer=Re._paper.append("g").classed("pielayer",!0),Re._iciclelayer=Re._paper.append("g").classed("iciclelayer",!0),Re._treemaplayer=Re._paper.append("g").classed("treemaplayer",!0),Re._sunburstlayer=Re._paper.append("g").classed("sunburstlayer",!0),Re._indicatorlayer=Re._toppaper.append("g").classed("indicatorlayer",!0),Re._glimages=Re._paper.append("g").classed("glimages",!0);var ct=Re._toppaper.append("g").classed("layer-above",!0);Re._imageUpperLayer=ct.append("g").classed("imagelayer",!0),Re._shapeUpperLayer=ct.append("g").classed("shapelayer",!0),Re._selectionLayer=Re._toppaper.append("g").classed("selectionlayer",!0),Re._infolayer=Re._toppaper.append("g").classed("infolayer",!0),Re._menulayer=Re._toppaper.append("g").classed("menulayer",!0),Re._zoomlayer=Re._toppaper.append("g").classed("zoomlayer",!0),Re._hoverlayer=Re._hoverpaper.append("g").classed("hoverlayer",!0),Re._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),pe.emit("plotly_framework")}F.animate=Be,F.addFrames=rt,F.deleteFrames=ot,F.addTraces=$,F.deleteTraces=Z,F.extendTraces=le,F.moveTraces=K,F.prependTraces=he,F.newPlot=G,F._doPlot=M,F.purge=qe,F.react=vt,F.redraw=O,F.relayout=de,F.restyle=Q,F.setPlotConfig=f,F.update=De,F._guiRelayout=ke(de),F._guiRestyle=ke(Q),F._guiUpdate=ke(De),F._storeDirectGUIEdit=ne},72075:function(R){var F={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},globalTransforms:{valType:"any",dflt:[]},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},e={};function i(m,t){for(var y in m){var p=m[y];p.valType?t[y]=p.dflt:(t[y]||(t[y]={}),i(p,t[y]))}}i(F,e),R.exports={configAttributes:F,dfltConfig:e}},86281:function(R,F,e){var i=e(73972),m=e(71828),t=e(9012),y=e(10820),p=e(31391),l=e(85594),d=e(72075).configAttributes,r=e(30962),n=m.extendDeepAll,u=m.isPlainObject,a=m.isArrayOrTypedArray,o=m.nestedProperty,c=m.valObjectMeta,s="_isSubplotObj",b="_isLinkedToArray",g="_arrayAttrRegexps",A="_deprecated",v=[s,b,g,A];F.IS_SUBPLOT_OBJ=s,F.IS_LINKED_TO_ARRAY=b,F.DEPRECATED=A,F.UNDERSCORE_ATTRS=v,F.get=function(){var G={};i.allTypes.forEach(function(U){G[U]=D(U)});var z={};return Object.keys(i.transformsRegistry).forEach(function(U){z[U]=w(U)}),{defs:{valObjects:c,metaKeys:v.concat(["description","role","editType","impliedEdits"]),editType:{traces:r.traces,layout:r.layout},impliedEdits:{}},traces:G,layout:L(),transforms:z,frames:M(),animation:S(l),config:S(d)}},F.crawl=function(G,z,U,H){var B=U||0;H=H||"",Object.keys(G).forEach(function(W){var q=G[W];if(v.indexOf(W)===-1){var re=(H?H+".":"")+W;z(q,W,G,B,re),!F.isValObject(q)&&u(q)&&W!=="impliedEdits"&&F.crawl(q,z,B+1,re)}})},F.isValObject=function(G){return G&&G.valType!==void 0},F.findArrayAttributes=function(G){var z=[],U=[],H=[],B,W;function q(Z,K,Q,ae){U=U.slice(0,ae).concat([K]),H=H.slice(0,ae).concat([Z&&Z._isLinkedToArray]);var fe=Z&&(Z.valType==="data_array"||Z.arrayOk===!0)&&!(U[ae-1]==="colorbar"&&(K==="ticktext"||K==="tickvals"));!fe||re(B,0,"")}function re(Z,K,Q){var ae=Z[U[K]],fe=Q+U[K];if(K===U.length-1)a(ae)&&z.push(W+fe);else if(H[K]){if(Array.isArray(ae))for(var te=0;te=q.length)return!1;B=(i.transformsRegistry[q[re].type]||{}).attributes,W=B&&B[z[2]],H=3}else{var ie=G._module;if(ie||(ie=(i.modules[G.type||t.type.dflt]||{})._module),!ie)return!1;if(B=ie.attributes,W=B&&B[U],!W){var le=ie.basePlotModule;le&&le.attributes&&(W=le.attributes[U])}W||(W=t[U])}return x(W,z,H)},F.getLayoutValObject=function(G,z){var U=h(G,z[0]);return x(U,z,1)};function h(G,z){var U,H,B,W,q=G._basePlotModules;if(q){var re;for(U=0;U=W.length)return!1;if(G.dimensions===2){if(U++,z.length===U)return G;var q=z[U];if(!C(q))return!1;G=W[B][q]}else G=W[B]}else G=W}}return G}function C(G){return G===Math.round(G)&&G>=0}function D(G){var z,U;z=i.modules[G]._module,U=z.basePlotModule;var H={};H.type=null;var B=n({},t),W=n({},z.attributes);F.crawl(W,function(ie,le,he,$,Z){o(B,Z).set(void 0),ie===void 0&&o(W,Z).set(void 0)}),n(H,B),i.traceIs(G,"noOpacity")&&delete H.opacity,i.traceIs(G,"showLegend")||(delete H.showlegend,delete H.legendgroup),i.traceIs(G,"noHover")&&(delete H.hoverinfo,delete H.hoverlabel),z.selectPoints||delete H.selectedpoints,n(H,W),U.attributes&&n(H,U.attributes),H.type=G;var q={meta:z.meta||{},categories:z.categories||{},animatable:Boolean(z.animatable),type:G,attributes:S(H)};if(z.layoutAttributes){var re={};n(re,z.layoutAttributes),q.layoutAttributes=S(re)}return z.animatable||F.crawl(q,function(ie){F.isValObject(ie)&&"anim"in ie&&delete ie.anim}),q}function L(){var G={},z,U;n(G,y);for(z in i.subplotsRegistry)if(U=i.subplotsRegistry[z],!!U.layoutAttributes)if(Array.isArray(U.attr))for(var H=0;H=u&&(n._input||{})._templateitemname;o&&(a=u);var c=r+"["+a+"]",s;function b(){s={},o&&(s[c]={},s[c][t]=o)}b();function g(x,C){s[x]=C}function A(x,C){o?i.nestedProperty(s[c],x).set(C):s[c+"."+x]=C}function v(){var x=s;return b(),x}function h(x,C){x&&A(x,C);var D=v();for(var L in D)i.nestedProperty(d,L).set(D[L])}return{modifyBase:g,modifyItem:A,getUpdateObj:v,applyUpdate:h}}},61549:function(R,F,e){var i=e(39898),m=e(73972),t=e(74875),y=e(71828),p=e(63893),l=e(33306),d=e(7901),r=e(91424),n=e(92998),u=e(64168),a=e(89298),o=e(18783),c=e(99082),s=c.enforce,b=c.clean,g=e(71739).doAutoRange,A="start",v="middle",h="end";F.layoutStyles=function(U){return y.syncOrAsync([t.doAutoMargin,C],U)};function x(U,H,B){for(var W=0;W=U[1]||q[1]<=U[0])&&re[0]H[0])return!0}return!1}function C(U){var H=U._fullLayout,B=H._size,W=B.p,q=a.list(U,"",!0),re,ie,le,he,$,Z;if(H._paperdiv.style({width:U._context.responsive&&H.autosize&&!U._context._hasZeroWidth&&!U.layout.width?"100%":H.width+"px",height:U._context.responsive&&H.autosize&&!U._context._hasZeroHeight&&!U.layout.height?"100%":H.height+"px"}).selectAll(".main-svg").call(r.setSize,H.width,H.height),U._context.setBackground(U,H.paper_bgcolor),F.drawMainTitle(U),u.manage(U),!H._has("cartesian"))return t.previousPromises(U);function K(Ce,pe,be){var Re=Ce._lw/2;if(Ce._id.charAt(0)==="x"){if(pe){if(be==="top")return pe._offset-W-Re}else return B.t+B.h*(1-(Ce.position||0))+Re%1;return pe._offset+pe._length+W+Re}if(pe){if(be==="right")return pe._offset+pe._length+W+Re}else return B.l+B.w*(Ce.position||0)+Re%1;return pe._offset-W-Re}for(re=0;re0&&(P(U,re,$,he),le.attr({x:ie,y:re,"text-anchor":W,dy:O(H.yanchor)}).call(p.positionText,ie,re))}};function M(U,H,B,W,q){var re=H.yref==="paper"?U._fullLayout._size.h:U._fullLayout.height,ie=y.isTopAnchor(H)?W:W-q,le=B==="b"?re-ie:ie;return y.isTopAnchor(H)&&B==="t"||y.isBottomAnchor(H)&&B==="b"?!1:le.5?"t":"b",ie=U._fullLayout.margin[re],le=0;return H.yref==="paper"?le=B+H.pad.t+H.pad.b:H.yref==="container"&&(le=S(re,W,q,U._fullLayout.height,B)+H.pad.t+H.pad.b),le>ie?le:0}function P(U,H,B,W){var q="title.automargin",re=U._fullLayout.title,ie=re.y>.5?"t":"b",le={x:re.x,y:re.y,t:0,b:0},he={};re.yref==="paper"&&M(U,re,ie,H,W)?le[ie]=B:re.yref==="container"&&(he[ie]=B,U._fullLayout._reservedMargin[q]=he),t.allowAutoMargin(U,q),t.autoMargin(U,q,le)}function E(U,H){var B=U.title,W=U._size,q=0;switch(H===A?q=B.pad.l:H===h&&(q=-B.pad.r),B.xref){case"paper":return W.l+W.w*B.x+q;case"container":default:return U.width*B.x+q}}function k(U,H){var B=U.title,W=U._size,q=0;if(H==="0em"||!H?q=-B.pad.b:H===o.CAP_SHIFT+"em"&&(q=B.pad.t),B.y==="auto")return W.t/2;switch(B.yref){case"paper":return W.t+W.h-W.h*B.y+q;case"container":default:return U.height-U.height*B.y+q}}function O(U){return U==="top"?o.CAP_SHIFT+.3+"em":U==="bottom"?"-0.3em":o.MID_SHIFT+"em"}function G(U){var H=U.title,B=v;return y.isRightAnchor(H)?B=h:y.isLeftAnchor(H)&&(B=A),B}function z(U){var H=U.title,B="0em";return y.isTopAnchor(H)?B=o.CAP_SHIFT+"em":y.isMiddleAnchor(H)&&(B=o.MID_SHIFT+"em"),B}F.doTraceStyle=function(U){var H=U.calcdata,B=[],W;for(W=0;Wz?D.push({code:"unused",traceType:E,templateCount:G,dataCount:z}):z>G&&D.push({code:"reused",traceType:E,templateCount:G,dataCount:z})}}function U(H,B){for(var W in H)if(W.charAt(0)!=="_"){var q=H[W],re=c(H,W,B);m(q)?(Array.isArray(H)&&q._template===!1&&q.templateitemname&&D.push({code:"missing",path:re,templateitemname:q.templateitemname}),U(q,re)):Array.isArray(q)&&s(q)&&U(q,re)}}if(U({data:w,layout:L},""),D.length)return D.map(b)};function s(g){for(var A=0;A1&&D.push(o("object","layout"))),m.supplyDefaults(L);for(var S=L._fullData,f=w.length,P=0;PE.length&&C.push(o("unused",D,f.concat(E.length)));var H=E.length,B=Array.isArray(U);B&&(H=Math.min(H,U.length));var W,q,re,ie,le;if(k.dimensions===2)for(q=0;qE[q].length&&C.push(o("unused",D,f.concat(q,E[q].length)));var he=E[q].length;for(W=0;W<(B?Math.min(he,U[q].length):he);W++)re=B?U[q][W]:U,ie=P[q][W],le=E[q][W],i.validate(ie,re)?le!==ie&&le!==+ie&&C.push(o("dynamic",D,f.concat(q,W),ie,le)):C.push(o("value",D,f.concat(q,W),ie))}else C.push(o("array",D,f.concat(q),P[q]));else for(q=0;q0&&Math.round(b)===b)s=b;else return{vals:a}}for(var g=n.calendar,A=o==="start",v=o==="end",h=r[u+"period0"],x=t(h,g)||0,C=[],D=[],L=[],w=a.length,M=0;MS;)E=y(E,-s,g);for(;E<=S;)E=y(E,s,g);P=y(E,-s,g)}else{for(f=Math.round((S-x)/c),E=x+f*c;E>S;)E-=c;for(;E<=S;)E+=c;P=E-c}C[M]=A?P:v?E:(P+E)/2,D[M]=P,L[M]=E}return{vals:C,starts:D,ends:L}}},89502:function(R){R.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},71739:function(R,F,e){var i=e(39898),m=e(92770),t=e(71828),y=e(50606).FP_SAFE,p=e(73972),l=e(91424),d=e(41675),r=d.getFromId,n=d.isLinked;R.exports={getAutoRange:u,makePadFn:o,doAutoRange:g,findExtremes:A,concatExtremes:b};function u(w,M){var S,f,P=[],E=w._fullLayout,k=o(E,M,0),O=o(E,M,1),G=b(w,M),z=G.min,U=G.max;if(z.length===0||U.length===0)return t.simpleMap(M.range,M.r2l);var H=z[0].val,B=U[0].val;for(S=1;S0&&(te=he-k(K)-O(Q),te>$?ne/te>Z&&(ae=K,fe=Q,Z=ne/te):ne/he>Z&&(ae={val:K.val,nopad:1},fe={val:Q.val,nopad:1},Z=ne/he));function ce(Te,Fe){return Math.max(Te,O(Fe))}if(H===B){var oe=H-1,de=H+1;if(ie)if(H===0)P=[0,1];else{var we=(H>0?U:z).reduce(ce,0),Se=H/(1-Math.min(.5,we/he));P=H>0?[0,Se]:[Se,0]}else le?P=[Math.max(0,oe),Math.max(1,de)]:P=[oe,de]}else ie?(ae.val>=0&&(ae={val:0,nopad:1}),fe.val<=0&&(fe={val:0,nopad:1})):le&&(ae.val-Z*k(ae)<0&&(ae={val:0,nopad:1}),fe.val<=0&&(fe={val:1,nopad:1})),Z=(fe.val-ae.val-a(M,K.val,Q.val))/(he-k(ae)-O(fe)),P=[ae.val-Z*k(ae),fe.val+Z*O(fe)];return W&&P.reverse(),t.simpleMap(P,M.l2r||Number)}function a(w,M,S){var f=0;if(w.rangebreaks)for(var P=w.locateBreaks(M,S),E=0;E0?S.ppadplus:S.ppadminus)||S.ppad||0),Q=Z((w._m>0?S.ppadminus:S.ppadplus)||S.ppad||0),ae=Z(S.vpadplus||S.vpad),fe=Z(S.vpadminus||S.vpad);if(!z){if(he=1/0,$=-1/0,G)for(H=0;H0&&(he=B),B>$&&B-y&&(he=B),B>$&&B=ce;H--)ne(H);return{min:f,max:P,opts:S}}function v(w,M,S,f){x(w,M,S,f,D)}function h(w,M,S,f){x(w,M,S,f,L)}function x(w,M,S,f,P){for(var E=f.tozero,k=f.extrapad,O=!0,G=0;G=S&&(z.extrapad||!k)){O=!1;break}else P(M,z.val)&&z.pad<=S&&(k||!z.extrapad)&&(w.splice(G,1),G--)}if(O){var U=E&&M===0;w.push({val:M,pad:U?0:S,extrapad:U?!1:k})}}function C(w){return m(w)&&Math.abs(w)=M}},89298:function(R,F,e){var i=e(39898),m=e(92770),t=e(74875),y=e(73972),p=e(71828),l=p.strTranslate,d=e(63893),r=e(92998),n=e(7901),u=e(91424),a=e(13838),o=e(66287),c=e(50606),s=c.ONEMAXYEAR,b=c.ONEAVGYEAR,g=c.ONEMINYEAR,A=c.ONEMAXQUARTER,v=c.ONEAVGQUARTER,h=c.ONEMINQUARTER,x=c.ONEMAXMONTH,C=c.ONEAVGMONTH,D=c.ONEMINMONTH,L=c.ONEWEEK,w=c.ONEDAY,M=w/2,S=c.ONEHOUR,f=c.ONEMIN,P=c.ONESEC,E=c.MINUS_SIGN,k=c.BADNUM,O={K:"zeroline"},G={K:"gridline",L:"path"},z={K:"minor-gridline",L:"path"},U={K:"tick",L:"path"},H={K:"tick",L:"text"},B={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},W=e(18783),q=W.MID_SHIFT,re=W.CAP_SHIFT,ie=W.LINE_SPACING,le=W.OPPOSITE_SIDE,he=3,$=R.exports={};$.setConvert=e(21994);var Z=e(4322),K=e(41675),Q=K.idSort,ae=K.isLinked;$.id2name=K.id2name,$.name2id=K.name2id,$.cleanId=K.cleanId,$.list=K.list,$.listIds=K.listIds,$.getFromId=K.getFromId,$.getFromTrace=K.getFromTrace;var fe=e(71739);$.getAutoRange=fe.getAutoRange,$.findExtremes=fe.findExtremes;var te=1e-4;function ne(Xe){var je=(Xe[1]-Xe[0])*te;return[Xe[0]-je,Xe[1]+je]}$.coerceRef=function(Xe,je,It,_t,Zt,rr){var sr=_t.charAt(_t.length-1),nr=It._fullLayout._subplots[sr+"axis"],Bt=_t+"ref",hr={};return Zt||(Zt=nr[0]||(typeof rr=="string"?rr:rr[0])),rr||(rr=Zt),nr=nr.concat(nr.map(function(pr){return pr+" domain"})),hr[Bt]={valType:"enumerated",values:nr.concat(rr?typeof rr=="string"?[rr]:rr:[]),dflt:Zt},p.coerce(Xe,je,hr,Bt)},$.getRefType=function(Xe){return Xe===void 0?Xe:Xe==="paper"?"paper":Xe==="pixel"?"pixel":/( domain)$/.test(Xe)?"domain":"range"},$.coercePosition=function(Xe,je,It,_t,Zt,rr){var sr,nr,Bt=$.getRefType(_t);if(Bt!=="range")sr=p.ensureNumber,nr=It(Zt,rr);else{var hr=$.getFromId(je,_t);rr=hr.fraction2r(rr),nr=It(Zt,rr),sr=hr.cleanPos}Xe[Zt]=sr(nr)},$.cleanPosition=function(Xe,je,It){var _t=It==="paper"||It==="pixel"?p.ensureNumber:$.getFromId(je,It).cleanPos;return _t(Xe)},$.redrawComponents=function(Xe,je){je=je||$.listIds(Xe);var It=Xe._fullLayout;function _t(Zt,rr,sr,nr){for(var Bt=y.getComponentMethod(Zt,rr),hr={},pr=0;pr2e-6||((It-Xe._forceTick0)/Xe._minDtick%1+1.000001)%1>2e-6)&&(Xe._minDtick=0))},$.saveRangeInitial=function(Xe,je){for(var It=$.list(Xe,"",!0),_t=!1,Zt=0;Ztwr*.3||hr(_t)||hr(Zt))){var vr=It.dtick/2;Xe+=Xe+vr<_t?vr:-vr}return Xe}function Se(Xe,je,It,_t,Zt){var rr=p.findExactDates(je,Zt),sr=.8;if(rr.exactDays>sr){var nr=Number(It.substr(1));rr.exactYears>sr&&nr%12===0?Xe=$.tickIncrement(Xe,"M6","reverse")+w*1.5:rr.exactMonths>sr?Xe=$.tickIncrement(Xe,"M1","reverse")+w*15.5:Xe-=M;var Bt=$.tickIncrement(Xe,It);if(Bt<=_t)return Bt}return Xe}$.prepMinorTicks=function(Xe,je,It){if(!je.minor.dtick){delete Xe.dtick;var _t=je.dtick&&m(je._tmin),Zt;if(_t){var rr=$.tickIncrement(je._tmin,je.dtick,!0);Zt=[je._tmin,rr*.99+je._tmin*.01]}else{var sr=p.simpleMap(je.range,je.r2l);Zt=[sr[0],.8*sr[0]+.2*sr[1]]}if(Xe.range=p.simpleMap(Zt,je.l2r),Xe._isMinor=!0,$.prepTicks(Xe,It),_t){var nr=m(je.dtick),Bt=m(Xe.dtick),hr=nr?je.dtick:+je.dtick.substring(1),pr=Bt?Xe.dtick:+Xe.dtick.substring(1);nr&&Bt?Te(hr,pr)?hr===2*L&&pr===2*w&&(Xe.dtick=L):hr===2*L&&pr===3*w?Xe.dtick=L:hr===L&&!(je._input.minor||{}).nticks?Xe.dtick=w:Fe(hr/pr,2.5)?Xe.dtick=hr/2:Xe.dtick=hr:String(je.dtick).charAt(0)==="M"?Bt?Xe.dtick="M1":Te(hr,pr)?hr>=12&&pr===2&&(Xe.dtick="M3"):Xe.dtick=je.dtick:String(Xe.dtick).charAt(0)==="L"?String(je.dtick).charAt(0)==="L"?Te(hr,pr)||(Xe.dtick=Fe(hr/pr,2.5)?je.dtick/2:je.dtick):Xe.dtick="D1":Xe.dtick==="D2"&&+je.dtick>1&&(Xe.dtick=1)}Xe.range=je.range}je.minor._tick0Init===void 0&&(Xe.tick0=je.tick0)};function Te(Xe,je){return Math.abs((Xe/je+.5)%1-.5)<.001}function Fe(Xe,je){return Math.abs(Xe/je-1)<.001}$.prepTicks=function(Xe,je){var It=p.simpleMap(Xe.range,Xe.r2l,void 0,void 0,je);if(Xe.tickmode==="auto"||!Xe.dtick){var _t=Xe.nticks,Zt;_t||(Xe.type==="category"||Xe.type==="multicategory"?(Zt=Xe.tickfont?p.bigFont(Xe.tickfont.size||12):15,_t=Xe._length/Zt):(Zt=Xe._id.charAt(0)==="y"?40:80,_t=p.constrain(Xe._length/Zt,4,9)+1),Xe._name==="radialaxis"&&(_t*=2)),Xe.minor&&Xe.minor.tickmode!=="array"||Xe.tickmode==="array"&&(_t*=100),Xe._roughDTick=Math.abs(It[1]-It[0])/_t,$.autoTicks(Xe,Xe._roughDTick),Xe._minDtick>0&&Xe.dtick0?(rr=_t-1,sr=_t):(rr=_t,sr=_t);var nr=Xe[rr].value,Bt=Xe[sr].value,hr=Math.abs(Bt-nr),pr=It||hr,wr=0;pr>=g?hr>=g&&hr<=s?wr=hr:wr=b:It===v&&pr>=h?hr>=h&&hr<=A?wr=hr:wr=v:pr>=D?hr>=D&&hr<=x?wr=hr:wr=C:It===L&&pr>=L?wr=L:pr>=w?wr=w:It===M&&pr>=M?wr=M:It===S&&pr>=S&&(wr=S);var vr;wr>=hr&&(wr=hr,vr=!0);var Jr=Zt+wr;if(je.rangebreaks&&wr>0){for(var _r=84,Br=0,wn=0;wn<_r;wn++){var Kr=(wn+.5)/_r;je.maskBreaks(Zt*(1-Kr)+Kr*Jr)!==k&&Br++}wr*=Br/_r,wr||(Xe[_t].drop=!0),vr&&hr>L&&(wr=hr)}(wr>0||_t===0)&&(Xe[_t].periodX=Zt+wr/2)}}$.calcTicks=function(je,It){for(var _t=je.type,Zt=je.calendar,rr=je.ticklabelstep,sr=je.ticklabelmode==="period",nr=p.simpleMap(je.range,je.r2l,void 0,void 0,It),Bt=nr[1]=(wn?0:1);Kr--){var Fn=!Kr;Kr?(je._dtickInit=je.dtick,je._tick0Init=je.tick0):(je.minor._dtickInit=je.minor.dtick,je.minor._tick0Init=je.minor.tick0);var In=Kr?je:p.extendFlat({},je,je.minor);if(Fn?$.prepMinorTicks(In,je,It):$.prepTicks(In,It),In.tickmode==="array"){Kr?(_r=[],vr=We(je)):(Br=[],Jr=We(je));continue}if(In.tickmode==="sync"){_r=[],vr=ke(je);continue}var mr=ne(nr),cr=mr[0],zr=mr[1],kr=m(In.dtick),un=_t==="log"&&!(kr||In.dtick.charAt(0)==="L"),xn=$.tickFirst(In,It);if(Kr){if(je._tmin=xn,xn=zr:bn<=zr;bn=$.tickIncrement(bn,sa,Bt,Zt)){if(Kr&&_n++,In.rangebreaks&&!Bt){if(bn=pr)break}if(_r.length>wr||bn===An)break;An=bn;var aa={value:bn};Kr?(un&&bn!==(bn|0)&&(aa.simpleLabel=!0),rr>1&&_n%rr&&(aa.skipLabel=!0),_r.push(aa)):(aa.minor=!0,Br.push(aa))}}if(wn){var fa=je.minor.ticks==="inside"&&je.ticks==="outside"||je.minor.ticks==="outside"&&je.ticks==="inside";if(!fa){for(var ra=_r.map(function(Mn){return Mn.value}),Nr=[],sn=0;sn-1;Ln--){if(_r[Ln].drop){_r.splice(Ln,1);continue}_r[Ln].value=Vt(_r[Ln].value,je);var ai=je.c2p(_r[Ln].value);(Gn?Fa>ai-oa:Fapr||hnpr&&(on.periodX=pr),hn_t&&wrb)je/=b,_t=Zt(10),Xe.dtick="M"+12*vt(je,_t,_e);else if(rr>C)je/=C,Xe.dtick="M"+vt(je,1,Ye);else if(rr>w){if(Xe.dtick=vt(je,w,Xe._hasDayOfWeekBreaks?[1,2,7,14]:Ve),!It){var sr=$.getTickFormat(Xe),nr=Xe.ticklabelmode==="period";nr&&(Xe._rawTick0=Xe.tick0),/%[uVW]/.test(sr)?Xe.tick0=p.dateTick0(Xe.calendar,2):Xe.tick0=p.dateTick0(Xe.calendar,1),nr&&(Xe._dowTick0=Xe.tick0)}}else rr>S?Xe.dtick=vt(je,S,Ye):rr>f?Xe.dtick=vt(je,f,Pe):rr>P?Xe.dtick=vt(je,P,Pe):(_t=Zt(10),Xe.dtick=vt(je,_t,_e))}else if(Xe.type==="log"){Xe.tick0=0;var Bt=p.simpleMap(Xe.range,Xe.r2l);if(Xe._isMinor&&(je*=1.5),je>.7)Xe.dtick=Math.ceil(je);else if(Math.abs(Bt[1]-Bt[0])<1){var hr=1.5*Math.abs((Bt[1]-Bt[0])/je);je=Math.abs(Math.pow(10,Bt[1])-Math.pow(10,Bt[0]))/hr,_t=Zt(10),Xe.dtick="L"+vt(je,_t,_e)}else Xe.dtick=je>.3?"D2":"D1"}else Xe.type==="category"||Xe.type==="multicategory"?(Xe.tick0=0,Xe.dtick=Math.ceil(Math.max(je,1))):zt(Xe)?(Xe.tick0=0,_t=1,Xe.dtick=vt(je,_t,lt)):(Xe.tick0=0,_t=Zt(10),Xe.dtick=vt(je,_t,_e));if(Xe.dtick===0&&(Xe.dtick=1),!m(Xe.dtick)&&typeof Xe.dtick!="string"){var pr=Xe.dtick;throw Xe.dtick=1,"ax.dtick error: "+String(pr)}};function mt(Xe){var je=Xe.dtick;if(Xe._tickexponent=0,!m(je)&&typeof je!="string"&&(je=1),(Xe.type==="category"||Xe.type==="multicategory")&&(Xe._tickround=null),Xe.type==="date"){var It=Xe.r2l(Xe.tick0),_t=Xe.l2r(It).replace(/(^-|i)/g,""),Zt=_t.length;if(String(je).charAt(0)==="M")Zt>10||_t.substr(5)!=="01-01"?Xe._tickround="d":Xe._tickround=+je.substr(1)%12===0?"y":"m";else if(je>=w&&Zt<=10||je>=w*15)Xe._tickround="d";else if(je>=f&&Zt<=16||je>=S)Xe._tickround="M";else if(je>=P&&Zt<=19||je>=f)Xe._tickround="S";else{var rr=Xe.l2r(It+je).replace(/^-/,"").length;Xe._tickround=Math.max(Zt,rr)-20,Xe._tickround<0&&(Xe._tickround=4)}}else if(m(je)||je.charAt(0)==="L"){var sr=Xe.range.map(Xe.r2d||Number);m(je)||(je=Number(je.substr(1))),Xe._tickround=2-Math.floor(Math.log(je)/Math.LN10+.01);var nr=Math.max(Math.abs(sr[0]),Math.abs(sr[1])),Bt=Math.floor(Math.log(nr)/Math.LN10+.01),hr=Xe.minexponent===void 0?3:Xe.minexponent;Math.abs(Bt)>hr&&(pe(Xe.exponentformat)&&!be(Bt)?Xe._tickexponent=3*Math.round((Bt-1)/3):Xe._tickexponent=Bt)}else Xe._tickround=null}$.tickIncrement=function(Xe,je,It,_t){var Zt=It?-1:1;if(m(je))return p.increment(Xe,Zt*je);var rr=je.charAt(0),sr=Zt*Number(je.substr(1));if(rr==="M")return p.incrementMonth(Xe,sr,_t);if(rr==="L")return Math.log(Math.pow(10,Xe)+sr)/Math.LN10;if(rr==="D"){var nr=je==="D2"?Ke:Ze,Bt=Xe+Zt*.01,hr=p.roundUp(p.mod(Bt,1),nr,It);return Math.floor(Bt)+Math.log(i.round(Math.pow(10,hr),1))/Math.LN10}throw"unrecognized dtick "+String(je)},$.tickFirst=function(Xe,je){var It=Xe.r2l||Number,_t=p.simpleMap(Xe.range,It,void 0,void 0,je),Zt=_t[1]<_t[0],rr=Zt?Math.floor:Math.ceil,sr=ne(_t)[0],nr=Xe.dtick,Bt=It(Xe.tick0);if(m(nr)){var hr=rr((sr-Bt)/nr)*nr+Bt;return(Xe.type==="category"||Xe.type==="multicategory")&&(hr=p.constrain(hr,0,Xe._categories.length-1)),hr}var pr=nr.charAt(0),wr=Number(nr.substr(1));if(pr==="M"){for(var vr=0,Jr=Bt,_r,Br,wn;vr<10;){if(_r=$.tickIncrement(Jr,nr,Zt,Xe.calendar),(_r-sr)*(Jr-sr)<=0)return Zt?Math.min(Jr,_r):Math.max(Jr,_r);Br=(sr-(Jr+_r)/2)/(_r-Jr),wn=pr+(Math.abs(Math.round(Br))||1)*wr,Jr=$.tickIncrement(Jr,wn,Br<0?!Zt:Zt,Xe.calendar),vr++}return p.error("tickFirst did not converge",Xe),Jr}else{if(pr==="L")return Math.log(rr((Math.pow(10,sr)-Bt)/wr)*wr+Bt)/Math.LN10;if(pr==="D"){var Kr=nr==="D2"?Ke:Ze,Fn=p.roundUp(p.mod(sr,1),Kr,Zt);return Math.floor(sr)+Math.log(i.round(Math.pow(10,Fn),1))/Math.LN10}else throw"unrecognized dtick "+String(nr)}},$.tickText=function(Xe,je,It,_t){var Zt=Et(Xe,je),rr=Xe.tickmode==="array",sr=It||rr,nr=Xe.type,Bt=nr==="category"?Xe.d2l_noadd:Xe.d2l,hr;if(rr&&Array.isArray(Xe.ticktext)){var pr=p.simpleMap(Xe.range,Xe.r2l),wr=(Math.abs(pr[1]-pr[0])-(Xe._lBreaks||0))/1e4;for(hr=0;hr=0&&Kr<=Xe._length?wn:null};Zt.xbnd=[Br(Zt.x-.5),Br(Zt.x+Xe.dtick-.5)]}return Zt},$.hoverLabelText=function(Xe,je,It){It&&(Xe=p.extendFlat({},Xe,{hoverformat:It}));var _t=Array.isArray(je)?je[0]:je,Zt=Array.isArray(je)?je[1]:void 0;if(Zt!==void 0&&Zt!==_t)return $.hoverLabelText(Xe,_t,It)+" - "+$.hoverLabelText(Xe,Zt,It);var rr=Xe.type==="log"&&_t<=0,sr=$.tickText(Xe,Xe.c2l(rr?-_t:_t),"hover").text;return rr?_t===0?"0":E+sr:sr};function Et(Xe,je,It){var _t=Xe.tickfont||{};return{x:je,dx:0,dy:0,text:It||"",fontSize:_t.size,font:_t.family,fontColor:_t.color}}function et(Xe,je,It,_t){var Zt=Xe._tickround,rr=It&&Xe.hoverformat||$.getTickFormat(Xe);_t&&(m(Zt)?Zt=4:Zt={y:"m",m:"d",d:"M",M:"S",S:4}[Zt]);var sr=p.formatDate(je.x,rr,Zt,Xe._dateFormat,Xe.calendar,Xe._extraFormat),nr,Bt=sr.indexOf(` +`);if(Bt!==-1&&(nr=sr.substr(Bt+1),sr=sr.substr(0,Bt)),_t&&(sr==="00:00:00"||sr==="00:00"?(sr=nr,nr=""):sr.length===8&&(sr=sr.replace(/:00$/,""))),nr)if(It)Zt==="d"?sr+=", "+nr:sr=nr+(sr?", "+sr:"");else if(!Xe._inCalcTicks||Xe._prevDateHead!==nr)Xe._prevDateHead=nr,sr+="
"+nr;else{var hr=Kt(Xe),pr=Xe._trueSide||Xe.side;(!hr&&pr==="top"||hr&&pr==="bottom")&&(sr+="
")}je.text=sr}function Ue(Xe,je,It,_t,Zt){var rr=Xe.dtick,sr=je.x,nr=Xe.tickformat,Bt=typeof rr=="string"&&rr.charAt(0);if(Zt==="never"&&(Zt=""),_t&&Bt!=="L"&&(rr="L3",Bt="L"),nr||Bt==="L")je.text=Re(Math.pow(10,sr),Xe,Zt,_t);else if(m(rr)||Bt==="D"&&p.mod(sr+.01,1)<.1){var hr=Math.round(sr),pr=Math.abs(hr),wr=Xe.exponentformat;wr==="power"||pe(wr)&&be(hr)?(hr===0?je.text=1:hr===1?je.text="10":je.text="10"+(hr>1?"":E)+pr+"",je.fontSize*=1.25):(wr==="e"||wr==="E")&&pr>2?je.text="1"+wr+(hr>0?"+":E)+pr:(je.text=Re(Math.pow(10,sr),Xe,"","fakehover"),rr==="D1"&&Xe._id.charAt(0)==="y"&&(je.dy-=je.fontSize/6))}else if(Bt==="D")je.text=String(Math.round(Math.pow(10,p.mod(sr,1)))),je.fontSize*=.75;else throw"unrecognized dtick "+String(rr);if(Xe.dtick==="D1"){var vr=String(je.text).charAt(0);(vr==="0"||vr==="1")&&(Xe._id.charAt(0)==="y"?je.dx-=je.fontSize/4:(je.dy+=je.fontSize/2,je.dx+=(Xe.range[1]>Xe.range[0]?1:-1)*je.fontSize*(sr<0?.5:.25)))}}function Be(Xe,je){var It=Xe._categories[Math.round(je.x)];It===void 0&&(It=""),je.text=String(It)}function rt(Xe,je,It){var _t=Math.round(je.x),Zt=Xe._categories[_t]||[],rr=Zt[1]===void 0?"":String(Zt[1]),sr=Zt[0]===void 0?"":String(Zt[0]);It?je.text=sr+" - "+rr:(je.text=rr,je.text2=sr)}function ot(Xe,je,It,_t,Zt){Zt==="never"?Zt="":Xe.showexponent==="all"&&Math.abs(je.x/Xe.dtick)<1e-6&&(Zt="hide"),je.text=Re(je.x,Xe,Zt,_t)}function qe(Xe,je,It,_t,Zt){if(Xe.thetaunit==="radians"&&!It){var rr=je.x/180;if(rr===0)je.text="0";else{var sr=Oe(rr);if(sr[1]>=100)je.text=Re(p.deg2rad(je.x),Xe,Zt,_t);else{var nr=je.x<0;sr[1]===1?sr[0]===1?je.text="\u03C0":je.text=sr[0]+"\u03C0":je.text=["",sr[0],"","\u2044","",sr[1],"","\u03C0"].join(""),nr&&(je.text=E+je.text)}}}else je.text=Re(je.x,Xe,Zt,_t)}function Oe(Xe){function je(nr,Bt){return Math.abs(nr-Bt)<=1e-6}function It(nr,Bt){return je(Bt,0)?nr:It(Bt,nr%Bt)}function _t(nr){for(var Bt=1;!je(Math.round(nr*Bt)/Bt,nr);)Bt*=10;return Bt}var Zt=_t(Xe),rr=Xe*Zt,sr=Math.abs(It(rr,Zt));return[Math.round(rr/sr),Math.round(Zt/sr)]}var Ce=["f","p","n","\u03BC","m","","k","M","G","T"];function pe(Xe){return Xe==="SI"||Xe==="B"}function be(Xe){return Xe>14||Xe<-15}function Re(Xe,je,It,_t){var Zt=Xe<0,rr=je._tickround,sr=It||je.exponentformat||"B",nr=je._tickexponent,Bt=$.getTickFormat(je),hr=je.separatethousands;if(_t){var pr={exponentformat:sr,minexponent:je.minexponent,dtick:je.showexponent==="none"?je.dtick:m(Xe)&&Math.abs(Xe)||1,range:je.showexponent==="none"?je.range.map(je.r2d):[0,Xe||1]};mt(pr),rr=(Number(pr._tickround)||0)+4,nr=pr._tickexponent,je.hoverformat&&(Bt=je.hoverformat)}if(Bt)return je._numFormat(Bt)(Xe).replace(/-/g,E);var wr=Math.pow(10,-rr)/2;if(sr==="none"&&(nr=0),Xe=Math.abs(Xe),Xe"+_r+"":sr==="B"&&nr===9?Xe+="B":pe(sr)&&(Xe+=Ce[nr/3+5])}return Zt?E+Xe:Xe}$.getTickFormat=function(Xe){var je;function It(Bt){return typeof Bt!="string"?Bt:Number(Bt.replace("M",""))*C}function _t(Bt,hr){var pr=["L","D"];if(typeof Bt==typeof hr){if(typeof Bt=="number")return Bt-hr;var wr=pr.indexOf(Bt.charAt(0)),vr=pr.indexOf(hr.charAt(0));return wr===vr?Number(Bt.replace(/(L|D)/g,""))-Number(hr.replace(/(L|D)/g,"")):wr-vr}else return typeof Bt=="number"?1:-1}function Zt(Bt,hr,pr){var wr=pr||function(_r){return _r},vr=hr[0],Jr=hr[1];return(!vr&&typeof vr!="number"||wr(vr)<=wr(Bt))&&(!Jr&&typeof Jr!="number"||wr(Jr)>=wr(Bt))}function rr(Bt,hr){var pr=hr[0]===null,wr=hr[1]===null,vr=_t(Bt,hr[0])>=0,Jr=_t(Bt,hr[1])<=0;return(pr||vr)&&(wr||Jr)}var sr,nr;if(Xe.tickformatstops&&Xe.tickformatstops.length>0)switch(Xe.type){case"date":case"linear":{for(je=0;je=0&&Zt.unshift(Zt.splice(pr,1).shift())}});var nr={false:{left:0,right:0}};return p.syncOrAsync(Zt.map(function(Bt){return function(){if(!!Bt){var hr=$.getFromId(Xe,Bt);It||(It={}),It.axShifts=nr,It.overlayingShiftedAx=sr;var pr=$.drawOne(Xe,hr,It);return hr._shiftPusher&&ir(hr,hr._fullDepth||0,nr,!0),hr._r=hr.range.slice(),hr._rl=p.simpleMap(hr._r,hr.r2l),pr}}}))},$.drawOne=function(Xe,je,It){It=It||{};var _t=It.axShifts||{},Zt=It.overlayingShiftedAx||[],rr,sr,nr;je.setScale();var Bt=Xe._fullLayout,hr=je._id,pr=hr.charAt(0),wr=$.counterLetter(hr),vr=Bt._plots[je._mainSubplot];if(!vr)return;if(je._shiftPusher=je.autoshift||Zt.indexOf(je._id)!==-1||Zt.indexOf(je.overlaying)!==-1,je._shiftPusher&je.anchor==="free"){var Jr=je.linewidth/2||0;je.ticks==="inside"&&(Jr+=je.ticklen),ir(je,Jr,_t,!0),ir(je,je.shift||0,_t,!1)}(It.skipTitle!==!0||je._shift===void 0)&&(je._shift=Mr(je,_t));var _r=vr[pr+"axislayer"],Br=je._mainLinePosition,wn=Br+=je._shift,Kr=je._mainMirrorPosition,Fn=je._vals=$.calcTicks(je),In=[je.mirror,wn,Kr].join("_");for(rr=0;rr0?gn.bottom-On:0,Yn))));var la=0,ua=0;if(je._shiftPusher&&(la=Math.max(Yn,gn.height>0?Ir==="l"?On-gn.left:gn.right-On:0),je.title.text!==Bt._dfltTitle[pr]&&(ua=(je._titleStandoff||0)+(je._titleScoot||0),Ir==="l"&&(ua+=lr(je))),je._fullDepth=Math.max(la,ua)),je.automargin){kn={x:0,y:0,r:0,l:0,t:0,b:0};var ya=[0,1],Po=typeof je._shift=="number"?je._shift:0;if(pr==="x"){if(Ir==="b"?kn[Ir]=je._depth:(kn[Ir]=je._depth=Math.max(gn.width>0?On-gn.top:0,Yn),ya.reverse()),gn.width>0){var Xo=gn.right-(je._offset+je._length);Xo>0&&(kn.xr=1,kn.r=Xo);var es=je._offset-gn.left;es>0&&(kn.xl=0,kn.l=es)}}else if(Ir==="l"?(je._depth=Math.max(gn.height>0?On-gn.left:0,Yn),kn[Ir]=je._depth-Po):(je._depth=Math.max(gn.height>0?gn.right-On:0,Yn),kn[Ir]=je._depth+Po,ya.reverse()),gn.height>0){var ss=gn.bottom-(je._offset+je._length);ss>0&&(kn.yb=0,kn.b=ss);var ts=je._offset-gn.top;ts>0&&(kn.yt=1,kn.t=ts)}kn[wr]=je.anchor==="free"?je.position:je._anchorAxis.domain[ya[0]],je.title.text!==Bt._dfltTitle[pr]&&(kn[Ir]+=lr(je)+(je.title.standoff||0)),je.mirror&&je.anchor!=="free"&&(ea={x:0,y:0,r:0,l:0,t:0,b:0},ea[dn]=je.linewidth,je.mirror&&je.mirror!==!0&&(ea[dn]+=Yn),je.mirror===!0||je.mirror==="ticks"?ea[wr]=je._anchorAxis.domain[ya[1]]:(je.mirror==="all"||je.mirror==="allticks")&&(ea[wr]=[je._counterDomainMin,je._counterDomainMax][ya[1]]))}Er&&(ca=y.getComponentMethod("rangeslider","autoMarginOpts")(Xe,je)),typeof je.automargin=="string"&&(He(kn,je.automargin),He(ea,je.automargin)),t.autoMargin(Xe,dr(je),kn),t.autoMargin(Xe,ht(je),ea),t.autoMargin(Xe,ut(je),ca)}),p.syncOrAsync(cn)}};function He(Xe,je){if(!!Xe){var It=Object.keys(B).reduce(function(_t,Zt){return je.indexOf(Zt)!==-1&&B[Zt].forEach(function(rr){_t[rr]=1}),_t},{});Object.keys(Xe).forEach(function(_t){It[_t]||(_t.length===1?Xe[_t]=0:delete Xe[_t])})}}function st(Xe,je){var It=[],_t,Zt=function(rr,sr){var nr=rr.xbnd[sr];nr!==null&&It.push(p.extendFlat({},rr,{x:nr}))};if(je.length){for(_t=0;_t60?-.5*sa:Xe.side==="top"!==pr?-sa:0};else if(kr==="y"){if(xn=!pr&&zr==="left"||pr&&zr==="right",mr=xn?1:-1,pr&&(mr*=-1),Kr=vr,Fn=Jr*mr,In=0,!pr&&Math.abs(un)===90&&(un===-90&&zr==="left"||un===90&&zr==="right"?In=re:In=.5),pr){var An=m(un)?+un:0;if(An!==0){var bn=p.deg2rad(An);cr=Math.abs(Math.sin(bn))*re*mr,In=0}}wn.xFn=function(_n){return _n.dx+je-(Kr+_n.fontSize*In)*mr+cr*_n.fontSize},wn.yFn=function(_n){return _n.dy+Fn+_n.fontSize*q},wn.anchorFn=function(_n,Qn){return m(Qn)&&Math.abs(Qn)===90?"middle":xn?"end":"start"},wn.heightFn=function(_n,Qn,sa){return Xe.side==="right"&&(Qn*=-1),Qn<-30?-sa:Qn<30?-.5*sa:0}}return wn};function Ft(Xe){return[Xe.text,Xe.x,Xe.axInfo,Xe.font,Xe.fontSize,Xe.fontColor].join("_")}$.drawTicks=function(Xe,je,It){It=It||{};var _t=je._id+"tick",Zt=[].concat(je.minor&&je.minor.ticks?It.vals.filter(function(sr){return sr.minor&&!sr.noTick}):[]).concat(je.ticks?It.vals.filter(function(sr){return!sr.minor&&!sr.noTick}):[]),rr=It.layer.selectAll("path."+_t).data(Zt,Ft);rr.exit().remove(),rr.enter().append("path").classed(_t,1).classed("ticks",1).classed("crisp",It.crisp!==!1).each(function(sr){return n.stroke(i.select(this),sr.minor?je.minor.tickcolor:je.tickcolor)}).style("stroke-width",function(sr){return u.crispRound(Xe,sr.minor?je.minor.tickwidth:je.tickwidth,1)+"px"}).attr("d",It.path).style("display",null),$t(je,[U]),rr.attr("transform",It.transFn)},$.drawGrid=function(Xe,je,It){if(It=It||{},je.tickmode!=="sync"){var _t=je._id+"grid",Zt=je.minor&&je.minor.showgrid,rr=Zt?It.vals.filter(function(Kr){return Kr.minor}):[],sr=je.showgrid?It.vals.filter(function(Kr){return!Kr.minor}):[],nr=It.counterAxis;if(nr&&$.shouldShowZeroLine(Xe,je,nr))for(var Bt=je.tickmode==="array",hr=0;hr=0;_r--){var Br=_r?vr:Jr;if(!!Br){var wn=Br.selectAll("path."+_t).data(_r?sr:rr,Ft);wn.exit().remove(),wn.enter().append("path").classed(_t,1).classed("crisp",It.crisp!==!1),wn.attr("transform",It.transFn).attr("d",It.path).each(function(Kr){return n.stroke(i.select(this),Kr.minor?je.minor.gridcolor:je.gridcolor||"#ddd")}).style("stroke-dasharray",function(Kr){return u.dashStyle(Kr.minor?je.minor.griddash:je.griddash,Kr.minor?je.minor.gridwidth:je.gridwidth)}).style("stroke-width",function(Kr){return(Kr.minor?wr:je._gw)+"px"}).style("display",null),typeof It.path=="function"&&wn.attr("d",It.path)}}$t(je,[G,z])}},$.drawZeroLine=function(Xe,je,It){It=It||It;var _t=je._id+"zl",Zt=$.shouldShowZeroLine(Xe,je,It.counterAxis),rr=It.layer.selectAll("path."+_t).data(Zt?[{x:0,id:je._id}]:[]);rr.exit().remove(),rr.enter().append("path").classed(_t,1).classed("zl",1).classed("crisp",It.crisp!==!1).each(function(){It.layer.selectAll("path").sort(function(sr,nr){return Q(sr.id,nr.id)})}),rr.attr("transform",It.transFn).attr("d",It.path).call(n.stroke,je.zerolinecolor||n.defaultLine).style("stroke-width",u.crispRound(Xe,je.zerolinewidth,je._gw||1)+"px").style("display",null),$t(je,[O])},$.drawLabels=function(Xe,je,It){It=It||{};var _t=Xe._fullLayout,Zt=je._id,rr=Zt.charAt(0),sr=It.cls||Zt+"tick",nr=It.vals.filter(function(mr){return mr.text}),Bt=It.labelFns,hr=It.secondary?0:je.tickangle,pr=(je._prevTickAngles||{})[sr],wr=It.layer.selectAll("g."+sr).data(je.showticklabels?nr:[],Ft),vr=[];wr.enter().append("g").classed(sr,1).append("text").attr("text-anchor","middle").each(function(mr){var cr=i.select(this),zr=Xe._promises.length;cr.call(d.positionText,Bt.xFn(mr),Bt.yFn(mr)).call(u.font,mr.font,mr.fontSize,mr.fontColor).text(mr.text).call(d.convertToTspans,Xe),Xe._promises[zr]?vr.push(Xe._promises.pop().then(function(){Jr(cr,hr)})):Jr(cr,hr)}),$t(je,[H]),wr.exit().remove(),It.repositionOnUpdate&&wr.each(function(mr){i.select(this).select("text").call(d.positionText,Bt.xFn(mr),Bt.yFn(mr))});function Jr(mr,cr){mr.each(function(zr){var kr=i.select(this),un=kr.select(".text-math-group"),xn=Bt.anchorFn(zr,cr),An=It.transFn.call(kr.node(),zr)+(m(cr)&&+cr!=0?" rotate("+cr+","+Bt.xFn(zr)+","+(Bt.yFn(zr)-zr.fontSize/2)+")":""),bn=d.lineCount(kr),_n=ie*zr.fontSize,Qn=Bt.heightFn(zr,m(cr)?+cr:0,(bn-1)*_n);if(Qn&&(An+=l(0,Qn)),un.empty()){var sa=kr.select("text");sa.attr({transform:An,"text-anchor":xn}),sa.style("opacity",1),je._adjustTickLabelsOverflow&&je._adjustTickLabelsOverflow()}else{var aa=u.bBox(un.node()).width,fa=aa*{end:-.5,start:.5}[xn];un.attr("transform",An+l(fa,0))}})}je._adjustTickLabelsOverflow=function(){var mr=je.ticklabeloverflow;if(!(!mr||mr==="allow")){var cr=mr.indexOf("hide")!==-1,zr=je._id.charAt(0)==="x",kr=0,un=zr?Xe._fullLayout.width:Xe._fullLayout.height;if(mr.indexOf("domain")!==-1){var xn=p.simpleMap(je.range,je.r2l);kr=je.l2p(xn[0])+je._offset,un=je.l2p(xn[1])+je._offset}var An=Math.min(kr,un),bn=Math.max(kr,un),_n=je.side,Qn=1/0,sa=-1/0;wr.each(function(Nr){var sn=i.select(this),an=sn.select(".text-math-group");if(an.empty()){var pn=u.bBox(sn.node()),Hn=0;zr?(pn.right>bn||pn.leftbn||pn.top+(je.tickangle?0:Nr.fontSize/4)je["_visibleLabelMin_"+xn._id]?Nr.style("display","none"):bn.K==="tick"&&!An&&Nr.style("display",null)})})})})},Jr(wr,pr+1?pr:hr);function _r(){return vr.length&&Promise.all(vr)}var Br=null;function wn(){if(Jr(wr,hr),nr.length&&rr==="x"&&!m(hr)&&(je.type!=="log"||String(je.dtick).charAt(0)!=="D")){Br=0;var mr=0,cr=[],zr;if(wr.each(function(pn){mr=Math.max(mr,pn.fontSize);var Hn=je.l2p(pn.x),Dn=br(this),Ln=u.bBox(Dn.node());cr.push({top:0,bottom:10,height:10,left:Hn-Ln.width/2,right:Hn+Ln.width/2+2,width:Ln.width+2})}),(je.tickson==="boundaries"||je.showdividers)&&!It.secondary){var kr=2;for(je.ticks&&(kr+=je.tickwidth/2),zr=0;zr1&&It1)for(Zt=1;Zt=Zt.min&&Xeh*2}function a(s){return Math.max(1,(s-1)/1e3)}function o(s,b){for(var g=s.length,A=a(g),v=0,h=0,x={},C=0;Cv*2}function c(s){return y(s[0])&&y(s[1])}},71453:function(R,F,e){var i=e(92770),m=e(73972),t=e(71828),y=e(44467),p=e(85501),l=e(13838),d=e(26218),r=e(38701),n=e(96115),u=e(89426),a=e(15258),o=e(92128),c=e(21994),s=e(85555).WEEKDAY_PATTERN,b=e(85555).HOUR_PATTERN;R.exports=function(x,C,D,L,w){var M=L.letter,S=L.font||{},f=L.splomStash||{},P=D("visible",!L.visibleDflt),E=C._template||{},k=C.type||E.type||"-",O;if(k==="date"){var G=m.getComponentMethod("calendars","handleDefaults");G(x,C,"calendar",L.calendar),L.noTicklabelmode||(O=D("ticklabelmode"))}var z="";(!L.noTicklabelposition||k==="multicategory")&&(z=t.coerce(x,C,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:O==="period"?["outside","inside"]:M==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),L.noTicklabeloverflow||D("ticklabeloverflow",z.indexOf("inside")!==-1?"hide past domain":k==="category"||k==="multicategory"?"allow":"hide past div"),c(C,w);var U=!C.isValidRange(x.range);U&&L.reverseDflt&&(U="reversed");var H=D("autorange",U);H&&(k==="linear"||k==="-")&&D("rangemode"),D("range"),C.cleanRange(),a(x,C,D,L),k!=="category"&&!L.noHover&&D("hoverformat");var B=D("color"),W=B!==l.color.dflt?B:S.color,q=f.label||w._dfltTitle[M];if(u(x,C,D,k,L),!P)return C;D("title.text",q),t.coerceFont(D,"title.font",{family:S.family,size:t.bigFont(S.size),color:W}),d(x,C,D,k);var re=L.hasMinor;if(re&&(y.newContainer(C,"minor"),d(x,C,D,k,{isMinor:!0})),n(x,C,D,k,L),r(x,C,D,L),re){var ie=L.isMinor;L.isMinor=!0,r(x,C,D,L),L.isMinor=ie}o(x,C,D,{dfltColor:B,bgColor:L.bgColor,showGrid:L.showGrid,hasMinor:re,attributes:l}),re&&!C.minor.ticks&&!C.minor.showgrid&&delete C.minor,(C.showline||C.ticks)&&D("mirror");var le=k==="multicategory";if(!L.noTickson&&(k==="category"||le)&&(C.ticks||C.showgrid)){var he;le&&(he="boundaries");var $=D("tickson",he);$==="boundaries"&&delete C.ticklabelposition}if(le){var Z=D("showdividers");Z&&(D("dividercolor"),D("dividerwidth"))}if(k==="date")if(p(x,C,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:g}),!C.rangebreaks.length)delete C.rangebreaks;else{for(var K=0;K=2){var M="",S,f;if(w.length===2){for(S=0;S<2;S++)if(f=v(w[S]),f){M=s;break}}var P=D("pattern",M);if(P===s)for(S=0;S<2;S++)f=v(w[S]),f&&(x.bounds[S]=w[S]=f-1);if(P)for(S=0;S<2;S++)switch(f=w[S],P){case s:if(!i(f)){x.enabled=!1;return}if(f=+f,f!==Math.floor(f)||f<0||f>=7){x.enabled=!1;return}x.bounds[S]=w[S]=f;break;case b:if(!i(f)){x.enabled=!1;return}if(f=+f,f<0||f>24){x.enabled=!1;return}x.bounds[S]=w[S]=f;break}if(C.autorange===!1){var E=C.range;if(E[0]E[1]){x.enabled=!1;return}}else if(w[0]>E[0]&&w[1]d?1:-1:+(y.substr(1)||1)-+(p.substr(1)||1)},F.ref2id=function(y){return/^[xyz]/.test(y)?y.split(" ")[0]:!1};function t(y,p){if(p&&p.length){for(var l=0;l0,d;l&&(d="array");var r=t("categoryorder",d),n;r==="array"&&(n=t("categoryarray")),!l&&r==="array"&&(r=m.categoryorder="trace"),r==="trace"?m._initialCategories=[]:r==="array"?m._initialCategories=n.slice():(n=F(m,y).sort(),r==="category ascending"?m._initialCategories=n:r==="category descending"&&(m._initialCategories=n.reverse()))}}},66287:function(R,F,e){var i=e(92770),m=e(71828),t=e(50606),y=t.ONEDAY,p=t.ONEWEEK;F.dtick=function(l,d){var r=d==="log",n=d==="date",u=d==="category",a=n?y:1;if(!l)return a;if(i(l))return l=Number(l),l<=0?a:u?Math.max(1,Math.round(l)):n?Math.max(.1,l):l;if(typeof l!="string"||!(n||r))return a;var o=l.charAt(0),c=l.substr(1);return c=i(c)?Number(c):0,c<=0||!(n&&o==="M"&&c===Math.round(c)||r&&o==="L"||r&&o==="D"&&(c===1||c===2))?a:l},F.tick0=function(l,d,r,n){if(d==="date")return m.cleanDate(l,m.dateTick0(r,n%p===0?1:0));if(!(n==="D1"||n==="D2"))return i(l)?Number(l):0}},85555:function(R,F,e){var i=e(30587).counter;R.exports={idRegex:{x:i("x","( domain)?"),y:i("y","( domain)?")},attrRegex:i("[xy]axis"),xAxisMatch:i("xaxis"),yAxisMatch:i("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},99082:function(R,F,e){var i=e(71828),m=e(71739),t=e(41675).id2name,y=e(13838),p=e(42449),l=e(21994),d=e(50606).ALMOST_EQUAL,r=e(18783).FROM_BL;F.handleDefaults=function(g,A,v){var h=v.axIds,x=v.axHasImage,C=A._axisConstraintGroups=[],D=A._axisMatchGroups=[],L,w,M,S,f,P,E,k;for(L=0;LC?v.substr(C):h.substr(x))+D}function s(g,A){for(var v=A._size,h=v.h/v.w,x={},C=Object.keys(g),D=0;Dd*k&&!U)){for(C=0;CZ&&oehe&&(he=oe);var we=(he-le)/(2*$);f/=we,le=w.l2r(le),he=w.l2r(he),w.range=w._input.range=q=0){hr._fullLayout._deactivateShape(hr);return}var pr=hr._fullLayout.clickmode;if(Z(hr),nr===2&&!ke&&je(),De)pr.indexOf("select")>-1&&M(Bt,hr,Ve,Ze,de.id,Lt),pr.indexOf("event")>-1&&a.click(hr,Bt,de.id);else if(nr===1&&ke){var wr=Ie?_e:We,vr=Ie==="s"||Me==="w"?0:1,Jr=wr._name+".range["+vr+"]",_r=H(wr,vr),Br="left",wn="middle";if(wr.fixedrange)return;Ie?(wn=Ie==="n"?"top":"bottom",wr.side==="right"&&(Br="right")):Me==="e"&&(Br="right"),hr._context.showAxisRangeEntryBoxes&&i.select(bt).call(r.makeEditable,{gd:hr,immediate:!0,background:hr._fullLayout.paper_bgcolor,text:String(_r),fill:wr.tickfont?wr.tickfont.color:"#444",horizontalAlign:Br,verticalAlign:wn}).on("edit",function(Kr){var Fn=wr.d2r(Kr);Fn!==void 0&&l.call("_guiRelayout",hr,Jr,Fn)})}}s.init(Lt);var Ft,tr,lr,Or,xt,jt,Yt,br,dr,ht;function ut(nr,Bt,hr){var pr=bt.getBoundingClientRect();Ft=Bt-pr.left,tr=hr-pr.top,oe._fullLayout._calcInverseTransform(oe);var wr=m.apply3DTransform(oe._fullLayout._invTransform)(Ft,tr);Ft=wr[0],tr=wr[1],lr={l:Ft,r:Ft,w:0,t:tr,b:tr,h:0},Or=oe._hmpixcount?oe._hmlumcount/oe._hmpixcount:y(oe._fullLayout.plot_bgcolor).getLuminance(),xt="M0,0H"+vt+"V"+mt+"H0V0",jt=!1,Yt="xy",ht=!1,br=ie(Ae,Or,Ke,lt,xt),dr=le(Ae,Ke,lt)}function wt(nr,Bt){if(oe._transitioningWithDuration)return!1;var hr=Math.max(0,Math.min(vt,Re*nr+Ft)),pr=Math.max(0,Math.min(mt,He*Bt+tr)),wr=Math.abs(hr-Ft),vr=Math.abs(pr-tr);lr.l=Math.min(Ft,hr),lr.r=Math.max(Ft,hr),lr.t=Math.min(tr,pr),lr.b=Math.max(tr,pr);function Jr(){Yt="",lr.r=lr.l,lr.t=lr.b,dr.attr("d","M0,0Z")}if(Et.isSubplotConstrained)wr>E||vr>E?(Yt="xy",wr/vt>vr/mt?(vr=wr*mt/vt,tr>pr?lr.t=tr-vr:lr.b=tr+vr):(wr=vr*vt/mt,Ft>hr?lr.l=Ft-wr:lr.r=Ft+wr),dr.attr("d",fe(lr))):Jr();else if(et.isSubplotConstrained)if(wr>E||vr>E){Yt="xy";var _r=Math.min(lr.l/vt,(mt-lr.b)/mt),Br=Math.max(lr.r/vt,(mt-lr.t)/mt);lr.l=_r*vt,lr.r=Br*vt,lr.b=(1-_r)*mt,lr.t=(1-Br)*mt,dr.attr("d",fe(lr))}else Jr();else!Be||vr0){var Kr;if(et.isSubplotConstrained||!Ue&&Be.length===1){for(Kr=0;Kr=0?Math.min(oe,.9):1/(1/Math.max(oe,-.3)+3.222))}function re(oe,de,we){return oe?oe==="nsew"?we?"":de==="pan"?"move":"crosshair":oe.toLowerCase()+"-resize":"pointer"}function ie(oe,de,we,Se,Te){return oe.append("path").attr("class","zoombox").style({fill:de>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",d(we,Se)).attr("d",Te+"Z")}function le(oe,de,we){return oe.append("path").attr("class","zoombox-corners").style({fill:n.background,stroke:n.defaultLine,"stroke-width":1,opacity:0}).attr("transform",d(de,we)).attr("d","M0,0Z")}function he(oe,de,we,Se,Te,Fe){oe.attr("d",Se+"M"+we.l+","+we.t+"v"+we.h+"h"+we.w+"v-"+we.h+"h-"+we.w+"Z"),$(oe,de,Te,Fe)}function $(oe,de,we,Se){we||(oe.transition().style("fill",Se>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),de.transition().style("opacity",1).duration(200))}function Z(oe){i.select(oe).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function K(oe){k&&oe.data&&oe._context.showTips&&(m.notifier(m._(oe,"Double-click to zoom back out"),"long"),k=!1)}function Q(oe,de){return"M"+(oe.l-.5)+","+(de-E-.5)+"h-3v"+(2*E+1)+"h3ZM"+(oe.r+.5)+","+(de-E-.5)+"h3v"+(2*E+1)+"h-3Z"}function ae(oe,de){return"M"+(de-E-.5)+","+(oe.t-.5)+"v-3h"+(2*E+1)+"v3ZM"+(de-E-.5)+","+(oe.b+.5)+"v3h"+(2*E+1)+"v-3Z"}function fe(oe){var de=Math.floor(Math.min(oe.b-oe.t,oe.r-oe.l,E)/2);return"M"+(oe.l-3.5)+","+(oe.t-.5+de)+"h3v"+-de+"h"+de+"v-3h-"+(de+3)+"ZM"+(oe.r+3.5)+","+(oe.t-.5+de)+"h-3v"+-de+"h"+-de+"v-3h"+(de+3)+"ZM"+(oe.r+3.5)+","+(oe.b+.5-de)+"h-3v"+de+"h"+-de+"v3h"+(de+3)+"ZM"+(oe.l-3.5)+","+(oe.b+.5-de)+"h3v"+de+"h"+de+"v3h-"+(de+3)+"Z"}function te(oe,de,we,Se,Te){for(var Fe=!1,Ie={},Me={},Ae,De,ke,We,_e=(Te||{}).xaHash,Ye=(Te||{}).yaHash,Pe=0;PeL[1]-.000244140625&&(p.domain=s),m.noneOrAll(y.domain,p.domain,s),p.tickmode==="sync"&&(p.tickmode="auto")}return l("layer"),p}},89426:function(R,F,e){var i=e(59652);R.exports=function(t,y,p,l,d){d||(d={});var r=d.tickSuffixDflt,n=i(t),u=p("tickprefix");u&&p("showtickprefix",n);var a=p("ticksuffix",r);a&&p("showticksuffix",n)}},42449:function(R,F,e){var i=e(18783).FROM_BL;R.exports=function(t,y,p){p===void 0&&(p=i[t.constraintoward||"center"]);var l=[t.r2l(t.range[0]),t.r2l(t.range[1])],d=l[0]+(l[1]-l[0])*p;t.range=t._input.range=[t.l2r(d+(l[0]-d)*y),t.l2r(d+(l[1]-d)*y)],t.setScale()}},21994:function(R,F,e){var i=e(39898),m=e(84096).g0,t=e(71828),y=t.numberFormat,p=e(92770),l=t.cleanNumber,d=t.ms2DateTime,r=t.dateTime2ms,n=t.ensureNumber,u=t.isArrayOrTypedArray,a=e(50606),o=a.FP_SAFE,c=a.BADNUM,s=a.LOG_CLIP,b=a.ONEWEEK,g=a.ONEDAY,A=a.ONEHOUR,v=a.ONEMIN,h=a.ONESEC,x=e(41675),C=e(85555),D=C.HOUR_PATTERN,L=C.WEEKDAY_PATTERN;function w(S){return Math.pow(10,S)}function M(S){return S!=null}R.exports=function(f,P){P=P||{};var E=f._id||"x",k=E.charAt(0);function O(Q,ae){if(Q>0)return Math.log(Q)/Math.LN10;if(Q<=0&&ae&&f.range&&f.range.length===2){var fe=f.range[0],te=f.range[1];return .5*(fe+te-2*s*Math.abs(fe-te))}else return c}function G(Q,ae,fe,te){if((te||{}).msUTC&&p(Q))return+Q;var ne=r(Q,fe||f.calendar);if(ne===c)if(p(Q)){Q=+Q;var ce=Math.floor(t.mod(Q+.05,1)*10),oe=Math.round(Q-ce/10);ne=r(new Date(oe))+ce/10}else return c;return ne}function z(Q,ae,fe){return d(Q,ae,fe||f.calendar)}function U(Q){return f._categories[Math.round(Q)]}function H(Q){if(M(Q)){if(f._categoriesMap===void 0&&(f._categoriesMap={}),f._categoriesMap[Q]!==void 0)return f._categoriesMap[Q];f._categories.push(typeof Q=="number"?String(Q):Q);var ae=f._categories.length-1;return f._categoriesMap[Q]=ae,ae}return c}function B(Q,ae){for(var fe=new Array(ae),te=0;tef.range[1]&&(fe=!fe);for(var te=fe?-1:1,ne=te*Q,ce=0,oe=0;oewe)ce=oe+1;else{ce=ne<(de+we)/2?oe:oe+1;break}}var Se=f._B[ce]||0;return isFinite(Se)?ie(Q,f._m2,Se):0},$=function(Q){var ae=f._rangebreaks.length;if(!ae)return le(Q,f._m,f._b);for(var fe=0,te=0;tef._rangebreaks[te].pmax&&(fe=te+1);return le(Q,f._m2,f._B[fe])}}f.c2l=f.type==="log"?O:n,f.l2c=f.type==="log"?w:n,f.l2p=he,f.p2l=$,f.c2p=f.type==="log"?function(Q,ae){return he(O(Q,ae))}:he,f.p2c=f.type==="log"?function(Q){return w($(Q))}:$,["linear","-"].indexOf(f.type)!==-1?(f.d2r=f.r2d=f.d2c=f.r2c=f.d2l=f.r2l=l,f.c2d=f.c2r=f.l2d=f.l2r=n,f.d2p=f.r2p=function(Q){return f.l2p(l(Q))},f.p2d=f.p2r=$,f.cleanPos=n):f.type==="log"?(f.d2r=f.d2l=function(Q,ae){return O(l(Q),ae)},f.r2d=f.r2c=function(Q){return w(l(Q))},f.d2c=f.r2l=l,f.c2d=f.l2r=n,f.c2r=O,f.l2d=w,f.d2p=function(Q,ae){return f.l2p(f.d2r(Q,ae))},f.p2d=function(Q){return w($(Q))},f.r2p=function(Q){return f.l2p(l(Q))},f.p2r=$,f.cleanPos=n):f.type==="date"?(f.d2r=f.r2d=t.identity,f.d2c=f.r2c=f.d2l=f.r2l=G,f.c2d=f.c2r=f.l2d=f.l2r=z,f.d2p=f.r2p=function(Q,ae,fe){return f.l2p(G(Q,0,fe))},f.p2d=f.p2r=function(Q,ae,fe){return z($(Q),ae,fe)},f.cleanPos=function(Q){return t.cleanDate(Q,c,f.calendar)}):f.type==="category"?(f.d2c=f.d2l=H,f.r2d=f.c2d=f.l2d=U,f.d2r=f.d2l_noadd=q,f.r2c=function(Q){var ae=re(Q);return ae!==void 0?ae:f.fraction2r(.5)},f.l2r=f.c2r=n,f.r2l=re,f.d2p=function(Q){return f.l2p(f.r2c(Q))},f.p2d=function(Q){return U($(Q))},f.r2p=f.d2p,f.p2r=$,f.cleanPos=function(Q){return typeof Q=="string"&&Q!==""?Q:n(Q)}):f.type==="multicategory"&&(f.r2d=f.c2d=f.l2d=U,f.d2r=f.d2l_noadd=q,f.r2c=function(Q){var ae=q(Q);return ae!==void 0?ae:f.fraction2r(.5)},f.r2c_just_indices=W,f.l2r=f.c2r=n,f.r2l=q,f.d2p=function(Q){return f.l2p(f.r2c(Q))},f.p2d=function(Q){return U($(Q))},f.r2p=f.d2p,f.p2r=$,f.cleanPos=function(Q){return Array.isArray(Q)||typeof Q=="string"&&Q!==""?Q:n(Q)},f.setupMultiCategory=function(Q){var ae=f._traceIndices,fe,te,ne=f._matchGroup;if(ne&&f._categories.length===0){for(var ce in ne)if(ce!==E){var oe=P[x.id2name(ce)];ae=ae.concat(oe._traceIndices)}}var de=[[0,{}],[0,{}]],we=[];for(fe=0;feo&&(fe[te]=o),fe[0]===fe[1]){var oe=Math.max(1,Math.abs(fe[0]*1e-6));fe[0]-=oe,fe[1]+=oe}}},f.setScale=function(Q){var ae=P._size;if(f.overlaying){var fe=x.getFromId({_fullLayout:P},f.overlaying);f.domain=fe.domain}var te=Q&&f._r?"_r":"range",ne=f.calendar;f.cleanRange(te);var ce=f.r2l(f[te][0],ne),oe=f.r2l(f[te][1],ne),de=k==="y";if(de?(f._offset=ae.t+(1-f.domain[1])*ae.h,f._length=ae.h*(f.domain[1]-f.domain[0]),f._m=f._length/(ce-oe),f._b=-f._m*oe):(f._offset=ae.l+f.domain[0]*ae.w,f._length=ae.w*(f.domain[1]-f.domain[0]),f._m=f._length/(oe-ce),f._b=-f._m*ce),f._rangebreaks=[],f._lBreaks=0,f._m2=0,f._B=[],f.rangebreaks){var we,Se;if(f._rangebreaks=f.locateBreaks(Math.min(ce,oe),Math.max(ce,oe)),f._rangebreaks.length){for(we=0;weoe&&(Te=!Te),Te&&f._rangebreaks.reverse();var Fe=Te?-1:1;for(f._m2=Fe*f._length/(Math.abs(oe-ce)-f._lBreaks),f._B.push(-f._m2*(de?oe:ce)),we=0;wene&&(ne+=7,cene&&(ne+=24,ce=te&&ce=te&&Q=Ze.min&&(_eZe.max&&(Ze.max=Ye),Pe=!1)}Pe&&oe.push({min:_e,max:Ye})}};for(fe=0;fe rect").call(y.setTranslate,0,0).call(y.setScale,1,1),D.plot.call(y.setTranslate,L._offset,w._offset).call(y.setScale,1,1);var M=D.plot.selectAll(".scatterlayer .trace");M.selectAll(".point").call(y.setPointGroupScale,1,1),M.selectAll(".textpoint").call(y.setTextPointsScale,1,1),M.call(y.hideOutsideRangePoints,D)}function c(D,L){var w=D.plotinfo,M=w.xaxis,S=w.yaxis,f=M._length,P=S._length,E=!!D.xr1,k=!!D.yr1,O=[];if(E){var G=t.simpleMap(D.xr0,M.r2l),z=t.simpleMap(D.xr1,M.r2l),U=G[1]-G[0],H=z[1]-z[0];O[0]=(G[0]*(1-L)+L*z[0]-G[0])/(G[1]-G[0])*f,O[2]=f*(1-L+L*H/U),M.range[0]=M.l2r(G[0]*(1-L)+L*z[0]),M.range[1]=M.l2r(G[1]*(1-L)+L*z[1])}else O[0]=0,O[2]=f;if(k){var B=t.simpleMap(D.yr0,S.r2l),W=t.simpleMap(D.yr1,S.r2l),q=B[1]-B[0],re=W[1]-W[0];O[1]=(B[1]*(1-L)+L*W[1]-B[1])/(B[0]-B[1])*P,O[3]=P*(1-L+L*re/q),S.range[0]=M.l2r(B[0]*(1-L)+L*W[0]),S.range[1]=S.l2r(B[1]*(1-L)+L*W[1])}else O[1]=0,O[3]=P;p.drawOne(d,M,{skipTitle:!0}),p.drawOne(d,S,{skipTitle:!0}),p.redrawComponents(d,[M._id,S._id]);var ie=E?f/O[2]:1,le=k?P/O[3]:1,he=E?O[0]:0,$=k?O[1]:0,Z=E?O[0]/O[2]*f:0,K=k?O[1]/O[3]*P:0,Q=M._offset-Z,ae=S._offset-K;w.clipRect.call(y.setTranslate,he,$).call(y.setScale,1/ie,1/le),w.plot.call(y.setTranslate,Q,ae).call(y.setScale,ie,le),y.setPointGroupScale(w.zoomScalePts,1/ie,1/le),y.setTextPointsScale(w.zoomScaleTxt,1/ie,1/le)}var s;u&&(s=u());function b(){for(var D={},L=0;Ln.duration?(b(),h=window.cancelAnimationFrame(C)):h=window.requestAnimationFrame(C)}return A=Date.now(),h=window.requestAnimationFrame(C),Promise.resolve()}},951:function(R,F,e){var i=e(73972).traceIs,m=e(4322);R.exports=function(r,n,u,a){u("autotypenumbers",a.autotypenumbersDflt);var o=u("type",(a.splomStash||{}).type);o==="-"&&(t(n,a.data),n.type==="-"?n.type="linear":r.type=n.type)};function t(d,r){if(d.type==="-"){var n=d._id,u=n.charAt(0),a;n.indexOf("scene")!==-1&&(n=u);var o=y(r,n,u);if(!!o){if(o.type==="histogram"&&u==={v:"y",h:"x"}[o.orientation||"v"]){d.type="linear";return}var c=u+"calendar",s=o[c],b={noMultiCategory:!i(o,"cartesian")||i(o,"noMultiCategory")};if(o.type==="box"&&o._hasPreCompStats&&u==={h:"x",v:"y"}[o.orientation||"v"]&&(b.noMultiCategory=!0),b.autotypenumbers=d.autotypenumbers,l(o,u)){var g=p(o),A=[];for(a=0;a0&&(a["_"+n+"axes"]||{})[r])return a;if((a[n+"axis"]||n)===r){if(l(a,n))return a;if((a[n]||[]).length||a[n+"0"])return a}}}function p(d){return{v:"x",h:"y"}[d.orientation||"v"]}function l(d,r){var n=p(d),u=i(d,"box-violin"),a=i(d._fullInput||{},"candlestick");return u&&!a&&r===n&&d[n]===void 0&&d[n+"0"]===void 0}},31137:function(R,F,e){var i=e(73972),m=e(71828);F.manageCommandObserver=function(r,n,u,a){var o={},c=!0;n&&n._commandObserver&&(o=n._commandObserver),o.cache||(o.cache={}),o.lookupTable={};var s=F.hasSimpleAPICommandBindings(r,u,o.lookupTable);if(n&&n._commandObserver){if(s)return o;if(n._commandObserver.remove)return n._commandObserver.remove(),n._commandObserver=null,o}if(s){t(r,s,o.cache),o.check=function(){if(!!c){var v=t(r,s,o.cache);return v.changed&&a&&o.lookupTable[v.value]!==void 0&&(o.disable(),Promise.resolve(a({value:v.value,type:s.type,prop:s.prop,traces:s.traces,index:o.lookupTable[v.value]})).then(o.enable,o.enable)),v.changed}};for(var b=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],g=0;g0?".":"")+o;m.isPlainObject(c)?d(c,n,s,a+1):n(s,o,c)}})}},27670:function(R,F,e){var i=e(1426).extendFlat;F.Y=function(m,t){m=m||{},t=t||{};var y={valType:"info_array",editType:m.editType,items:[{valType:"number",min:0,max:1,editType:m.editType},{valType:"number",min:0,max:1,editType:m.editType}],dflt:[0,1]};m.name&&m.name+"",m.trace,t.description&&""+t.description;var p={x:i({},y,{}),y:i({},y,{}),editType:m.editType};return m.noGridCell||(p.row={valType:"integer",min:0,dflt:0,editType:m.editType},p.column={valType:"integer",min:0,dflt:0,editType:m.editType}),p},F.c=function(m,t,y,p){var l=p&&p.x||[0,1],d=p&&p.y||[0,1],r=t.grid;if(r){var n=y("domain.column");n!==void 0&&(n0&&H._module.calcGeoJSON(U,k)}if(!O){var B=this.updateProjection(E,k);if(B)return;(!this.viewInitial||this.scope!==G.scope)&&this.saveViewInitial(G)}this.scope=G.scope,this.updateBaseLayers(k,G),this.updateDims(k,G),this.updateFx(k,G),o.generalUpdatePerTraceModule(this.graphDiv,this,E,G);var W=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=W.selectAll(".point"),this.dataPoints.text=W.selectAll("text"),this.dataPaths.line=W.selectAll(".js-line");var q=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=q.selectAll("path"),this._render()},M.updateProjection=function(E,k){var O=this.graphDiv,G=k[this.id],z=k._size,U=G.domain,H=G.projection,B=G.lonaxis,W=G.lataxis,q=B._ax,re=W._ax,ie=this.projection=S(G),le=[[z.l+z.w*U.x[0],z.t+z.h*(1-U.y[1])],[z.l+z.w*U.x[1],z.t+z.h*(1-U.y[0])]],he=G.center||{},$=H.rotation||{},Z=B.range||[],K=W.range||[];if(G.fitbounds){q._length=le[1][0]-le[0][0],re._length=le[1][1]-le[0][1],q.range=s(O,q),re.range=s(O,re);var Q=(q.range[0]+q.range[1])/2,ae=(re.range[0]+re.range[1])/2;if(G._isScoped)he={lon:Q,lat:ae};else if(G._isClipped){he={lon:Q,lat:ae},$={lon:Q,lat:ae,roll:$.roll};var fe=H.type,te=x.lonaxisSpan[fe]/2||180,ne=x.lataxisSpan[fe]/2||90;Z=[Q-te,Q+te],K=[ae-ne,ae+ne]}else he={lon:Q,lat:ae},$={lon:Q,lat:$.lat,roll:$.roll}}ie.center([he.lon-$.lon,he.lat-$.lat]).rotate([-$.lon,-$.lat,$.roll]).parallels(H.parallels);var ce=P(Z,K);ie.fitExtent(le,ce);var oe=this.bounds=ie.getBounds(ce),de=this.fitScale=ie.scale(),we=ie.translate();if(G.fitbounds){var Se=ie.getBounds(P(q.range,re.range)),Te=Math.min((oe[1][0]-oe[0][0])/(Se[1][0]-Se[0][0]),(oe[1][1]-oe[0][1])/(Se[1][1]-Se[0][1]));isFinite(Te)?ie.scale(Te*de):d.warn("Something went wrong during"+this.id+"fitbounds computations.")}else ie.scale(H.scale*de);var Fe=this.midPt=[(oe[0][0]+oe[1][0])/2,(oe[0][1]+oe[1][1])/2];if(ie.translate([we[0]+(Fe[0]-we[0]),we[1]+(Fe[1]-we[1])]).clipExtent(oe),G._isAlbersUsa){var Ie=ie([he.lon,he.lat]),Me=ie.translate();ie.translate([Me[0]-(Ie[0]-Me[0]),Me[1]-(Ie[1]-Me[1])])}},M.updateBaseLayers=function(E,k){var O=this,G=O.topojson,z=O.layers,U=O.basePaths;function H(le){return le==="lonaxis"||le==="lataxis"}function B(le){return Boolean(x.lineLayers[le])}function W(le){return Boolean(x.fillLayers[le])}var q=this.hasChoropleth?x.layersForChoropleth:x.layers,re=q.filter(function(le){return B(le)||W(le)?k["show"+le]:H(le)?k[le].showgrid:!0}),ie=O.framework.selectAll(".layer").data(re,String);ie.exit().each(function(le){delete z[le],delete U[le],i.select(this).remove()}),ie.enter().append("g").attr("class",function(le){return"layer "+le}).each(function(le){var he=z[le]=i.select(this);le==="bg"?O.bgRect=he.append("rect").style("pointer-events","all"):H(le)?U[le]=he.append("path").style("fill","none"):le==="backplot"?he.append("g").classed("choroplethlayer",!0):le==="frontplot"?he.append("g").classed("scatterlayer",!0):B(le)?U[le]=he.append("path").style("fill","none").style("stroke-miterlimit",2):W(le)&&(U[le]=he.append("path").style("stroke","none"))}),ie.order(),ie.each(function(le){var he=U[le],$=x.layerNameToAdjective[le];le==="frame"?he.datum(x.sphereSVG):B(le)||W(le)?he.datum(L(G,G.objects[le])):H(le)&&he.datum(f(le,k,E)).call(n.stroke,k[le].gridcolor).call(u.dashLine,k[le].griddash,k[le].gridwidth),B(le)?he.call(n.stroke,k[$+"color"]).call(u.dashLine,"",k[$+"width"]):W(le)&&he.call(n.fill,k[$+"color"])})},M.updateDims=function(E,k){var O=this.bounds,G=(k.framewidth||0)/2,z=O[0][0]-G,U=O[0][1]-G,H=O[1][0]-z+G,B=O[1][1]-U+G;u.setRect(this.clipRect,z,U,H,B),this.bgRect.call(u.setRect,z,U,H,B).call(n.fill,k.bgcolor),this.xaxis._offset=z,this.xaxis._length=H,this.yaxis._offset=U,this.yaxis._length=B},M.updateFx=function(E,k){var O=this,G=O.graphDiv,z=O.bgRect,U=E.dragmode,H=E.clickmode;if(O.isStatic)return;function B(){var ie=O.viewInitial,le={};for(var he in ie)le[O.id+"."+he]=ie[he];l.call("_guiRelayout",G,le),G.emit("plotly_doubleclick",null)}function W(ie){return O.projection.invert([ie[0]+O.xaxis._offset,ie[1]+O.yaxis._offset])}var q=function(ie,le){if(le.isRect){var he=ie.range={};he[O.id]=[W([le.xmin,le.ymin]),W([le.xmax,le.ymax])]}else{var $=ie.lassoPoints={};$[O.id]=le.map(W)}},re={element:O.bgRect.node(),gd:G,plotinfo:{id:O.id,xaxis:O.xaxis,yaxis:O.yaxis,fillRangeItems:q},xaxes:[O.xaxis],yaxes:[O.yaxis],subplot:O.id,clickFn:function(ie){ie===2&&A(G)}};U==="pan"?(z.node().onmousedown=null,z.call(h(O,k)),z.on("dblclick.zoom",B),G._context._scrollZoom.geo||z.on("wheel.zoom",null)):(U==="select"||U==="lasso")&&(z.on(".zoom",null),re.prepFn=function(ie,le,he){g(ie,le,he,re,U)},b.init(re)),z.on("mousemove",function(){var ie=O.projection.invert(d.getPositionFromD3Event());if(!ie)return b.unhover(G,i.event);O.xaxis.p2c=function(){return ie[0]},O.yaxis.p2c=function(){return ie[1]},a.hover(G,i.event,O.id)}),z.on("mouseout",function(){G._dragging||b.unhover(G,i.event)}),z.on("click",function(){U!=="select"&&U!=="lasso"&&(H.indexOf("select")>-1&&v(i.event,G,[O.xaxis],[O.yaxis],O.id,re),H.indexOf("event")>-1&&a.click(G,i.event))})},M.makeFramework=function(){var E=this,k=E.graphDiv,O=k._fullLayout,G="clip"+O._uid+E.id;E.clipDef=O._clips.append("clipPath").attr("id",G),E.clipRect=E.clipDef.append("rect"),E.framework=i.select(E.container).append("g").attr("class","geo "+E.id).call(u.setClipUrl,G,k),E.project=function(z){var U=E.projection(z);return U?[U[0]-E.xaxis._offset,U[1]-E.yaxis._offset]:[null,null]},E.xaxis={_id:"x",c2p:function(z){return E.project(z)[0]}},E.yaxis={_id:"y",c2p:function(z){return E.project(z)[1]}},E.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(E.mockAxis,O)},M.saveViewInitial=function(E){var k=E.center||{},O=E.projection,G=O.rotation||{};this.viewInitial={fitbounds:E.fitbounds,"projection.scale":O.scale};var z;E._isScoped?z={"center.lon":k.lon,"center.lat":k.lat}:E._isClipped?z={"projection.rotation.lon":G.lon,"projection.rotation.lat":G.lat}:z={"center.lon":k.lon,"center.lat":k.lat,"projection.rotation.lon":G.lon},d.extendFlat(this.viewInitial,z)},M.render=function(E){this._hasMarkerAngles&&E?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},M._render=function(){var E=this.projection,k=E.getPath(),O;function G(U){var H=E(U.lonlat);return H?r(H[0],H[1]):null}function z(U){return E.isLonLatOverEdges(U.lonlat)?"none":null}for(O in this.basePaths)this.basePaths[O].attr("d",k);for(O in this.dataPaths)this.dataPaths[O].attr("d",function(U){return k(U.geojson)});for(O in this.dataPoints)this.dataPoints[O].attr("display",z).attr("transform",G)};function S(E){var k=E.projection,O=k.type,G=x.projNames[O];G="geo"+d.titleCase(G);for(var z=m[G]||p[G],U=z(),H=E._isSatellite?Math.acos(1/k.distance)*180/Math.PI:E._isClipped?x.lonaxisSpan[O]/2:null,B=["center","rotate","parallels","clipExtent"],W=function(ie){return ie?U:[]},q=0;q$}else return!1},U.getPath=function(){return t().projection(U)},U.getBounds=function(ie){return U.getPath().bounds(ie)},U.precision(x.precision),E._isSatellite&&U.tilt(k.tilt).distance(k.distance),H&&U.clipAngle(H-x.clipPad),U}function f(E,k,O){var G=1e-6,z=2.5,U=k[E],H=x.scopeDefaults[k.scope],B,W,q;E==="lonaxis"?(B=H.lonaxisRange,W=H.lataxisRange,q=function(ae,fe){return[ae,fe]}):E==="lataxis"&&(B=H.lataxisRange,W=H.lonaxisRange,q=function(ae,fe){return[fe,ae]});var re={type:"linear",range:[B[0],B[1]-G],tick0:U.tick0,dtick:U.dtick};c.setConvert(re,O);var ie=c.calcTicks(re);!k.isScoped&&E==="lonaxis"&&ie.pop();for(var le=ie.length,he=new Array(le),$=0;$0&&z<0&&(z+=360);var B=(z-G)/4;return{type:"Polygon",coordinates:[[[G,U],[G,H],[G+B,H],[G+2*B,H],[G+3*B,H],[z,H],[z,U],[z-B,U],[z-2*B,U],[z-3*B,U],[G,U]]]}}},44622:function(R,F,e){var i=e(27659).AU,m=e(71828).counterRegex,t=e(69082),y="geo",p=m(y),l={};l[y]={valType:"subplotid",dflt:y,editType:"calc"};function d(u){for(var a=u._fullLayout,o=u.calcdata,c=a._subplots[y],s=0;s0&&W<0&&(W+=360);var q=(B+W)/2,re;if(!v){var ie=h?g.projRotate:[q,0,0];re=u("projection.rotation.lon",ie[0]),u("projection.rotation.lat",ie[1]),u("projection.rotation.roll",ie[2]),M=u("showcoastlines",!h&&w),M&&(u("coastlinecolor"),u("coastlinewidth")),M=u("showocean",w?void 0:!1),M&&u("oceancolor")}var le,he;if(v?(le=-96.6,he=38.7):(le=h?q:re,he=(H[0]+H[1])/2),u("center.lon",le),u("center.lat",he),x&&(u("projection.tilt"),u("projection.distance")),C){var $=g.projParallels||[0,60];u("projection.parallels",$)}u("projection.scale"),M=u("showland",w?void 0:!1),M&&u("landcolor"),M=u("showlakes",w?void 0:!1),M&&u("lakecolor"),M=u("showrivers",w?void 0:!1),M&&(u("rivercolor"),u("riverwidth")),M=u("showcountries",h&&b!=="usa"&&w),M&&(u("countrycolor"),u("countrywidth")),(b==="usa"||b==="north america"&&s===50)&&(u("showsubunits",w),u("subunitcolor"),u("subunitwidth")),h||(M=u("showframe",w),M&&(u("framecolor"),u("framewidth"))),u("bgcolor");var Z=u("fitbounds");Z&&(delete n.projection.scale,h?(delete n.center.lon,delete n.center.lat):D?(delete n.center.lon,delete n.center.lat,delete n.projection.rotation.lon,delete n.projection.rotation.lat,delete n.lonaxis.range,delete n.lataxis.range):(delete n.center.lon,delete n.center.lat,delete n.projection.rotation.lon))}},74455:function(R,F,e){var i=e(39898),m=e(71828),t=e(73972),y=Math.PI/180,p=180/Math.PI,l={cursor:"pointer"},d={cursor:"auto"};function r(f,P){var E=f.projection,k;return P._isScoped?k=a:P._isClipped?k=c:k=o,k(f,E)}R.exports=r;function n(f,P){return i.behavior.zoom().translate(P.translate()).scale(P.scale())}function u(f,P,E){var k=f.id,O=f.graphDiv,G=O.layout,z=G[k],U=O._fullLayout,H=U[k],B={},W={};function q(re,ie){B[k+"."+re]=m.nestedProperty(z,re).get(),t.call("_storeDirectGUIEdit",G,U._preGUI,B);var le=m.nestedProperty(H,re);le.get()!==ie&&(le.set(ie),m.nestedProperty(z,re).set(ie),W[k+"."+re]=ie)}E(q),q("projection.scale",P.scale()/f.fitScale),q("fitbounds",!1),O.emit("plotly_relayout",W)}function a(f,P){var E=n(f,P);function k(){i.select(this).style(l)}function O(){P.scale(i.event.scale).translate(i.event.translate),f.render(!0);var U=P.invert(f.midPt);f.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":P.scale()/f.fitScale,"geo.center.lon":U[0],"geo.center.lat":U[1]})}function G(U){var H=P.invert(f.midPt);U("center.lon",H[0]),U("center.lat",H[1])}function z(){i.select(this).style(d),u(f,P,G)}return E.on("zoomstart",k).on("zoom",O).on("zoomend",z),E}function o(f,P){var E=n(f,P),k=2,O,G,z,U,H,B,W,q,re;function ie(Q){return P.invert(Q)}function le(Q){var ae=ie(Q);if(!ae)return!0;var fe=P(ae);return Math.abs(fe[0]-Q[0])>k||Math.abs(fe[1]-Q[1])>k}function he(){i.select(this).style(l),O=i.mouse(this),G=P.rotate(),z=P.translate(),U=G,H=ie(O)}function $(){if(B=i.mouse(this),le(O)){E.scale(P.scale()),E.translate(P.translate());return}P.scale(i.event.scale),P.translate([z[0],i.event.translate[1]]),H?ie(B)&&(q=ie(B),W=[U[0]+(q[0]-H[0]),G[1],G[2]],P.rotate(W),U=W):(O=B,H=ie(O)),re=!0,f.render(!0);var Q=P.rotate(),ae=P.invert(f.midPt);f.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":P.scale()/f.fitScale,"geo.center.lon":ae[0],"geo.center.lat":ae[1],"geo.projection.rotation.lon":-Q[0]})}function Z(){i.select(this).style(d),re&&u(f,P,K)}function K(Q){var ae=P.rotate(),fe=P.invert(f.midPt);Q("projection.rotation.lon",-ae[0]),Q("center.lon",fe[0]),Q("center.lat",fe[1])}return E.on("zoomstart",he).on("zoom",$).on("zoomend",Z),E}function c(f,P){P.rotate(),P.scale();var E=n(f,P),k=S(E,"zoomstart","zoom","zoomend"),O=0,G=E.on,z;E.on("zoomstart",function(){i.select(this).style(l);var q=i.mouse(this),re=P.rotate(),ie=re,le=P.translate(),he=b(re);z=s(P,q),G.call(E,"zoom",function(){var $=i.mouse(this);if(P.scale(i.event.scale),!z)q=$,z=s(P,q);else if(s(P,$)){P.rotate(re).translate(le);var Z=s(P,$),K=A(z,Z),Q=D(g(he,K)),ae=v(Q,z,ie);(!isFinite(ae[0])||!isFinite(ae[1])||!isFinite(ae[2]))&&(ae=ie),P.rotate(ae),ie=ae}H(k.of(this,arguments))}),U(k.of(this,arguments))}).on("zoomend",function(){i.select(this).style(d),G.call(E,"zoom",null),B(k.of(this,arguments)),u(f,P,W)}).on("zoom.redraw",function(){f.render(!0);var q=P.rotate();f.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":P.scale()/f.fitScale,"geo.projection.rotation.lon":-q[0],"geo.projection.rotation.lat":-q[1]})});function U(q){O++||q({type:"zoomstart"})}function H(q){q({type:"zoom"})}function B(q){--O||q({type:"zoomend"})}function W(q){var re=P.rotate();q("projection.rotation.lon",-re[0]),q("projection.rotation.lat",-re[1])}return i.rebind(E,k,"on")}function s(f,P){var E=f.invert(P);return E&&isFinite(E[0])&&isFinite(E[1])&&L(E)}function b(f){var P=.5*f[0]*y,E=.5*f[1]*y,k=.5*f[2]*y,O=Math.sin(P),G=Math.cos(P),z=Math.sin(E),U=Math.cos(E),H=Math.sin(k),B=Math.cos(k);return[G*U*B+O*z*H,O*U*B-G*z*H,G*z*B+O*U*H,G*U*H-O*z*B]}function g(f,P){var E=f[0],k=f[1],O=f[2],G=f[3],z=P[0],U=P[1],H=P[2],B=P[3];return[E*z-k*U-O*H-G*B,E*U+k*z+O*B-G*H,E*H-k*B+O*z+G*U,E*B+k*H-O*U+G*z]}function A(f,P){if(!(!f||!P)){var E=M(f,P),k=Math.sqrt(w(E,E)),O=.5*Math.acos(Math.max(-1,Math.min(1,w(f,P)))),G=Math.sin(O)/k;return k&&[Math.cos(O),E[2]*G,-E[1]*G,E[0]*G]}}function v(f,P,E){var k=C(P,2,f[0]);k=C(k,1,f[1]),k=C(k,0,f[2]-E[2]);var O=P[0],G=P[1],z=P[2],U=k[0],H=k[1],B=k[2],W=Math.atan2(G,O)*p,q=Math.sqrt(O*O+G*G),re,ie;Math.abs(H)>q?(ie=(H>0?90:-90)-W,re=0):(ie=Math.asin(H/q)*p-W,re=Math.sqrt(q*q-H*H));var le=180-ie-2*W,he=(Math.atan2(B,U)-Math.atan2(z,re))*p,$=(Math.atan2(B,U)-Math.atan2(z,-re))*p,Z=h(E[0],E[1],ie,he),K=h(E[0],E[1],le,$);return Z<=K?[ie,he,E[2]]:[le,$,E[2]]}function h(f,P,E,k){var O=x(E-f),G=x(k-P);return Math.sqrt(O*O+G*G)}function x(f){return(f%360+540)%360-180}function C(f,P,E){var k=E*y,O=f.slice(),G=P===0?1:0,z=P===2?1:2,U=Math.cos(k),H=Math.sin(k);return O[G]=f[G]*U-f[z]*H,O[z]=f[z]*U+f[G]*H,O}function D(f){return[Math.atan2(2*(f[0]*f[1]+f[2]*f[3]),1-2*(f[1]*f[1]+f[2]*f[2]))*p,Math.asin(Math.max(-1,Math.min(1,2*(f[0]*f[2]-f[3]*f[1]))))*p,Math.atan2(2*(f[0]*f[3]+f[1]*f[2]),1-2*(f[2]*f[2]+f[3]*f[3]))*p]}function L(f){var P=f[0]*y,E=f[1]*y,k=Math.cos(E);return[k*Math.cos(P),k*Math.sin(P),Math.sin(E)]}function w(f,P){for(var E=0,k=0,O=f.length;kMath.abs(M)?(a.boxEnd[1]=a.boxStart[1]+Math.abs(w)*O*(M>=0?1:-1),a.boxEnd[1]v[3]&&(a.boxEnd[1]=v[3],a.boxEnd[0]=a.boxStart[0]+(v[3]-a.boxStart[1])/Math.abs(O))):(a.boxEnd[0]=a.boxStart[0]+Math.abs(M)/O*(w>=0?1:-1),a.boxEnd[0]v[2]&&(a.boxEnd[0]=v[2],a.boxEnd[1]=a.boxStart[1]+(v[2]-a.boxStart[0])*Math.abs(O)))}else E&&(a.boxEnd[0]=a.boxStart[0]),k&&(a.boxEnd[1]=a.boxStart[1])}else a.boxEnabled?(w=a.boxStart[0]!==a.boxEnd[0],M=a.boxStart[1]!==a.boxEnd[1],w||M?(w&&(S(0,a.boxStart[0],a.boxEnd[0]),r.xaxis.autorange=!1),M&&(S(1,a.boxStart[1],a.boxEnd[1]),r.yaxis.autorange=!1),r.relayoutCallback()):r.glplot.setDirty(),a.boxEnabled=!1,a.boxInited=!1):a.boxInited&&(a.boxInited=!1);break;case"pan":a.boxEnabled=!1,a.boxInited=!1,b?(a.panning||(a.dragStart[0]=g,a.dragStart[1]=A),Math.abs(a.dragStart[0]-g)1;function b(g){if(!s){var A=i.validate(a[g],l[g]);if(A)return a[g]}}y(a,o,c,{type:r,attributes:l,handleDefaults:n,fullLayout:o,font:o.font,fullData:c,getDfltFromLayout:b,autotypenumbersDflt:o.autotypenumbers,paper_bgcolor:o.paper_bgcolor,calendar:o.calendar})};function n(u,a,o,c){for(var s=o("bgcolor"),b=m.combine(s,c.paper_bgcolor),g=["up","center","eye"],A=0;A.999)&&(D="turntable")}else D="turntable";o("dragmode",D),o("hovermode",c.getDfltFromLayout("hovermode"))}},65500:function(R,F,e){var i=e(77894),m=e(27670).Y,t=e(1426).extendFlat,y=e(71828).counterRegex;function p(l,d,r){return{x:{valType:"number",dflt:l,editType:"camera"},y:{valType:"number",dflt:d,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}R.exports={_arrayAttrRegexps:[y("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:t(p(0,0,1),{}),center:t(p(0,0,0),{}),eye:t(p(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:m({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:i,yaxis:i,zaxis:i,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},13133:function(R,F,e){var i=e(78614),m=["xaxis","yaxis","zaxis"];function t(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}var y=t.prototype;y.merge=function(l){for(var d=0;d<3;++d){var r=l[m[d]];if(!r.visible){this.enabled[d]=!1,this.drawSides[d]=!1;continue}this.enabled[d]=r.showspikes,this.colors[d]=i(r.spikecolor),this.drawSides[d]=r.spikesides,this.lineWidth[d]=r.spikethickness}};function p(l){var d=new t;return d.merge(l),d}R.exports=p},96085:function(R,F,e){R.exports=p;var i=e(89298),m=e(71828),t=["xaxis","yaxis","zaxis"];function y(l){for(var d=new Array(3),r=0;r<3;++r){for(var n=l[r],u=new Array(n.length),a=0;a/g," "));u[a]=b,o.tickmode=c}}d.ticks=u;for(var a=0;a<3;++a){.5*(l.glplot.bounds[0][a]+l.glplot.bounds[1][a]);for(var g=0;g<2;++g)d.bounds[g][a]=l.glplot.bounds[g][a]}l.contourLevels=y(u)}},63538:function(R){function F(i,m){var t=[0,0,0,0],y,p;for(y=0;y<4;++y)for(p=0;p<4;++p)t[p]+=i[4*y+p]*m[y];return t}function e(i,m){var t=F(i.projection,F(i.view,F(i.model,[m[0],m[1],m[2],1])));return t}R.exports=e},33539:function(R,F,e){var i=e(9330).gl_plot3d,m=i.createCamera,t=i.createScene,y=e(40372),p=e(38520),l=e(73972),d=e(71828),r=d.preserveDrawingBuffer(),n=e(89298),u=e(30211),a=e(78614),o=e(58617),c=e(63538),s=e(30422),b=e(13133),g=e(96085),A,v;function h(E,k){var O=document.createElement("div"),G=E.container;this.graphDiv=E.graphDiv;var z=document.createElementNS("http://www.w3.org/2000/svg","svg");z.style.position="absolute",z.style.top=z.style.left="0px",z.style.width=z.style.height="100%",z.style["z-index"]=20,z.style["pointer-events"]="none",O.appendChild(z),this.svgContainer=z,O.id=E.id,O.style.position="absolute",O.style.top=O.style.left="0px",O.style.width=O.style.height="100%",G.appendChild(O),this.fullLayout=k,this.id=E.id||"scene",this.fullSceneLayout=k[this.id],this.plotArgs=[[],{},{}],this.axesOptions=s(k,k[this.id]),this.spikeOptions=b(k[this.id]),this.container=O,this.staticMode=!!E.staticPlot,this.pixelRatio=this.pixelRatio||E.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=l.getComponentMethod("annotations3d","convert"),this.drawAnnotations=l.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var x=h.prototype;x.prepareOptions=function(){var E=this,k={canvas:E.canvas,gl:E.gl,glOptions:{preserveDrawingBuffer:r,premultipliedAlpha:!0,antialias:!0},container:E.container,axes:E.axesOptions,spikes:E.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:E.camera,pixelRatio:E.pixelRatio};if(E.staticMode){if(!v&&(A=document.createElement("canvas"),v=y({canvas:A,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!v))throw new Error("error creating static canvas/context for image server");k.gl=v,k.canvas=A}return k};var C=!0;x.tryCreatePlot=function(){var E=this,k=E.prepareOptions(),O=!0;try{E.glplot=t(k)}catch{if(E.staticMode||!C||r)O=!1;else{d.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{r=k.glOptions.preserveDrawingBuffer=!0,E.glplot=t(k)}catch{r=k.glOptions.preserveDrawingBuffer=!1,O=!1}}}return C=!1,O},x.initializeGLCamera=function(){var E=this,k=E.fullSceneLayout.camera,O=k.projection.type==="orthographic";E.camera=m(E.container,{center:[k.center.x,k.center.y,k.center.z],eye:[k.eye.x,k.eye.y,k.eye.z],up:[k.up.x,k.up.y,k.up.z],_ortho:O,zoomMin:.01,zoomMax:100,mode:"orbit"})},x.initializeGLPlot=function(){var E=this;E.initializeGLCamera();var k=E.tryCreatePlot();if(!k)return o(E);E.traces={},E.make4thDimension();var O=E.graphDiv,G=O.layout,z=function(){var H={};return E.isCameraChanged(G)&&(H[E.id+".camera"]=E.getCamera()),E.isAspectChanged(G)&&(H[E.id+".aspectratio"]=E.glplot.getAspectratio(),G[E.id].aspectmode!=="manual"&&(E.fullSceneLayout.aspectmode=G[E.id].aspectmode=H[E.id+".aspectmode"]="manual")),H},U=function(H){if(H.fullSceneLayout.dragmode!==!1){var B=z();H.saveLayout(G),H.graphDiv.emit("plotly_relayout",B)}};return E.glplot.canvas&&(E.glplot.canvas.addEventListener("mouseup",function(){U(E)}),E.glplot.canvas.addEventListener("wheel",function(H){if(O._context._scrollZoom.gl3d){if(E.camera._ortho){var B=H.deltaX>H.deltaY?1.1:.9090909090909091,W=E.glplot.getAspectratio();E.glplot.setAspectratio({x:B*W.x,y:B*W.y,z:B*W.z})}U(E)}},p?{passive:!1}:!1),E.glplot.canvas.addEventListener("mousemove",function(){if(E.fullSceneLayout.dragmode!==!1&&E.camera.mouseListener.buttons!==0){var H=z();E.graphDiv.emit("plotly_relayouting",H)}}),E.staticMode||E.glplot.canvas.addEventListener("webglcontextlost",function(H){O&&O.emit&&O.emit("plotly_webglcontextlost",{event:H,layer:E.id})},!1)),E.glplot.oncontextloss=function(){E.recoverContext()},E.glplot.onrender=function(){E.render()},!0},x.render=function(){var E=this,k=E.graphDiv,O,G=E.svgContainer,z=E.container.getBoundingClientRect();k._fullLayout._calcInverseTransform(k);var U=k._fullLayout._invScaleX,H=k._fullLayout._invScaleY,B=z.width*U,W=z.height*H;G.setAttributeNS(null,"viewBox","0 0 "+B+" "+W),G.setAttributeNS(null,"width",B),G.setAttributeNS(null,"height",W),g(E),E.glplot.axes.update(E.axesOptions);for(var q=Object.keys(E.traces),re=null,ie=E.glplot.selection,le=0;le")):O.type==="isosurface"||O.type==="volume"?(Q.valueLabel=n.hoverLabelText(E._mockAxis,E._mockAxis.d2l(ie.traceCoordinate[3]),O.valuehoverformat),ce.push("value: "+Q.valueLabel),ie.textLabel&&ce.push(ie.textLabel),ne=ce.join("
")):ne=ie.textLabel;var oe={x:ie.traceCoordinate[0],y:ie.traceCoordinate[1],z:ie.traceCoordinate[2],data:Z._input,fullData:Z,curveNumber:Z.index,pointNumber:K};u.appendArrayPointValue(oe,Z,K),O._module.eventData&&(oe=Z._module.eventData(oe,ie,Z,{},K));var de={points:[oe]};if(E.fullSceneLayout.hovermode){var we=[];u.loneHover({trace:Z,x:(.5+.5*$[0]/$[3])*B,y:(.5-.5*$[1]/$[3])*W,xLabel:Q.xLabel,yLabel:Q.yLabel,zLabel:Q.zLabel,text:ne,name:re.name,color:u.castHoverOption(Z,K,"bgcolor")||re.color,borderColor:u.castHoverOption(Z,K,"bordercolor"),fontFamily:u.castHoverOption(Z,K,"font.family"),fontSize:u.castHoverOption(Z,K,"font.size"),fontColor:u.castHoverOption(Z,K,"font.color"),nameLength:u.castHoverOption(Z,K,"namelength"),textAlign:u.castHoverOption(Z,K,"align"),hovertemplate:d.castOption(Z,K,"hovertemplate"),hovertemplateLabels:d.extendFlat({},oe,Q),eventData:[oe]},{container:G,gd:k,inOut_bbox:we}),oe.bbox=we[0]}ie.buttons&&ie.distance<5?k.emit("plotly_click",de):k.emit("plotly_hover",de),this.oldEventData=de}else u.loneUnhover(G),this.oldEventData&&k.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;E.drawAnnotations(E)},x.recoverContext=function(){var E=this;E.glplot.dispose();var k=function(){if(E.glplot.gl.isContextLost()){requestAnimationFrame(k);return}if(!E.initializeGLPlot()){d.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}E.plot.apply(E,E.plotArgs)};requestAnimationFrame(k)};var D=["xaxis","yaxis","zaxis"];function L(E,k,O){for(var G=E.fullSceneLayout,z=0;z<3;z++){var U=D[z],H=U.charAt(0),B=G[U],W=k[H],q=k[H+"calendar"],re=k["_"+H+"length"];if(!d.isArrayOrTypedArray(W))O[0][z]=Math.min(O[0][z],0),O[1][z]=Math.max(O[1][z],re-1);else for(var ie,le=0;le<(re||W.length);le++)if(d.isArrayOrTypedArray(W[le]))for(var he=0;heZ[1][H])Z[0][H]=-1,Z[1][H]=1;else{var we=Z[1][H]-Z[0][H];Z[0][H]-=we/32,Z[1][H]+=we/32}if(W.autorange==="reversed"){var Se=Z[0][H];Z[0][H]=Z[1][H],Z[1][H]=Se}}else{var Te=W.range;Z[0][H]=W.r2l(Te[0]),Z[1][H]=W.r2l(Te[1])}Z[0][H]===Z[1][H]&&(Z[0][H]-=1,Z[1][H]+=1),G.glplot.setBounds(H,{min:Z[0][H]*he[H],max:Z[1][H]*he[H]})}var Fe,Ie=re.aspectmode;if(Ie==="cube")Fe=[1,1,1];else if(Ie==="manual"){var Me=re.aspectratio;Fe=[Me.x,Me.y,Me.z]}else if(Ie==="auto"||Ie==="data"){var Ae=[1,1,1];for(H=0;H<3;++H){W=re[D[H]],q=W.type;var De=K[q];Ae[H]=Math.pow(De.acc,1/De.count)/he[H]}Ie==="data"||Math.max.apply(null,Ae)/Math.min.apply(null,Ae)<=4?Fe=Ae:Fe=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");re.aspectratio.x=ie.aspectratio.x=Fe[0],re.aspectratio.y=ie.aspectratio.y=Fe[1],re.aspectratio.z=ie.aspectratio.z=Fe[2],G.glplot.setAspectratio(re.aspectratio),G.viewInitial.aspectratio||(G.viewInitial.aspectratio={x:re.aspectratio.x,y:re.aspectratio.y,z:re.aspectratio.z}),G.viewInitial.aspectmode||(G.viewInitial.aspectmode=re.aspectmode);var ke=re.domain||null,We=k._size||null;if(ke&&We){var _e=G.container.style;_e.position="absolute",_e.left=We.l+ke.x[0]*We.w+"px",_e.top=We.t+(1-ke.y[1])*We.h+"px",_e.width=We.w*(ke.x[1]-ke.x[0])+"px",_e.height=We.h*(ke.y[1]-ke.y[0])+"px"}G.glplot.redraw()},x.destroy=function(){var E=this;!E.glplot||(E.camera.mouseListener.enabled=!1,E.container.removeEventListener("wheel",E.camera.wheelListener),E.camera=null,E.glplot.dispose(),E.container.parentNode.removeChild(E.container),E.glplot=null)};function M(E){return[[E.eye.x,E.eye.y,E.eye.z],[E.center.x,E.center.y,E.center.z],[E.up.x,E.up.y,E.up.z]]}function S(E){return{up:{x:E.up[0],y:E.up[1],z:E.up[2]},center:{x:E.center[0],y:E.center[1],z:E.center[2]},eye:{x:E.eye[0],y:E.eye[1],z:E.eye[2]},projection:{type:E._ortho===!0?"orthographic":"perspective"}}}x.getCamera=function(){var E=this;return E.camera.view.recalcMatrix(E.camera.view.lastT()),S(E.camera)},x.setViewport=function(E){var k=this,O=E.camera;k.camera.lookAt.apply(this,M(O)),k.glplot.setAspectratio(E.aspectratio);var G=O.projection.type==="orthographic",z=k.camera._ortho;G!==z&&(k.glplot.redraw(),k.glplot.clearRGBA(),k.glplot.dispose(),k.initializeGLPlot())},x.isCameraChanged=function(E){var k=this,O=k.getCamera(),G=d.nestedProperty(E,k.id+".camera"),z=G.get();function U(q,re,ie,le){var he=["up","center","eye"],$=["x","y","z"];return re[he[ie]]&&q[he[ie]][$[le]]===re[he[ie]][$[le]]}var H=!1;if(z===void 0)H=!0;else{for(var B=0;B<3;B++)for(var W=0;W<3;W++)if(!U(O,z,B,W)){H=!0;break}(!z.projection||O.projection&&O.projection.type!==z.projection.type)&&(H=!0)}return H},x.isAspectChanged=function(E){var k=this,O=k.glplot.getAspectratio(),G=d.nestedProperty(E,k.id+".aspectratio"),z=G.get();return z===void 0||z.x!==O.x||z.y!==O.y||z.z!==O.z},x.saveLayout=function(E){var k=this,O=k.fullLayout,G,z,U,H,B,W,q=k.isCameraChanged(E),re=k.isAspectChanged(E),ie=q||re;if(ie){var le={};if(q&&(G=k.getCamera(),z=d.nestedProperty(E,k.id+".camera"),U=z.get(),le[k.id+".camera"]=U),re&&(H=k.glplot.getAspectratio(),B=d.nestedProperty(E,k.id+".aspectratio"),W=B.get(),le[k.id+".aspectratio"]=W),l.call("_storeDirectGUIEdit",E,O._preGUI,le),q){z.set(G);var he=d.nestedProperty(O,k.id+".camera");he.set(G)}if(re){B.set(H);var $=d.nestedProperty(O,k.id+".aspectratio");$.set(H),k.glplot.redraw()}}return ie},x.updateFx=function(E,k){var O=this,G=O.camera;if(G)if(E==="orbit")G.mode="orbit",G.keyBindingMode="rotate";else if(E==="turntable"){G.up=[0,0,1],G.mode="turntable",G.keyBindingMode="rotate";var z=O.graphDiv,U=z._fullLayout,H=O.fullSceneLayout.camera,B=H.up.x,W=H.up.y,q=H.up.z;if(q/Math.sqrt(B*B+W*W+q*q)<.999){var re=O.id+".camera.up",ie={x:0,y:0,z:1},le={};le[re]=ie;var he=z.layout;l.call("_storeDirectGUIEdit",he,U._preGUI,le),H.up=ie,d.nestedProperty(he,re).set(ie)}}else G.keyBindingMode=E;O.fullSceneLayout.hovermode=k};function f(E,k,O){for(var G=0,z=O-1;G0)for(var B=255/H,W=0;W<3;++W)E[U+W]=Math.min(B*E[U+W],255)}}x.toImage=function(E){var k=this;E||(E="png"),k.staticMode&&k.container.appendChild(A),k.glplot.redraw();var O=k.glplot.gl,G=O.drawingBufferWidth,z=O.drawingBufferHeight;O.bindFramebuffer(O.FRAMEBUFFER,null);var U=new Uint8Array(G*z*4);O.readPixels(0,0,G,z,O.RGBA,O.UNSIGNED_BYTE,U),f(U,G,z),P(U,G,z);var H=document.createElement("canvas");H.width=G,H.height=z;var B=H.getContext("2d",{willReadFrequently:!0}),W=B.createImageData(G,z);W.data.set(U),B.putImageData(W,0,0);var q;switch(E){case"jpeg":q=H.toDataURL("image/jpeg");break;case"webp":q=H.toDataURL("image/webp");break;default:q=H.toDataURL("image/png")}return k.staticMode&&k.container.removeChild(A),q},x.setConvert=function(){for(var E=this,k=0;k<3;k++){var O=E.fullSceneLayout[D[k]];n.setConvert(O,E.fullLayout),O.setScale=d.noop}},x.make4thDimension=function(){var E=this,k=E.graphDiv,O=k._fullLayout;E._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},n.setConvert(E._mockAxis,O)},R.exports=h},90060:function(R){R.exports=function(e,i,m,t){t=t||e.length;for(var y=new Array(t),p=0;pOpenStreetMap contributors',y=['\xA9 Carto',t].join(" "),p=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),l=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),d={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:t,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}]},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}]},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:y,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}]},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:y,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}]},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:p,tiles:["https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}]},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:p,tiles:["https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}]},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:l,tiles:["https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}]}},r=i(d);R.exports={requiredVersion:m,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:d,styleValuesNonMapbox:r,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install mapbox-gl@"+m+"."].join(` +`),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join(` +`),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",r.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(` +`),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join(` +`),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}},13056:function(R,F,e){var i=e(71828);R.exports=function(t,y){var p=t.split(" "),l=p[0],d=p[1],r=i.isArrayOrTypedArray(y)?i.mean(y):y,n=.5+r/100,u=1.5+r/100,a=["",""],o=[0,0];switch(l){case"top":a[0]="top",o[1]=-u;break;case"bottom":a[0]="bottom",o[1]=u;break}switch(d){case"left":a[1]="right",o[0]=-n;break;case"right":a[1]="left",o[0]=n;break}var c;return a[0]&&a[1]?c=a.join("-"):a[0]?c=a[0]:a[1]?c=a[1]:c="center",{anchor:c,offset:o}}},50101:function(R,F,e){var i=e(44517),m=e(71828),t=m.strTranslate,y=m.strScale,p=e(27659).AU,l=e(77922),d=e(39898),r=e(91424),n=e(63893),u=e(10481),a="mapbox",o=F.constants=e(77734);F.name=a,F.attr="subplot",F.idRoot=a,F.idRegex=F.attrRegex=m.counterRegex(a),F.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},F.layoutAttributes=e(23585),F.supplyLayoutDefaults=e(77882),F.plot=function(g){var A=g._fullLayout,v=g.calcdata,h=A._subplots[a];if(i.version!==o.requiredVersion)throw new Error(o.wrongVersionErrorMsg);var x=c(g,h);i.accessToken=x;for(var C=0;CG/2){var z=P.split("|").join("
");k.text(z).attr("data-unformatted",z).call(n.convertToTspans,b),O=r.bBox(k.node())}k.attr("transform",t(-3,-O.height+8)),E.insert("rect",".static-attribution").attr({x:-O.width-6,y:-O.height-3,width:O.width+6,height:O.height+3,fill:"rgba(255, 255, 255, 0.75)"});var U=1;O.width+6>G&&(U=G/(O.width+6));var H=[v.l+v.w*C.x[1],v.t+v.h*(1-C.y[0])];E.attr("transform",t(H[0],H[1])+y(U))}};function c(b,g){var A=b._fullLayout,v=b._context;if(v.mapboxAccessToken==="")return"";for(var h=[],x=[],C=!1,D=!1,L=0;L1&&m.warn(o.multipleTokensErrorMsg),h[0]):(x.length&&m.log(["Listed mapbox access token(s)",x.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function s(b){return typeof b=="string"&&(o.styleValuesMapbox.indexOf(b)!==-1||b.indexOf("mapbox://")===0)}F.updateFx=function(b){for(var g=b._fullLayout,A=g._subplots[a],v=0;v0){for(var o=0;o0}function r(u){var a={},o={};switch(u.type){case"circle":i.extendFlat(o,{"circle-radius":u.circle.radius,"circle-color":u.color,"circle-opacity":u.opacity});break;case"line":i.extendFlat(o,{"line-width":u.line.width,"line-color":u.color,"line-opacity":u.opacity,"line-dasharray":u.line.dash});break;case"fill":i.extendFlat(o,{"fill-color":u.color,"fill-outline-color":u.fill.outlinecolor,"fill-opacity":u.opacity});break;case"symbol":var c=u.symbol,s=t(c.textposition,c.iconsize);i.extendFlat(a,{"icon-image":c.icon+"-15","icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":s.anchor,"text-offset":s.offset,"symbol-placement":c.placement}),i.extendFlat(o,{"icon-color":u.color,"text-color":c.textfont.color,"text-opacity":u.opacity});break;case"raster":i.extendFlat(o,{"raster-fade-duration":0,"raster-opacity":u.opacity});break}return{layout:a,paint:o}}function n(u){var a=u.sourcetype,o=u.source,c={type:a},s;return a==="geojson"?s="data":a==="vector"?s=typeof o=="string"?"url":"tiles":a==="raster"?(s="tiles",c.tileSize=256):a==="image"&&(s="url",c.coordinates=u.coordinates),c[s]=o,u.sourceattribution&&(c.attribution=m(u.sourceattribution)),c}R.exports=function(a,o,c){var s=new p(a,o);return s.update(c),s}},23585:function(R,F,e){var i=e(71828),m=e(7901).defaultLine,t=e(27670).Y,y=e(41940),p=e(82196).textposition,l=e(30962).overrideAll,d=e(44467).templatedArray,r=e(77734),n=y({});n.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var u=R.exports=l({_arrayAttrRegexps:[i.counterRegex("mapbox",".layers",!0)],domain:t({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:r.styleValuesMapbox.concat(r.styleValuesNonMapbox),dflt:r.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:d("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:m},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:m}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:n,textposition:i.extendFlat({},p,{arrayOk:!1})}})},"plot","from-root");u.uirevision={valType:"any",editType:"none"}},77882:function(R,F,e){var i=e(71828),m=e(49119),t=e(85501),y=e(23585);R.exports=function(r,n,u){m(r,n,u,{type:"mapbox",attributes:y,handleDefaults:p,partition:"y",accessToken:n._mapboxAccessToken})};function p(d,r,n,u){n("accesstoken",u.accessToken),n("style"),n("center.lon"),n("center.lat"),n("zoom"),n("bearing"),n("pitch");var a=n("bounds.west"),o=n("bounds.east"),c=n("bounds.south"),s=n("bounds.north");(a===void 0||o===void 0||c===void 0||s===void 0)&&delete r.bounds,t(d,r,{name:"layers",handleItemDefaults:l}),r._input=d}function l(d,r){function n(b,g){return i.coerce(d,r,y.layers,b,g)}var u=n("visible");if(u){var a=n("sourcetype"),o=a==="raster"||a==="image";n("source"),n("sourceattribution"),a==="vector"&&n("sourcelayer"),a==="image"&&n("coordinates");var c;o&&(c="raster");var s=n("type",c);o&&s!=="raster"&&(s=r.type="raster",i.log("Source types *raster* and *image* must drawn *raster* layer type.")),n("below"),n("color"),n("opacity"),n("minzoom"),n("maxzoom"),s==="circle"&&n("circle.radius"),s==="line"&&(n("line.width"),n("line.dash")),s==="fill"&&n("fill.outlinecolor"),s==="symbol"&&(n("symbol.icon"),n("symbol.iconsize"),n("symbol.text"),i.coerceFont(n,"symbol.textfont"),n("symbol.textposition"),n("symbol.placement"))}}},10481:function(R,F,e){var i=e(44517),m=e(71828),t=e(41327),y=e(73972),p=e(89298),l=e(28569),d=e(30211),r=e(64505),n=r.drawMode,u=r.selectMode,a=e(47322).prepSelect,o=e(47322).clearOutline,c=e(47322).clearSelectionsCache,s=e(47322).selectOnClick,b=e(77734),g=e(67911);function A(L,w){this.id=w,this.gd=L;var M=L._fullLayout,S=L._context;this.container=M._glcontainer.node(),this.isStatic=S.staticPlot,this.uid=M._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(M),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var v=A.prototype;v.plot=function(L,w,M){var S=this,f=w[S.id];S.map&&f.accesstoken!==S.accessToken&&(S.map.remove(),S.map=null,S.styleObj=null,S.traceHash={},S.layerList=[]);var P;S.map?P=new Promise(function(E,k){S.updateMap(L,w,E,k)}):P=new Promise(function(E,k){S.createMap(L,w,E,k)}),M.push(P)},v.createMap=function(L,w,M,S){var f=this,P=w[f.id],E=f.styleObj=x(P.style);f.accessToken=P.accesstoken;var k=P.bounds,O=k?[[k.west,k.south],[k.east,k.north]]:null,G=f.map=new i.Map({container:f.div,style:E.style,center:D(P.center),zoom:P.zoom,bearing:P.bearing,pitch:P.pitch,maxBounds:O,interactive:!f.isStatic,preserveDrawingBuffer:f.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new i.AttributionControl({compact:!0}));G._canvas.style.left="0px",G._canvas.style.top="0px",f.rejectOnError(S),f.isStatic||f.initFx(L,w);var z=[];z.push(new Promise(function(U){G.once("load",U)})),z=z.concat(t.fetchTraceGeoData(L)),Promise.all(z).then(function(){f.fillBelowLookup(L,w),f.updateData(L),f.updateLayout(w),f.resolveOnRender(M)}).catch(S)},v.updateMap=function(L,w,M,S){var f=this,P=f.map,E=w[this.id];f.rejectOnError(S);var k=[],O=x(E.style);JSON.stringify(f.styleObj)!==JSON.stringify(O)&&(f.styleObj=O,P.setStyle(O.style),f.traceHash={},k.push(new Promise(function(G){P.once("styledata",G)}))),k=k.concat(t.fetchTraceGeoData(L)),Promise.all(k).then(function(){f.fillBelowLookup(L,w),f.updateData(L),f.updateLayout(w),f.resolveOnRender(M)}).catch(S)},v.fillBelowLookup=function(L,w){var M=w[this.id],S=M.layers,f,P,E=this.belowLookup={},k=!1;for(f=0;f1)for(f=0;f-1&&s(O.originalEvent,S,[M.xaxis],[M.yaxis],M.id,k),G.indexOf("event")>-1&&d.click(S,O.originalEvent)}}},v.updateFx=function(L){var w=this,M=w.map,S=w.gd;if(w.isStatic)return;function f(O){var G=w.map.unproject(O);return[G.lng,G.lat]}var P=L.dragmode,E;E=function(O,G){if(G.isRect){var z=O.range={};z[w.id]=[f([G.xmin,G.ymin]),f([G.xmax,G.ymax])]}else{var U=O.lassoPoints={};U[w.id]=G.map(f)}};var k=w.dragOptions;w.dragOptions=m.extendDeep(k||{},{dragmode:L.dragmode,element:w.div,gd:S,plotinfo:{id:w.id,domain:L[w.id].domain,xaxis:w.xaxis,yaxis:w.yaxis,fillRangeItems:E},xaxes:[w.xaxis],yaxes:[w.yaxis],subplot:w.id}),M.off("click",w.onClickInPanHandler),u(P)||n(P)?(M.dragPan.disable(),M.on("zoomstart",w.clearOutline),w.dragOptions.prepFn=function(O,G,z){a(O,G,z,w.dragOptions,P)},l.init(w.dragOptions)):(M.dragPan.enable(),M.off("zoomstart",w.clearOutline),w.div.onmousedown=null,w.div.ontouchstart=null,w.div.removeEventListener("touchstart",w.div._ontouchstart),w.onClickInPanHandler=w.onClickInPanFn(w.dragOptions),M.on("click",w.onClickInPanHandler))},v.updateFramework=function(L){var w=L[this.id].domain,M=L._size,S=this.div.style;S.width=M.w*(w.x[1]-w.x[0])+"px",S.height=M.h*(w.y[1]-w.y[0])+"px",S.left=M.l+w.x[0]*M.w+"px",S.top=M.t+(1-w.y[1])*M.h+"px",this.xaxis._offset=M.l+w.x[0]*M.w,this.xaxis._length=M.w*(w.x[1]-w.x[0]),this.yaxis._offset=M.t+(1-w.y[1])*M.h,this.yaxis._length=M.h*(w.y[1]-w.y[0])},v.updateLayers=function(L){var w=L[this.id],M=w.layers,S=this.layerList,f;if(M.length!==S.length){for(f=0;f=Q.width-20?(te["text-anchor"]="start",te.x=5):(te["text-anchor"]="end",te.x=Q._paper.attr("width")-7),ae.attr(te);var ne=ae.select(".js-link-to-tool"),ce=ae.select(".js-link-spacer"),oe=ae.select(".js-sourcelinks");K._context.showSources&&K._context.showSources(K),K._context.showLink&&D(K,ne),ce.text(ne.text()&&oe.text()?" - ":"")}};function D(K,Q){Q.text("");var ae=Q.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(K._context.linkText+" "+String.fromCharCode(187));if(K._context.sendData)ae.on("click",function(){h.sendDataToCloud(K)});else{var fe=window.location.pathname.split("/"),te=window.location.search;ae.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+fe[2].split(".")[0]+"/"+fe[1]+te})}}h.sendDataToCloud=function(K){var Q=(window.PLOTLYENV||{}).BASE_URL||K._context.plotlyServerURL;if(!!Q){K.emit("plotly_beforeexport");var ae=i.select(K).append("div").attr("id","hiddenform").style("display","none"),fe=ae.append("form").attr({action:Q+"/external",method:"post",target:"_blank"}),te=fe.append("input").attr({type:"text",name:"data"});return te.node().value=h.graphJson(K,!1,"keepdata"),fe.node().submit(),ae.remove(),K.emit("plotly_afterexport"),!1}};var L=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],w=["year","month","dayMonth","dayMonthYear"];h.supplyDefaults=function(K,Q){var ae=Q&&Q.skipUpdateCalc,fe=K._fullLayout||{};if(fe._skipDefaults){delete fe._skipDefaults;return}var te=K._fullLayout={},ne=K.layout||{},ce=K._fullData||[],oe=K._fullData=[],de=K.data||[],we=K.calcdata||[],Se=K._context||{},Te;K._transitionData||h.createTransitionData(K),te._dfltTitle={plot:v(K,"Click to enter Plot title"),x:v(K,"Click to enter X axis title"),y:v(K,"Click to enter Y axis title"),colorbar:v(K,"Click to enter Colorscale title"),annotation:v(K,"new text")},te._traceWord=v(K,"trace");var Fe=f(K,L);if(te._mapboxAccessToken=Se.mapboxAccessToken,fe._initialAutoSizeIsDone){var Ie=fe.width,Me=fe.height;h.supplyLayoutGlobalDefaults(ne,te,Fe),ne.width||(te.width=Ie),ne.height||(te.height=Me),h.sanitizeMargins(te)}else{h.supplyLayoutGlobalDefaults(ne,te,Fe);var Ae=!ne.width||!ne.height,De=te.autosize,ke=Se.autosizable,We=Ae&&(De||ke);We?h.plotAutoSize(K,ne,te):Ae&&h.sanitizeMargins(te),!De&&Ae&&(ne.width=te.width,ne.height=te.height)}te._d3locale=P(Fe,te.separators),te._extraFormat=f(K,w),te._initialAutoSizeIsDone=!0,te._dataLength=de.length,te._modules=[],te._visibleModules=[],te._basePlotModules=[];var _e=te._subplots=S(),Ye=te._splomAxes={x:{},y:{}},Pe=te._splomSubplots={};te._splomGridDflt={},te._scatterStackOpts={},te._firstScatter={},te._alignmentOpts={},te._colorAxes={},te._requestRangeslider={},te._traceUids=M(ce,de),te._globalTransforms=(K._context||{}).globalTransforms,h.supplyDataDefaults(de,oe,ne,te);var Ve=Object.keys(Ye.x),Ze=Object.keys(Ye.y);if(Ve.length>1&&Ze.length>1){for(p.getComponentMethod("grid","sizeDefaults")(ne,te),Te=0;Te15&&Ze.length>15&&te.shapes.length===0&&te.images.length===0,h.linkSubplots(oe,te,ce,fe),h.cleanPlot(oe,te,ce,fe);var Et=!!(fe._has&&fe._has("gl2d")),et=!!(te._has&&te._has("gl2d")),Ue=!!(fe._has&&fe._has("cartesian")),Be=!!(te._has&&te._has("cartesian")),rt=Ue||Et,ot=Be||et;rt&&!ot?fe._bgLayer.remove():ot&&!rt&&(te._shouldCreateBgLayer=!0),fe._zoomlayer&&!K._dragging&&o({_fullLayout:fe}),E(oe,te),A(te,fe),p.getComponentMethod("colorscale","crossTraceDefaults")(oe,te),te._preGUI||(te._preGUI={}),te._tracePreGUI||(te._tracePreGUI={});var qe=te._tracePreGUI,Oe={},Ce;for(Ce in qe)Oe[Ce]="old";for(Te=0;Te0){var Se=1-2*ne;ce=Math.round(Se*ce),oe=Math.round(Se*oe)}}var Te=h.layoutAttributes.width.min,Fe=h.layoutAttributes.height.min;ce1,Me=!ae.height&&Math.abs(fe.height-oe)>1;(Me||Ie)&&(Ie&&(fe.width=ce),Me&&(fe.height=oe)),Q._initialAutoSize||(Q._initialAutoSize={width:ce,height:oe}),h.sanitizeMargins(fe)},h.supplyLayoutModuleDefaults=function(K,Q,ae,fe){var te=p.componentsRegistry,ne=Q._basePlotModules,ce,oe,de,we=p.subplotsRegistry.cartesian;for(ce in te)de=te[ce],de.includeBasePlot&&de.includeBasePlot(K,Q);ne.length||ne.push(we),Q._has("cartesian")&&(p.getComponentMethod("grid","contentDefaults")(K,Q),we.finalizeSubplots(K,Q));for(var Se in Q._subplots)Q._subplots[Se].sort(r.subplotSort);for(oe=0;oe1&&(ae.l/=De,ae.r/=De)}if(Fe){var ke=(ae.t+ae.b)/Fe;ke>1&&(ae.t/=ke,ae.b/=ke)}var We=ae.xl!==void 0?ae.xl:ae.x,_e=ae.xr!==void 0?ae.xr:ae.x,Ye=ae.yt!==void 0?ae.yt:ae.y,Pe=ae.yb!==void 0?ae.yb:ae.y;Ie[Q]={l:{val:We,size:ae.l+Ae},r:{val:_e,size:ae.r+Ae},b:{val:Pe,size:ae.b+Ae},t:{val:Ye,size:ae.t+Ae}},Me[Q]=1}if(!fe._replotting)return h.doAutoMargin(K)}};function W(K){if("_redrawFromAutoMarginCount"in K._fullLayout)return!1;var Q=a.list(K,"",!0);for(var ae in Q)if(Q[ae].autoshift||Q[ae].shift)return!0;return!1}h.doAutoMargin=function(K){var Q=K._fullLayout,ae=Q.width,fe=Q.height;Q._size||(Q._size={}),U(Q);var te=Q._size,ne=Q.margin,ce={t:0,b:0,l:0,r:0},oe=r.extendFlat({},te),de=K._fullLayout._reservedMargin;for(var we in de)for(var Se in de[we]){var Te=de[we][Se];ce[Se]=Math.max(ce[Se],Te)}var Fe=ne.l,Ie=ne.r,Me=ne.t,Ae=ne.b,De=Q._pushmargin,ke=Q._pushmarginIds,We=Q.minreducedwidth,_e=Q.minreducedheight;if(Q.margin.autoexpand!==!1){for(var Ye in De)ke[Ye]||delete De[Ye];De.base={l:{val:0,size:Fe},r:{val:1,size:Ie},t:{val:1,size:Me},b:{val:0,size:Ae}};for(var Pe in De){var Ve=De[Pe].l||{},Ze=De[Pe].b||{},Ke=Ve.val,lt=Ve.size,vt=Ze.val,mt=Ze.size,Et=ae-ce.r-ce.l,et=fe-ce.t-ce.b;for(var Ue in De){if(y(lt)&&De[Ue].r){var Be=De[Ue].r.val,rt=De[Ue].r.size;if(Be>Ke){var ot=(lt*Be+(rt-Et)*Ke)/(Be-Ke),qe=(rt*(1-Ke)+(lt-Et)*(1-Be))/(Be-Ke);ot+qe>Fe+Ie&&(Fe=ot,Ie=qe)}}if(y(mt)&&De[Ue].t){var Oe=De[Ue].t.val,Ce=De[Ue].t.size;if(Oe>vt){var pe=(mt*Oe+(Ce-et)*vt)/(Oe-vt),be=(Ce*(1-vt)+(mt-et)*(1-Oe))/(Oe-vt);pe+be>Ae+Me&&(Ae=pe,Me=be)}}}}}var Re=r.constrain(ae-ne.l-ne.r,H,We),He=r.constrain(fe-ne.t-ne.b,B,_e),st=Math.max(0,ae-Re),ct=Math.max(0,fe-He);if(st){var bt=(Fe+Ie)/st;bt>1&&(Fe/=bt,Ie/=bt)}if(ct){var Lt=(Ae+Me)/ct;Lt>1&&(Ae/=Lt,Me/=Lt)}if(te.l=Math.round(Fe)+ce.l,te.r=Math.round(Ie)+ce.r,te.t=Math.round(Me)+ce.t,te.b=Math.round(Ae)+ce.b,te.p=Math.round(ne.pad),te.w=Math.round(ae)-te.l-te.r,te.h=Math.round(fe)-te.t-te.b,!Q._replotting&&(h.didMarginChange(oe,te)||W(K))){"_redrawFromAutoMarginCount"in Q?Q._redrawFromAutoMarginCount++:Q._redrawFromAutoMarginCount=1;var Ut=3*(1+Object.keys(ke).length);if(Q._redrawFromAutoMarginCount1)return!0}return!1},h.graphJson=function(K,Q,ae,fe,te,ne){(te&&Q&&!K._fullData||te&&!Q&&!K._fullLayout)&&h.supplyDefaults(K);var ce=te?K._fullData:K.data,oe=te?K._fullLayout:K.layout,de=(K._transitionData||{})._frames;function we(Fe,Ie){if(typeof Fe=="function")return Ie?"_function_":null;if(r.isPlainObject(Fe)){var Me={},Ae;return Object.keys(Fe).sort().forEach(function(De){if(["_","["].indexOf(De.charAt(0))===-1){if(typeof Fe[De]=="function"){Ie&&(Me[De]="_function");return}if(ae==="keepdata"){if(De.substr(De.length-3)==="src")return}else if(ae==="keepstream"){if(Ae=Fe[De+"src"],typeof Ae=="string"&&Ae.indexOf(":")>0&&!r.isPlainObject(Fe.stream))return}else if(ae!=="keepall"&&(Ae=Fe[De+"src"],typeof Ae=="string"&&Ae.indexOf(":")>0))return;Me[De]=we(Fe[De],Ie)}}),Me}return Array.isArray(Fe)?Fe.map(function(De){return we(De,Ie)}):r.isTypedArray(Fe)?r.simpleMap(Fe,r.identity):r.isJSDate(Fe)?r.ms2DateTimeLocal(+Fe):Fe}var Se={data:(ce||[]).map(function(Fe){var Ie=we(Fe);return Q&&delete Ie.fit,Ie})};if(!Q&&(Se.layout=we(oe),te)){var Te=oe._size;Se.layout.computed={margin:{b:Te.b,l:Te.l,r:Te.r,t:Te.t}}}return de&&(Se.frames=we(de)),ne&&(Se.config=we(K._context,!0)),fe==="object"?Se:JSON.stringify(Se)},h.modifyFrames=function(K,Q){var ae,fe,te,ne=K._transitionData._frames,ce=K._transitionData._frameHash;for(ae=0;ae0&&(K._transitioningWithDuration=!0),K._transitionData._interruptCallbacks.push(function(){fe=!0}),ae.redraw&&K._transitionData._interruptCallbacks.push(function(){return p.call("redraw",K)}),K._transitionData._interruptCallbacks.push(function(){K.emit("plotly_transitioninterrupted",[])});var Fe=0,Ie=0;function Me(){return Fe++,function(){Ie++,!fe&&Ie===Fe&&oe(Te)}}ae.runFn(Me),setTimeout(Me())})}function oe(Te){if(!!K._transitionData)return ne(K._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(ae.redraw)return p.call("redraw",K)}).then(function(){K._transitioning=!1,K._transitioningWithDuration=!1,K.emit("plotly_transitioned",[])}).then(Te)}function de(){if(!!K._transitionData)return K._transitioning=!1,te(K._transitionData._interruptCallbacks)}var we=[h.previousPromises,de,ae.prepareFn,h.rehover,h.reselect,ce],Se=r.syncOrAsync(we,K);return(!Se||!Se.then)&&(Se=Promise.resolve()),Se.then(function(){return K})}h.doCalcdata=function(K,Q){var ae=a.list(K),fe=K._fullData,te=K._fullLayout,ne,ce,oe,de,we=new Array(fe.length),Se=(K.calcdata||[]).slice();for(K.calcdata=we,te._numBoxes=0,te._numViolins=0,te._violinScaleGroupStats={},K._hmpixcount=0,K._hmlumcount=0,te._piecolormap={},te._sunburstcolormap={},te._treemapcolormap={},te._iciclecolormap={},te._funnelareacolormap={},oe=0;oe=0;de--)if(Pe[de].enabled){ne._indexToPoints=Pe[de]._indexToPoints;break}ce&&ce.calc&&(Ye=ce.calc(K,ne))}(!Array.isArray(Ye)||!Ye[0])&&(Ye=[{x:u,y:u}]),Ye[0].t||(Ye[0].t={}),Ye[0].trace=ne,we[We]=Ye}}for($(ae,fe,te),oe=0;oe0?M:1/0},D=t(x,C),L=i.mod(D+1,x.length);return[x[D],x[L]]}function b(h){return Math.abs(h)>1e-10?h:0}function g(h,x,C){x=x||0,C=C||0;for(var D=h.length,L=new Array(D),w=0;wIe?(Me=ce,Ae=ce*Ie,We=(oe-Ae)/Q.h/2,De=[te[0],te[1]],ke=[ne[0]+We,ne[1]-We]):(Me=oe/Ie,Ae=oe,We=(ce-Me)/Q.w/2,De=[te[0]+We,te[1]-We],ke=[ne[0],ne[1]]),Z.xLength2=Me,Z.yLength2=Ae,Z.xDomain2=De,Z.yDomain2=ke;var _e=Z.xOffset2=Q.l+Q.w*De[0],Ye=Z.yOffset2=Q.t+Q.h*(1-ke[1]),Pe=Z.radius=Me/Se,Ve=Z.innerRadius=Z.getHole($)*Pe,Ze=Z.cx=_e-Pe*we[0],Ke=Z.cy=Ye+Pe*we[3],lt=Z.cxx=Ze-_e,vt=Z.cyy=Ke-Ye,mt=ae.side,Et;mt==="counterclockwise"?(Et=mt,mt="top"):mt==="clockwise"&&(Et=mt,mt="bottom"),Z.radialAxis=Z.mockAxis(he,$,ae,{_id:"x",side:mt,_trueSide:Et,domain:[Ve/Q.w,Pe/Q.w]}),Z.angularAxis=Z.mockAxis(he,$,fe,{side:"right",domain:[0,Math.PI],autorange:!1}),Z.doAutoRange(he,$),Z.updateAngularAxis(he,$),Z.updateRadialAxis(he,$),Z.updateRadialAxisTitle(he,$),Z.xaxis=Z.mockCartesianAxis(he,$,{_id:"x",domain:De}),Z.yaxis=Z.mockCartesianAxis(he,$,{_id:"y",domain:ke});var et=Z.pathSubplot();Z.clipPaths.forTraces.select("path").attr("d",et).attr("transform",l(lt,vt)),K.frontplot.attr("transform",l(_e,Ye)).call(r.setClipUrl,Z._hasClipOnAxisFalse?null:Z.clipIds.forTraces,Z.gd),K.bg.attr("d",et).attr("transform",l(Ze,Ke)).call(d.fill,$.bgcolor)},W.mockAxis=function(he,$,Z,K){var Q=y.extendFlat({},Z,K);return o(Q,$,he),Q},W.mockCartesianAxis=function(he,$,Z){var K=this,Q=K.isSmith,ae=Z._id,fe=y.extendFlat({type:"linear"},Z);a(fe,he);var te={x:[0,2],y:[1,3]};return fe.setRange=function(){var ne=K.sectorBBox,ce=te[ae],oe=K.radialAxis._rl,de=(oe[1]-oe[0])/(1-K.getHole($));fe.range=[ne[ce[0]]*de,ne[ce[1]]*de]},fe.isPtWithinRange=ae==="x"&&!Q?function(ne){return K.isPtInside(ne)}:function(){return!0},fe.setRange(),fe.setScale(),fe},W.doAutoRange=function(he,$){var Z=this,K=Z.gd,Q=Z.radialAxis,ae=Z.getRadial($);c(K,Q);var fe=Q.range;ae.range=fe.slice(),ae._input.range=fe.slice(),Q._rl=[Q.r2l(fe[0],null,"gregorian"),Q.r2l(fe[1],null,"gregorian")]},W.updateRadialAxis=function(he,$){var Z=this,K=Z.gd,Q=Z.layers,ae=Z.radius,fe=Z.innerRadius,te=Z.cx,ne=Z.cy,ce=Z.getRadial($),oe=z(Z.getSector($)[0],360),de=Z.radialAxis,we=fe90&&oe<=270&&(de.tickangle=180);var Te=Se?function(Pe){var Ve=O(Z,P([Pe.x,0]));return l(Ve[0]-te,Ve[1]-ne)}:function(Pe){return l(de.l2p(Pe.x)+fe,0)},Fe=Se?function(Pe){return k(Z,Pe.x,-1/0,1/0)}:function(Pe){return Z.pathArc(de.r2p(Pe.x)+fe)},Ie=q(ce);if(Z.radialTickLayout!==Ie&&(Q["radial-axis"].selectAll(".xtick").remove(),Z.radialTickLayout=Ie),we){de.setScale();var Me=0,Ae=Se?(de.tickvals||[]).filter(function(Pe){return Pe>=0}).map(function(Pe){return u.tickText(de,Pe,!0,!1)}):u.calcTicks(de),De=Se?Ae:u.clipEnds(de,Ae),ke=u.getTickSigns(de)[2];Se&&((de.ticks==="top"&&de.side==="bottom"||de.ticks==="bottom"&&de.side==="top")&&(ke=-ke),de.ticks==="top"&&de.side==="top"&&(Me=-de.ticklen),de.ticks==="bottom"&&de.side==="bottom"&&(Me=de.ticklen)),u.drawTicks(K,de,{vals:Ae,layer:Q["radial-axis"],path:u.makeTickPath(de,0,ke),transFn:Te,crisp:!1}),u.drawGrid(K,de,{vals:De,layer:Q["radial-grid"],path:Fe,transFn:y.noop,crisp:!1}),u.drawLabels(K,de,{vals:Ae,layer:Q["radial-axis"],transFn:Te,labelFns:u.makeLabelFns(de,Me)})}var We=Z.radialAxisAngle=Z.vangles?H(ie(U(ce.angle),Z.vangles)):ce.angle,_e=l(te,ne),Ye=_e+p(-We);le(Q["radial-axis"],we&&(ce.showticklabels||ce.ticks),{transform:Ye}),le(Q["radial-grid"],we&&ce.showgrid,{transform:Se?"":_e}),le(Q["radial-line"].select("line"),we&&ce.showline,{x1:Se?-ae:fe,y1:0,x2:ae,y2:0,transform:Ye}).attr("stroke-width",ce.linewidth).call(d.stroke,ce.linecolor)},W.updateRadialAxisTitle=function(he,$,Z){if(!this.isSmith){var K=this,Q=K.gd,ae=K.radius,fe=K.cx,te=K.cy,ne=K.getRadial($),ce=K.id+"title",oe=0;if(ne.title){var de=r.bBox(K.layers["radial-axis"].node()).height,we=ne.title.font.size,Se=ne.side;oe=Se==="top"?we:Se==="counterclockwise"?-(de+we*.4):de+we*.8}var Te=Z!==void 0?Z:K.radialAxisAngle,Fe=U(Te),Ie=Math.cos(Fe),Me=Math.sin(Fe),Ae=fe+ae/2*Ie+oe*Me,De=te-ae/2*Me+oe*Ie;K.layers["radial-axis-title"]=A.draw(Q,ce,{propContainer:ne,propName:K.id+".radialaxis.title",placeholder:G(Q,"Click to enter radial axis title"),attributes:{x:Ae,y:De,"text-anchor":"middle"},transform:{rotate:-Te}})}},W.updateAngularAxis=function(he,$){var Z=this,K=Z.gd,Q=Z.layers,ae=Z.radius,fe=Z.innerRadius,te=Z.cx,ne=Z.cy,ce=Z.getAngular($),oe=Z.angularAxis,de=Z.isSmith;de||(Z.fillViewInitialKey("angularaxis.rotation",ce.rotation),oe.setGeometry(),oe.setScale());var we=de?function(Ve){var Ze=O(Z,P([0,Ve.x]));return Math.atan2(Ze[0]-te,Ze[1]-ne)-Math.PI/2}:function(Ve){return oe.t2g(Ve.x)};oe.type==="linear"&&oe.thetaunit==="radians"&&(oe.tick0=H(oe.tick0),oe.dtick=H(oe.dtick));var Se=function(Ve){return l(te+ae*Math.cos(Ve),ne-ae*Math.sin(Ve))},Te=de?function(Ve){var Ze=O(Z,P([0,Ve.x]));return l(Ze[0],Ze[1])}:function(Ve){return Se(we(Ve))},Fe=de?function(Ve){var Ze=O(Z,P([0,Ve.x])),Ke=Math.atan2(Ze[0]-te,Ze[1]-ne)-Math.PI/2;return l(Ze[0],Ze[1])+p(-H(Ke))}:function(Ve){var Ze=we(Ve);return Se(Ze)+p(-H(Ze))},Ie=de?function(Ve){return E(Z,Ve.x,0,1/0)}:function(Ve){var Ze=we(Ve),Ke=Math.cos(Ze),lt=Math.sin(Ze);return"M"+[te+fe*Ke,ne-fe*lt]+"L"+[te+ae*Ke,ne-ae*lt]},Me=u.makeLabelFns(oe,0),Ae=Me.labelStandoff,De={};De.xFn=function(Ve){var Ze=we(Ve);return Math.cos(Ze)*Ae},De.yFn=function(Ve){var Ze=we(Ve),Ke=Math.sin(Ze)>0?.2:1;return-Math.sin(Ze)*(Ae+Ve.fontSize*Ke)+Math.abs(Math.cos(Ze))*(Ve.fontSize*w)},De.anchorFn=function(Ve){var Ze=we(Ve),Ke=Math.cos(Ze);return Math.abs(Ke)<.1?"middle":Ke>0?"start":"end"},De.heightFn=function(Ve,Ze,Ke){var lt=we(Ve);return-.5*(1+Math.sin(lt))*Ke};var ke=q(ce);Z.angularTickLayout!==ke&&(Q["angular-axis"].selectAll("."+oe._id+"tick").remove(),Z.angularTickLayout=ke);var We=de?[1/0].concat(oe.tickvals||[]).map(function(Ve){return u.tickText(oe,Ve,!0,!1)}):u.calcTicks(oe);de&&(We[0].text="\u221E",We[0].fontSize*=1.75);var _e;if($.gridshape==="linear"?(_e=We.map(we),y.angleDelta(_e[0],_e[1])<0&&(_e=_e.slice().reverse())):_e=null,Z.vangles=_e,oe.type==="category"&&(We=We.filter(function(Ve){return y.isAngleInsideSector(we(Ve),Z.sectorInRad)})),oe.visible){var Ye=oe.ticks==="inside"?-1:1,Pe=(oe.linewidth||1)/2;u.drawTicks(K,oe,{vals:We,layer:Q["angular-axis"],path:"M"+Ye*Pe+",0h"+Ye*oe.ticklen,transFn:Fe,crisp:!1}),u.drawGrid(K,oe,{vals:We,layer:Q["angular-grid"],path:Ie,transFn:y.noop,crisp:!1}),u.drawLabels(K,oe,{vals:We,layer:Q["angular-axis"],repositionOnUpdate:!0,transFn:Te,labelFns:De})}le(Q["angular-line"].select("path"),ce.showline,{d:Z.pathSubplot(),transform:l(te,ne)}).attr("stroke-width",ce.linewidth).call(d.stroke,ce.linecolor)},W.updateFx=function(he,$){if(!this.gd._context.staticPlot){var Z=!this.isSmith;Z&&(this.updateAngularDrag(he),this.updateRadialDrag(he,$,0),this.updateRadialDrag(he,$,1)),this.updateHoverAndMainDrag(he)}},W.updateHoverAndMainDrag=function(he){var $=this,Z=$.isSmith,K=$.gd,Q=$.layers,ae=he._zoomlayer,fe=M.MINZOOM,te=M.OFFEDGE,ne=$.radius,ce=$.innerRadius,oe=$.cx,de=$.cy,we=$.cxx,Se=$.cyy,Te=$.sectorInRad,Fe=$.vangles,Ie=$.radialAxis,Me=S.clampTiny,Ae=S.findXYatLength,De=S.findEnclosingVertexAngles,ke=M.cornerHalfWidth,We=M.cornerLen/2,_e,Ye,Pe=s.makeDragger(Q,"path","maindrag",he.dragmode===!1?"none":"crosshair");i.select(Pe).attr("d",$.pathSubplot()).attr("transform",l(oe,de)),Pe.onmousemove=function(Ft){g.hover(K,Ft,$.id),K._fullLayout._lasthover=Pe,K._fullLayout._hoversubplot=$.id},Pe.onmouseout=function(Ft){K._dragging||b.unhover(K,Ft)};var Ve={element:Pe,gd:K,subplot:$.id,plotinfo:{id:$.id,xaxis:$.xaxis,yaxis:$.yaxis},xaxes:[$.xaxis],yaxes:[$.yaxis]},Ze,Ke,lt,vt,mt,Et,et,Ue,Be;function rt(Ft,tr){return Math.sqrt(Ft*Ft+tr*tr)}function ot(Ft,tr){return rt(Ft-we,tr-Se)}function qe(Ft,tr){return Math.atan2(Se-tr,Ft-we)}function Oe(Ft,tr){return[Ft*Math.cos(tr),Ft*Math.sin(-tr)]}function Ce(Ft,tr){if(Ft===0)return $.pathSector(2*ke);var lr=We/Ft,Or=tr-lr,xt=tr+lr,jt=Math.max(0,Math.min(Ft,ne)),Yt=jt-ke,br=jt+ke;return"M"+Oe(Yt,Or)+"A"+[Yt,Yt]+" 0,0,0 "+Oe(Yt,xt)+"L"+Oe(br,xt)+"A"+[br,br]+" 0,0,1 "+Oe(br,Or)+"Z"}function pe(Ft,tr,lr){if(Ft===0)return $.pathSector(2*ke);var Or=Oe(Ft,tr),xt=Oe(Ft,lr),jt=Me((Or[0]+xt[0])/2),Yt=Me((Or[1]+xt[1])/2),br,dr;if(jt&&Yt){var ht=Yt/jt,ut=-1/ht,wt=Ae(ke,ht,jt,Yt);br=Ae(We,ut,wt[0][0],wt[0][1]),dr=Ae(We,ut,wt[1][0],wt[1][1])}else{var St,Dt;Yt?(St=We,Dt=ke):(St=ke,Dt=We),br=[[jt-St,Yt-Dt],[jt+St,Yt-Dt]],dr=[[jt-St,Yt+Dt],[jt+St,Yt+Dt]]}return"M"+br.join("L")+"L"+dr.reverse().join("L")+"Z"}function be(){lt=null,vt=null,mt=$.pathSubplot(),Et=!1;var Ft=K._fullLayout[$.id];et=m(Ft.bgcolor).getLuminance(),Ue=s.makeZoombox(ae,et,oe,de,mt),Ue.attr("fill-rule","evenodd"),Be=s.makeCorners(ae,oe,de),x(K)}function Re(Ft,tr){return tr=Math.max(Math.min(tr,ne),ce),Ftfe?(Ft-1&&Ft===1&&h(tr,K,[$.xaxis],[$.yaxis],$.id,Ve),lr.indexOf("event")>-1&&g.click(K,tr,$.id)}Ve.prepFn=function(Ft,tr,lr){var Or=K._fullLayout.dragmode,xt=Pe.getBoundingClientRect();K._fullLayout._calcInverseTransform(K);var jt=K._fullLayout._invTransform;_e=K._fullLayout._invScaleX,Ye=K._fullLayout._invScaleY;var Yt=y.apply3DTransform(jt)(tr-xt.left,lr-xt.top);if(Ze=Yt[0],Ke=Yt[1],Fe){var br=S.findPolygonOffset(ne,Te[0],Te[1],Fe);Ze+=we+br[0],Ke+=Se+br[1]}switch(Or){case"zoom":Ve.clickFn=Gt,Z||(Fe?Ve.moveFn=bt:Ve.moveFn=st,Ve.doneFn=Lt,be());break;case"select":case"lasso":v(Ft,tr,lr,Ve,Or);break}},b.init(Ve)},W.updateRadialDrag=function(he,$,Z){var K=this,Q=K.gd,ae=K.layers,fe=K.radius,te=K.innerRadius,ne=K.cx,ce=K.cy,oe=K.radialAxis,de=M.radialDragBoxSize,we=de/2;if(!oe.visible)return;var Se=U(K.radialAxisAngle),Te=oe._rl,Fe=Te[0],Ie=Te[1],Me=Te[Z],Ae=.75*(Te[1]-Te[0])/(1-K.getHole($))/fe,De,ke,We;Z?(De=ne+(fe+we)*Math.cos(Se),ke=ce-(fe+we)*Math.sin(Se),We="radialdrag"):(De=ne+(te-we)*Math.cos(Se),ke=ce-(te-we)*Math.sin(Se),We="radialdrag-inner");var _e=s.makeRectDragger(ae,We,"crosshair",-we,-we,de,de),Ye={element:_e,gd:Q};he.dragmode===!1&&(Ye.dragmode=!1),le(i.select(_e),oe.visible&&te0!=(Z?Ze>Fe:Ze=90||Q>90&&ae>=450?Se=1:te<=0&&ce<=0?Se=0:Se=Math.max(te,ce),Q<=180&&ae>=180||Q>180&&ae>=540?oe=-1:fe>=0&&ne>=0?oe=0:oe=Math.min(fe,ne),Q<=270&&ae>=270||Q>270&&ae>=630?de=-1:te>=0&&ce>=0?de=0:de=Math.min(te,ce),ae>=360?we=1:fe<=0&&ne<=0?we=0:we=Math.max(fe,ne),[oe,de,we,Se]}function ie(he,$){var Z=function(Q){return y.angleDist(he,Q)},K=y.findIndexOfMin($,Z);return $[K]}function le(he,$,Z){return $?(he.attr("display",null),he.attr(Z)):he&&he.attr("display","none"),he}},12101:function(R,F,e){var i=e(71828),m=e(21994),t=i.deg2rad,y=i.rad2deg;R.exports=function(u,a,o){switch(m(u,o),u._id){case"x":case"radialaxis":p(u,a);break;case"angularaxis":r(u,a);break}};function p(n,u){var a=u._subplot;n.setGeometry=function(){var o=n._rl[0],c=n._rl[1],s=a.innerRadius,b=(a.radius-s)/(c-o),g=s/b,A=o>c?function(v){return v<=0}:function(v){return v>=0};n.c2g=function(v){var h=n.c2l(v)-o;return(A(h)?h:0)+g},n.g2c=function(v){return n.l2c(v+o-g)},n.g2p=function(v){return v*b},n.c2p=function(v){return n.g2p(n.c2g(v))}}}function l(n,u){return u==="degrees"?t(n):n}function d(n,u){return u==="degrees"?y(n):n}function r(n,u){var a=n.type;if(a==="linear"){var o=n.d2c,c=n.c2d;n.d2c=function(s,b){return l(o(s),b)},n.c2d=function(s,b){return c(d(s,b))}}n.makeCalcdata=function(s,b){var g=s[b],A=s._length,v,h,x=function(M){return n.d2c(M,s.thetaunit)};if(g){if(i.isTypedArray(g)&&a==="linear"){if(A===g.length)return g;if(g.subarray)return g.subarray(0,A)}for(v=new Array(A),h=0;h0?1:0}function e(p){var l=p[0],d=p[1];if(!isFinite(l)||!isFinite(d))return[1,0];var r=(l+1)*(l+1)+d*d;return[(l*l+d*d-1)/r,2*d/r]}function i(p,l){var d=l[0],r=l[1];return[d*p.radius+p.cx,-r*p.radius+p.cy]}function m(p,l){return l*p.radius}function t(p,l,d,r){var n=i(p,e([d,l])),u=n[0],a=n[1],o=i(p,e([r,l])),c=o[0],s=o[1];if(l===0)return["M"+u+","+a,"L"+c+","+s].join(" ");var b=m(p,1/Math.abs(l));return["M"+u+","+a,"A"+b+","+b+" 0 0,"+(l<0?1:0)+" "+c+","+s].join(" ")}function y(p,l,d,r){var n=m(p,1/(l+1)),u=i(p,e([l,d])),a=u[0],o=u[1],c=i(p,e([l,r])),s=c[0],b=c[1];if(F(d)!==F(r)){var g=i(p,e([l,0])),A=g[0],v=g[1];return["M"+a+","+o,"A"+n+","+n+" 0 0,"+(00){for(var l=[],d=0;d=h&&(w.min=0,M.min=0,S.min=0,s.aaxis&&delete s.aaxis.min,s.baxis&&delete s.baxis.min,s.caxis&&delete s.caxis.min)}function c(s,b,g,A){var v=u[b._name];function h(f,P){return t.coerce(s,b,v,f,P)}h("uirevision",A.uirevision),b.type="linear";var x=h("color"),C=x!==v.color.dflt?x:g.font.color,D=b._name,L=D.charAt(0).toUpperCase(),w="Component "+L,M=h("title.text",w);b._hovertitle=M===w?M:L,t.coerceFont(h,"title.font",{family:g.font.family,size:t.bigFont(g.font.size),color:C}),h("min"),r(s,b,h,"linear"),l(s,b,h,"linear"),p(s,b,h,"linear"),d(s,b,h,{outerTicks:!0});var S=h("showticklabels");S&&(t.coerceFont(h,"tickfont",{family:g.font.family,size:g.font.size,color:C}),h("tickangle"),h("tickformat")),n(s,b,h,{dfltColor:x,bgColor:g.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:v}),h("hoverformat"),h("layer")}},64380:function(R,F,e){var i=e(39898),m=e(84267),t=e(73972),y=e(71828),p=y.strTranslate,l=y._,d=e(7901),r=e(91424),n=e(21994),u=e(1426).extendFlat,a=e(74875),o=e(89298),c=e(28569),s=e(30211),b=e(64505),g=b.freeMode,A=b.rectMode,v=e(92998),h=e(47322).prepSelect,x=e(47322).selectOnClick,C=e(47322).clearOutline,D=e(47322).clearSelectionsCache,L=e(85555);function w(H,B){this.id=H.id,this.graphDiv=H.graphDiv,this.init(B),this.makeFramework(B),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}R.exports=w;var M=w.prototype;M.init=function(H){this.container=H._ternarylayer,this.defs=H._defs,this.layoutId=H._uid,this.traceHash={},this.layers={}},M.plot=function(H,B){var W=this,q=B[W.id],re=B._size;W._hasClipOnAxisFalse=!1;for(var ie=0;ieS*Z?(oe=Z,ce=oe*S):(ce=$,oe=ce/S),de=le*ce/$,we=he*oe/Z,te=B.l+B.w*re-ce/2,ne=B.t+B.h*(1-ie)-oe/2,W.x0=te,W.y0=ne,W.w=ce,W.h=oe,W.sum=K,W.xaxis={type:"linear",range:[Q+2*fe-K,K-Q-2*ae],domain:[re-de/2,re+de/2],_id:"x"},n(W.xaxis,W.graphDiv._fullLayout),W.xaxis.setScale(),W.xaxis.isPtWithinRange=function(Ye){return Ye.a>=W.aaxis.range[0]&&Ye.a<=W.aaxis.range[1]&&Ye.b>=W.baxis.range[1]&&Ye.b<=W.baxis.range[0]&&Ye.c>=W.caxis.range[1]&&Ye.c<=W.caxis.range[0]},W.yaxis={type:"linear",range:[Q,K-ae-fe],domain:[ie-we/2,ie+we/2],_id:"y"},n(W.yaxis,W.graphDiv._fullLayout),W.yaxis.setScale(),W.yaxis.isPtWithinRange=function(){return!0};var Se=W.yaxis.domain[0],Te=W.aaxis=u({},H.aaxis,{range:[Q,K-ae-fe],side:"left",tickangle:(+H.aaxis.tickangle||0)-30,domain:[Se,Se+we*S],anchor:"free",position:0,_id:"y",_length:ce});n(Te,W.graphDiv._fullLayout),Te.setScale();var Fe=W.baxis=u({},H.baxis,{range:[K-Q-fe,ae],side:"bottom",domain:W.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ce});n(Fe,W.graphDiv._fullLayout),Fe.setScale();var Ie=W.caxis=u({},H.caxis,{range:[K-Q-ae,fe],side:"right",tickangle:(+H.caxis.tickangle||0)+30,domain:[Se,Se+we*S],anchor:"free",position:0,_id:"y",_length:ce});n(Ie,W.graphDiv._fullLayout),Ie.setScale();var Me="M"+te+","+(ne+oe)+"h"+ce+"l-"+ce/2+",-"+oe+"Z";W.clipDef.select("path").attr("d",Me),W.layers.plotbg.select("path").attr("d",Me);var Ae="M0,"+oe+"h"+ce+"l-"+ce/2+",-"+oe+"Z";W.clipDefRelative.select("path").attr("d",Ae);var De=p(te,ne);W.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",De),W.clipDefRelative.select("path").attr("transform",null);var ke=p(te-Fe._offset,ne+oe);W.layers.baxis.attr("transform",ke),W.layers.bgrid.attr("transform",ke);var We=p(te+ce/2,ne)+"rotate(30)"+p(0,-Te._offset);W.layers.aaxis.attr("transform",We),W.layers.agrid.attr("transform",We);var _e=p(te+ce/2,ne)+"rotate(-30)"+p(0,-Ie._offset);W.layers.caxis.attr("transform",_e),W.layers.cgrid.attr("transform",_e),W.drawAxes(!0),W.layers.aline.select("path").attr("d",Te.showline?"M"+te+","+(ne+oe)+"l"+ce/2+",-"+oe:"M0,0").call(d.stroke,Te.linecolor||"#000").style("stroke-width",(Te.linewidth||0)+"px"),W.layers.bline.select("path").attr("d",Fe.showline?"M"+te+","+(ne+oe)+"h"+ce:"M0,0").call(d.stroke,Fe.linecolor||"#000").style("stroke-width",(Fe.linewidth||0)+"px"),W.layers.cline.select("path").attr("d",Ie.showline?"M"+(te+ce/2)+","+ne+"l"+ce/2+","+oe:"M0,0").call(d.stroke,Ie.linecolor||"#000").style("stroke-width",(Ie.linewidth||0)+"px"),W.graphDiv._context.staticPlot||W.initInteractions(),r.setClipUrl(W.layers.frontplot,W._hasClipOnAxisFalse?null:W.clipId,W.graphDiv)},M.drawAxes=function(H){var B=this,W=B.graphDiv,q=B.id.substr(7)+"title",re=B.layers,ie=B.aaxis,le=B.baxis,he=B.caxis;if(B.drawAx(ie),B.drawAx(le),B.drawAx(he),H){var $=Math.max(ie.showticklabels?ie.tickfont.size/2:0,(he.showticklabels?he.tickfont.size*.75:0)+(he.ticks==="outside"?he.ticklen*.87:0)),Z=(le.showticklabels?le.tickfont.size:0)+(le.ticks==="outside"?le.ticklen:0)+3;re["a-title"]=v.draw(W,"a"+q,{propContainer:ie,propName:B.id+".aaxis.title",placeholder:l(W,"Click to enter Component A title"),attributes:{x:B.x0+B.w/2,y:B.y0-ie.title.font.size/3-$,"text-anchor":"middle"}}),re["b-title"]=v.draw(W,"b"+q,{propContainer:le,propName:B.id+".baxis.title",placeholder:l(W,"Click to enter Component B title"),attributes:{x:B.x0-Z,y:B.y0+B.h+le.title.font.size*.83+Z,"text-anchor":"middle"}}),re["c-title"]=v.draw(W,"c"+q,{propContainer:he,propName:B.id+".caxis.title",placeholder:l(W,"Click to enter Component C title"),attributes:{x:B.x0+B.w+Z,y:B.y0+B.h+he.title.font.size*.83+Z,"text-anchor":"middle"}})}},M.drawAx=function(H){var B=this,W=B.graphDiv,q=H._name,re=q.charAt(0),ie=H._id,le=B.layers[q],he=30,$=re+"tickLayout",Z=f(H);B[$]!==Z&&(le.selectAll("."+ie+"tick").remove(),B[$]=Z),H.setScale();var K=o.calcTicks(H),Q=o.clipEnds(H,K),ae=o.makeTransTickFn(H),fe=o.getTickSigns(H)[2],te=y.deg2rad(he),ne=fe*(H.linewidth||1)/2,ce=fe*H.ticklen,oe=B.w,de=B.h,we=re==="b"?"M0,"+ne+"l"+Math.sin(te)*ce+","+Math.cos(te)*ce:"M"+ne+",0l"+Math.cos(te)*ce+","+-Math.sin(te)*ce,Se={a:"M0,0l"+de+",-"+oe/2,b:"M0,0l-"+oe/2+",-"+de,c:"M0,0l-"+de+","+oe/2}[re];o.drawTicks(W,H,{vals:H.ticks==="inside"?Q:K,layer:le,path:we,transFn:ae,crisp:!1}),o.drawGrid(W,H,{vals:Q,layer:B.layers[re+"grid"],path:Se,transFn:ae,crisp:!1}),o.drawLabels(W,H,{vals:K,layer:le,transFn:ae,labelFns:o.makeLabelFns(H,0,he)})};function f(H){return H.ticks+String(H.ticklen)+String(H.showticklabels)}var P=L.MINZOOM/2+.87,E="m-0.87,.5h"+P+"v3h-"+(P+5.2)+"l"+(P/2+2.6)+",-"+(P*.87+4.5)+"l2.6,1.5l-"+P/2+","+P*.87+"Z",k="m0.87,.5h-"+P+"v3h"+(P+5.2)+"l-"+(P/2+2.6)+",-"+(P*.87+4.5)+"l-2.6,1.5l"+P/2+","+P*.87+"Z",O="m0,1l"+P/2+","+P*.87+"l2.6,-1.5l-"+(P/2+2.6)+",-"+(P*.87+4.5)+"l-"+(P/2+2.6)+","+(P*.87+4.5)+"l2.6,1.5l"+P/2+",-"+P*.87+"Z",G="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",z=!0;M.clearOutline=function(){D(this.dragOptions),C(this.dragOptions.gd)},M.initInteractions=function(){var H=this,B=H.layers.plotbg.select("path").node(),W=H.graphDiv,q=W._fullLayout._zoomlayer,re,ie;this.dragOptions={element:B,gd:W,plotinfo:{id:H.id,domain:W._fullLayout[H.id].domain,xaxis:H.xaxis,yaxis:H.yaxis},subplot:H.id,prepFn:function(ke,We,_e){H.dragOptions.xaxes=[H.xaxis],H.dragOptions.yaxes=[H.yaxis],re=W._fullLayout._invScaleX,ie=W._fullLayout._invScaleY;var Ye=H.dragOptions.dragmode=W._fullLayout.dragmode;g(Ye)?H.dragOptions.minDrag=1:H.dragOptions.minDrag=void 0,Ye==="zoom"?(H.dragOptions.moveFn=Fe,H.dragOptions.clickFn=oe,H.dragOptions.doneFn=Ie,de(ke,We,_e)):Ye==="pan"?(H.dragOptions.moveFn=Ae,H.dragOptions.clickFn=oe,H.dragOptions.doneFn=De,Me(),H.clearOutline(W)):(A(Ye)||g(Ye))&&h(ke,We,_e,H.dragOptions,Ye)}};var le,he,$,Z,K,Q,ae,fe,te,ne;function ce(ke){var We={};return We[H.id+".aaxis.min"]=ke.a,We[H.id+".baxis.min"]=ke.b,We[H.id+".caxis.min"]=ke.c,We}function oe(ke,We){var _e=W._fullLayout.clickmode;U(W),ke===2&&(W.emit("plotly_doubleclick",null),t.call("_guiRelayout",W,ce({a:0,b:0,c:0}))),_e.indexOf("select")>-1&&ke===1&&x(We,W,[H.xaxis],[H.yaxis],H.id,H.dragOptions),_e.indexOf("event")>-1&&s.click(W,We,H.id)}function de(ke,We,_e){var Ye=B.getBoundingClientRect();le=We-Ye.left,he=_e-Ye.top,W._fullLayout._calcInverseTransform(W);var Pe=W._fullLayout._invTransform,Ve=y.apply3DTransform(Pe)(le,he);le=Ve[0],he=Ve[1],$={a:H.aaxis.range[0],b:H.baxis.range[1],c:H.caxis.range[1]},K=$,Z=H.aaxis.range[1]-$.a,Q=m(H.graphDiv._fullLayout[H.id].bgcolor).getLuminance(),ae="M0,"+H.h+"L"+H.w/2+", 0L"+H.w+","+H.h+"Z",fe=!1,te=q.append("path").attr("class","zoombox").attr("transform",p(H.x0,H.y0)).style({fill:Q>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",ae),ne=q.append("path").attr("class","zoombox-corners").attr("transform",p(H.x0,H.y0)).style({fill:d.background,stroke:d.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),H.clearOutline(W)}function we(ke,We){return 1-We/H.h}function Se(ke,We){return 1-(ke+(H.h-We)/Math.sqrt(3))/H.w}function Te(ke,We){return(ke-(H.h-We)/Math.sqrt(3))/H.w}function Fe(ke,We){var _e=le+ke*re,Ye=he+We*ie,Pe=Math.max(0,Math.min(1,we(le,he),we(_e,Ye))),Ve=Math.max(0,Math.min(1,Se(le,he),Se(_e,Ye))),Ze=Math.max(0,Math.min(1,Te(le,he),Te(_e,Ye))),Ke=(Pe/2+Ze)*H.w,lt=(1-Pe/2-Ve)*H.w,vt=(Ke+lt)/2,mt=lt-Ke,Et=(1-Pe)*H.h,et=Et-mt/S;mt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ne.transition().style("opacity",1).duration(200),fe=!0),W.emit("plotly_relayouting",ce(K))}function Ie(){U(W),K!==$&&(t.call("_guiRelayout",W,ce(K)),z&&W.data&&W._context.showTips&&(y.notifier(l(W,"Double-click to zoom back out"),"long"),z=!1))}function Me(){$={a:H.aaxis.range[0],b:H.baxis.range[1],c:H.caxis.range[1]},K=$}function Ae(ke,We){var _e=ke/H.xaxis._m,Ye=We/H.yaxis._m;K={a:$.a-Ye,b:$.b+(_e+Ye)/2,c:$.c-(_e-Ye)/2};var Pe=[K.a,K.b,K.c].sort(y.sorterAsc),Ve={a:Pe.indexOf(K.a),b:Pe.indexOf(K.b),c:Pe.indexOf(K.c)};Pe[0]<0&&(Pe[1]+Pe[0]/2<0?(Pe[2]+=Pe[0]+Pe[1],Pe[0]=Pe[1]=0):(Pe[2]+=Pe[0]/2,Pe[1]+=Pe[0]/2,Pe[0]=0),K={a:Pe[Ve.a],b:Pe[Ve.b],c:Pe[Ve.c]},We=($.a-K.a)*H.yaxis._m,ke=($.c-K.c-$.b+K.b)*H.xaxis._m);var Ze=p(H.x0+ke,H.y0+We);H.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Ze);var Ke=p(-ke,-We);H.clipDefRelative.select("path").attr("transform",Ke),H.aaxis.range=[K.a,H.sum-K.b-K.c],H.baxis.range=[H.sum-K.a-K.c,K.b],H.caxis.range=[H.sum-K.a-K.b,K.c],H.drawAxes(!1),H._hasClipOnAxisFalse&&H.plotContainer.select(".scatterlayer").selectAll(".trace").call(r.hideOutsideRangePoints,H),W.emit("plotly_relayouting",ce(K))}function De(){t.call("_guiRelayout",W,ce(K))}B.onmousemove=function(ke){s.hover(W,ke,H.id),W._fullLayout._lasthover=B,W._fullLayout._hoversubplot=H.id},B.onmouseout=function(ke){W._dragging||c.unhover(W,ke)},c.init(this.dragOptions)};function U(H){i.select(H).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}},73972:function(R,F,e){var i=e(47769),m=e(64213),t=e(75138),y=e(41965),p=e(24401).addStyleRule,l=e(1426),d=e(9012),r=e(10820),n=l.extendFlat,u=l.extendDeepAll;F.modules={},F.allCategories={},F.allTypes=[],F.subplotsRegistry={},F.transformsRegistry={},F.componentsRegistry={},F.layoutArrayContainers=[],F.layoutArrayRegexes=[],F.traceLayoutAttributes={},F.localeRegistry={},F.apiMethodRegistry={},F.collectableSubplotTypes=null,F.register=function(D){if(F.collectableSubplotTypes=null,D)D&&!Array.isArray(D)&&(D=[D]);else throw new Error("No argument passed to Plotly.register.");for(var L=0;L-1}R.exports=function(r,n){var u,a=r.data,o=r.layout,c=y([],a),s=y({},o,p(n.tileClass)),b=r._context||{};if(n.width&&(s.width=n.width),n.height&&(s.height=n.height),n.tileClass==="thumbnail"||n.tileClass==="themes__thumb"){s.annotations=[];var g=Object.keys(s);for(u=0;u")!==-1?"":o.html(s).text()});return o.remove(),c}function u(a){return a.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}R.exports=function(o,c,s){var b=o._fullLayout,g=b._paper,A=b._toppaper,v=b.width,h=b.height,x;g.insert("rect",":first-child").call(t.setRect,0,0,v,h).call(y.fill,b.paper_bgcolor);var C=b._basePlotModules||[];for(x=0;xU+G||!i(z))}for(var B=0;Br;if(!n)return p}return l!==void 0?l:y.dflt},F.coerceColor=function(y,p,l){return m(p).isValid()?p:l!==void 0?l:y.dflt},F.coerceEnumerated=function(y,p,l){return y.coerceNumber&&(p=+p),y.values.indexOf(p)!==-1?p:l!==void 0?l:y.dflt},F.getValue=function(y,p){var l;return Array.isArray(y)?p0?we+=Se:w<0&&(we-=Se)}return we}function he(de){var we=w,Se=de.b,Te=le(de);return i.inbox(Se-we,Te-we,C+(Te-we)/(Te-Se)-1)}function $(de){var we=w,Se=de.b,Te=le(de);return i.inbox(Se-we,Te-we,D+(Te-we)/(Te-Se)-1)}var Z=a[M+"a"],K=a[S+"a"];E=Math.abs(Z.r2c(Z.range[1])-Z.r2c(Z.range[0]));function Q(de){return(f(de)+P(de))/2}var ae=i.getDistanceFunction(s,f,P,Q);if(i.getClosest(g,ae,a),a.index!==!1&&g[a.index].p!==d){O||(B=function(de){return Math.min(G(de),de.p-v.bargroupwidth/2)},W=function(de){return Math.max(z(de),de.p+v.bargroupwidth/2)});var fe=a.index,te=g[fe],ne=A.base?te.b+te.s:te.s;a[S+"0"]=a[S+"1"]=K.c2p(te[S],!0),a[S+"LabelVal"]=ne;var ce=v.extents[v.extents.round(te.p)];a[M+"0"]=Z.c2p(h?B(te):ce[0],!0),a[M+"1"]=Z.c2p(h?W(te):ce[1],!0);var oe=te.orig_p!==void 0;return a[M+"LabelVal"]=oe?te.orig_p:te.p,a.labelLabel=l(Z,a[M+"LabelVal"],A[M+"hoverformat"]),a.valueLabel=l(K,a[S+"LabelVal"],A[S+"hoverformat"]),a.baseLabel=l(K,te.b,A[S+"hoverformat"]),a.spikeDistance=($(te)+ie(te))/2,a[M+"Spike"]=Z.c2p(te.p,!0),y(te,A,a),a.hovertemplate=A.hovertemplate,a}}function u(a,o){var c=o.mcc||a.marker.color,s=o.mlcc||a.marker.line.color,b=p(a,o);if(t.opacity(c))return c;if(t.opacity(s)&&b)return s}R.exports={hoverPoints:r,hoverOnBars:n,getTraceColor:u}},60822:function(R,F,e){R.exports={attributes:e(1486),layoutAttributes:e(43641),supplyDefaults:e(90769).supplyDefaults,crossTraceDefaults:e(90769).crossTraceDefaults,supplyLayoutDefaults:e(13957),calc:e(92290),crossTraceCalc:e(11661).crossTraceCalc,colorbar:e(4898),arraysToCalcdata:e(75341),plot:e(17295).plot,style:e(16688).style,styleOnSelect:e(16688).styleOnSelect,hoverPoints:e(95423).hoverPoints,eventData:e(58065),selectPoints:e(81974),moduleType:"trace",name:"bar",basePlotModule:e(93612),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},43641:function(R){R.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},13957:function(R,F,e){var i=e(73972),m=e(89298),t=e(71828),y=e(43641);R.exports=function(p,l,d){function r(v,h){return t.coerce(p,l,y,v,h)}for(var n=!1,u=!1,a=!1,o={},c=r("barmode"),s=0;s0}function S(B,W,q,re,ie,le){var he=W.xaxis,$=W.yaxis,Z=B._fullLayout,K=B._context.staticPlot;ie||(ie={mode:Z.barmode,norm:Z.barmode,gap:Z.bargap,groupgap:Z.bargroupgap},a("bar",Z));var Q=t.makeTraceGroups(re,q,"trace bars").each(function(ae){var fe=i.select(this),te=ae[0].trace,ne=te.type==="waterfall",ce=te.type==="funnel",oe=te.type==="bar",de=oe||ce,we=0;ne&&te.connector.visible&&te.connector.mode==="between"&&(we=te.connector.line.width/2);var Se=te.orientation==="h",Te=M(ie),Fe=t.ensureSingle(fe,"g","points"),Ie=C(te),Me=Fe.selectAll("g.point").data(t.identity,Ie);Me.enter().append("g").classed("point",!0),Me.exit().remove(),Me.each(function(De,ke){var We=i.select(this),_e=L(De,he,$,Se),Ye=_e[0][0],Pe=_e[0][1],Ve=_e[1][0],Ze=_e[1][1],Ke=(Se?Pe-Ye:Ze-Ve)===0;Ke&&de&&c.getLineWidth(te,De)&&(Ke=!1),Ke||(Ke=!m(Ye)||!m(Pe)||!m(Ve)||!m(Ze)),De.isBlank=Ke,Ke&&(Se?Pe=Ye:Ze=Ve),we&&!Ke&&(Se?(Ye-=D(Ye,Pe)*we,Pe+=D(Ye,Pe)*we):(Ve-=D(Ve,Ze)*we,Ze+=D(Ve,Ze)*we));var lt,vt;if(te.type==="waterfall"){if(!Ke){var mt=te[De.dir].marker;lt=mt.line.width,vt=mt.color}}else lt=c.getLineWidth(te,De),vt=De.mc||te.marker.color;function Et(qe){var Oe=i.round(lt/2%1,2);return ie.gap===0&&ie.groupgap===0?i.round(Math.round(qe)-Oe,2):qe}function et(qe,Oe,Ce){return Ce&&qe===Oe?qe:Math.abs(qe-Oe)>=2?Et(qe):qe>Oe?Math.ceil(qe):Math.floor(qe)}if(!B._context.staticPlot){var Ue=p.opacity(vt),Be=Ue<1||lt>.01?Et:et;Ye=Be(Ye,Pe,Se),Pe=Be(Pe,Ye,Se),Ve=Be(Ve,Ze,!Se),Ze=Be(Ze,Ve,!Se)}var rt=w(t.ensureSingle(We,"path"),Z,ie,le);if(rt.style("vector-effect",K?"none":"non-scaling-stroke").attr("d",isNaN((Pe-Ye)*(Ze-Ve))||Ke&&B._context.staticPlot?"M0,0Z":"M"+Ye+","+Ve+"V"+Ze+"H"+Pe+"V"+Ve+"Z").call(l.setClipUrl,W.layerClipId,B),!Z.uniformtext.mode&&Te){var ot=l.makePointStyleFns(te);l.singlePointStyle(De,rt,te,ot,B)}f(B,W,We,ae,ke,Ye,Pe,Ve,Ze,ie,le),W.layerClipId&&l.hideOutsideRangePoint(De,We.select("text"),he,$,te.xcalendar,te.ycalendar)});var Ae=te.cliponaxis===!1;l.setClipUrl(fe,Ae?null:W.layerClipId,B)});d.getComponentMethod("errorbars","plot")(B,Q,W,ie)}function f(B,W,q,re,ie,le,he,$,Z,K,Q){var ae=W.xaxis,fe=W.yaxis,te=B._fullLayout,ne;function ce(qe,Oe,Ce){var pe=t.ensureSingle(qe,"text").text(Oe).attr({class:"bartext bartext-"+ne,"text-anchor":"middle","data-notex":1}).call(l.font,Ce).call(y.convertToTspans,B);return pe}var oe=re[0].trace,de=oe.orientation==="h",we=G(te,re,ie,ae,fe);ne=z(oe,ie);var Se=K.mode==="stack"||K.mode==="relative",Te=re[ie],Fe=!Se||Te._outmost;if(!we||ne==="none"||(Te.isBlank||le===he||$===Z)&&(ne==="auto"||ne==="inside")){q.select("text").remove();return}var Ie=te.font,Me=o.getBarColor(re[ie],oe),Ae=o.getInsideTextFont(oe,ie,Ie,Me),De=o.getOutsideTextFont(oe,ie,Ie),ke=q.datum();de?ae.type==="log"&&ke.s0<=0&&(ae.range[0]0&&Ze>0,vt=Ve<=We&&Ze<=_e,mt=Ve<=_e&&Ze<=We,Et=de?We>=Ve*(_e/Ze):_e>=Ze*(We/Ve);lt&&(vt||mt||Et)?ne="inside":(ne="outside",Ye.remove(),Ye=null)}else ne="inside";if(!Ye){Ke=t.ensureUniformFontSize(B,ne==="outside"?De:Ae),Ye=ce(q,we,Ke);var et=Ye.attr("transform");if(Ye.attr("transform",""),Pe=l.bBox(Ye.node()),Ve=Pe.width,Ze=Pe.height,Ye.attr("transform",et),Ve<=0||Ze<=0){Ye.remove();return}}var Ue=oe.textangle,Be,rt;ne==="outside"?(rt=oe.constraintext==="both"||oe.constraintext==="outside",Be=O(le,he,$,Z,Pe,{isHorizontal:de,constrained:rt,angle:Ue})):(rt=oe.constraintext==="both"||oe.constraintext==="inside",Be=k(le,he,$,Z,Pe,{isHorizontal:de,constrained:rt,angle:Ue,anchor:oe.insidetextanchor})),Be.fontSize=Ke.size,u(oe.type==="histogram"?"bar":oe.type,Be,te),Te.transform=Be;var ot=w(Ye,te,K,Q);t.setTransormAndDisplay(ot,Be)}function P(B){return B==="auto"?0:B}function E(B,W){var q=Math.PI/180*W,re=Math.abs(Math.sin(q)),ie=Math.abs(Math.cos(q));return{x:B.width*ie+B.height*re,y:B.width*re+B.height*ie}}function k(B,W,q,re,ie,le){var he=!!le.isHorizontal,$=!!le.constrained,Z=le.angle||0,K=le.anchor||"end",Q=K==="end",ae=K==="start",fe=le.leftToRight||0,te=(fe+1)/2,ne=1-te,ce=ie.width,oe=ie.height,de=Math.abs(W-B),we=Math.abs(re-q),Se=de>2*h&&we>2*h?h:0;de-=2*Se,we-=2*Se;var Te=P(Z);Z==="auto"&&!(ce<=de&&oe<=we)&&(ce>de||oe>we)&&(!(ce>we||oe>de)||ce2*h?h:0:te=ae>2*h?h:0;var ne=1;$&&(ne=he?Math.min(1,fe/Q):Math.min(1,ae/K));var ce=P(Z),oe=E(ie,ce),de=(he?oe.x:oe.y)/2,we=(ie.left+ie.right)/2,Se=(ie.top+ie.bottom)/2,Te=(B+W)/2,Fe=(q+re)/2,Ie=0,Me=0,Ae=he?D(W,B):D(q,re);return he?(Te=W-Ae*te,Ie=Ae*de):(Fe=re+Ae*te,Me=-Ae*de),{textX:we,textY:Se,targetX:Te,targetY:Fe,anchorX:Ie,anchorY:Me,scale:ne,rotate:ce}}function G(B,W,q,re,ie){var le=W[0].trace,he=le.texttemplate,$;return he?$=U(B,W,q,re,ie):le.textinfo?$=H(W,q,re,ie):$=c.getValue(le.text,q),c.coerceString(g,$)}function z(B,W){var q=c.getValue(B.textposition,W);return c.coerceEnumerated(A,q)}function U(B,W,q,re,ie){var le=W[0].trace,he=t.castOption(le,q,"texttemplate");if(!he)return"";var $=le.type==="histogram",Z=le.type==="waterfall",K=le.type==="funnel",Q=le.orientation==="h",ae,fe,te,ne;Q?(ae="y",fe=ie,te="x",ne=re):(ae="x",fe=re,te="y",ne=ie);function ce(Ie){return r(fe,fe.c2l(Ie),!0).text}function oe(Ie){return r(ne,ne.c2l(Ie),!0).text}var de=W[q],we={};we.label=de.p,we.labelLabel=we[ae+"Label"]=ce(de.p);var Se=t.castOption(le,de.i,"text");(Se===0||Se)&&(we.text=Se),we.value=de.s,we.valueLabel=we[te+"Label"]=oe(de.s);var Te={};v(Te,le,de.i),($||Te.x===void 0)&&(Te.x=Q?we.value:we.label),($||Te.y===void 0)&&(Te.y=Q?we.label:we.value),($||Te.xLabel===void 0)&&(Te.xLabel=Q?we.valueLabel:we.labelLabel),($||Te.yLabel===void 0)&&(Te.yLabel=Q?we.labelLabel:we.valueLabel),Z&&(we.delta=+de.rawS||de.s,we.deltaLabel=oe(we.delta),we.final=de.v,we.finalLabel=oe(we.final),we.initial=we.final-we.delta,we.initialLabel=oe(we.initial)),K&&(we.value=de.s,we.valueLabel=oe(we.value),we.percentInitial=de.begR,we.percentInitialLabel=t.formatPercent(de.begR),we.percentPrevious=de.difR,we.percentPreviousLabel=t.formatPercent(de.difR),we.percentTotal=de.sumR,we.percenTotalLabel=t.formatPercent(de.sumR));var Fe=t.castOption(le,de.i,"customdata");return Fe&&(we.customdata=Fe),t.texttemplateString(he,we,B._d3locale,Te,we,le._meta||{})}function H(B,W,q,re){var ie=B[0].trace,le=ie.orientation==="h",he=ie.type==="waterfall",$=ie.type==="funnel";function Z(Fe){var Ie=le?re:q;return r(Ie,Fe,!0).text}function K(Fe){var Ie=le?q:re;return r(Ie,+Fe,!0).text}var Q=ie.textinfo,ae=B[W],fe=Q.split("+"),te=[],ne,ce=function(Fe){return fe.indexOf(Fe)!==-1};if(ce("label")&&te.push(Z(B[W].p)),ce("text")&&(ne=t.castOption(ie,ae.i,"text"),(ne===0||ne)&&te.push(ne)),he){var oe=+ae.rawS||ae.s,de=ae.v,we=de-oe;ce("initial")&&te.push(K(we)),ce("delta")&&te.push(K(oe)),ce("final")&&te.push(K(de))}if($){ce("value")&&te.push(K(ae.s));var Se=0;ce("percent initial")&&Se++,ce("percent previous")&&Se++,ce("percent total")&&Se++;var Te=Se>1;ce("percent initial")&&(ne=t.formatPercent(ae.begR),Te&&(ne+=" of initial"),te.push(ne)),ce("percent previous")&&(ne=t.formatPercent(ae.difR),Te&&(ne+=" of previous"),te.push(ne)),ce("percent total")&&(ne=t.formatPercent(ae.sumR),Te&&(ne+=" of total"),te.push(ne))}return te.join("
")}R.exports={plot:S,toMoveInsideBar:k}},81974:function(R){R.exports=function(i,m){var t=i.cd,y=i.xaxis,p=i.yaxis,l=t[0].trace,d=l.type==="funnel",r=l.orientation==="h",n=[],u;if(m===!1)for(u=0;u1||f.bargap===0&&f.bargroupgap===0&&!P[0].trace.marker.line.width)&&i.select(this).attr("shape-rendering","crispEdges")}),M.selectAll("g.points").each(function(P){var E=i.select(this),k=P[0].trace;c(E,k,w)}),p.getComponentMethod("errorbars","style")(M)}function c(w,M,S){t.pointStyle(w.selectAll("path"),M,S),s(w,M,S)}function s(w,M,S){w.selectAll("text").each(function(f){var P=i.select(this),E=y.ensureUniformFontSize(S,v(P,f,M,S));t.font(P,E)})}function b(w,M,S){var f=M[0].trace;f.selectedpoints?g(S,f,w):(c(S,f,w),p.getComponentMethod("errorbars","style")(S))}function g(w,M,S){t.selectedPointStyle(w.selectAll("path"),M),A(w.selectAll("text"),M,S)}function A(w,M,S){w.each(function(f){var P=i.select(this),E;if(f.selected){E=y.ensureUniformFontSize(S,v(P,f,M,S));var k=M.selected.textfont&&M.selected.textfont.color;k&&(E.color=k),t.font(P,E)}else t.selectedTextStyle(P,M)})}function v(w,M,S,f){var P=f._fullLayout.font,E=S.textfont;if(w.classed("bartext-inside")){var k=L(M,S);E=x(S,M.i,P,k)}else w.classed("bartext-outside")&&(E=C(S,M.i,P));return E}function h(w,M,S){return D(r,w.textfont,M,S)}function x(w,M,S,f){var P=h(w,M,S),E=w._input.textfont===void 0||w._input.textfont.color===void 0||Array.isArray(w.textfont.color)&&w.textfont.color[M]===void 0;return E&&(P={color:m.contrast(f),family:P.family,size:P.size}),D(n,w.insidetextfont,M,P)}function C(w,M,S){var f=h(w,M,S);return D(u,w.outsidetextfont,M,f)}function D(w,M,S,f){M=M||{};var P=a.getValue(M.family,S),E=a.getValue(M.size,S),k=a.getValue(M.color,S);return{family:a.coerceString(w.family,P,f.family),size:a.coerceNumber(w.size,E,f.size),color:a.coerceColor(w.color,k,f.color)}}function L(w,M){return M.type==="waterfall"?M[w.dir].marker.color:w.mcc||w.mc||M.marker.color}R.exports={style:o,styleTextPoints:s,styleOnSelect:b,getInsideTextFont:x,getOutsideTextFont:C,getBarColor:L,resizeText:l}},98340:function(R,F,e){var i=e(7901),m=e(52075).hasColorscale,t=e(1586),y=e(71828).coercePattern;R.exports=function(l,d,r,n,u){var a=r("marker.color",n),o=m(l,"marker");o&&t(l,d,u,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",i.defaultLine),m(l,"marker.line")&&t(l,d,u,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),y(r,"marker.pattern",a,o),r("selected.marker.color"),r("unselected.marker.color")}},72597:function(R,F,e){var i=e(39898),m=e(71828);function t(d,r,n){var u=d._fullLayout,a=u["_"+n+"Text_minsize"];if(a){var o=u.uniformtext.mode==="hide",c;switch(n){case"funnelarea":case"pie":case"sunburst":c="g.slice";break;case"treemap":case"icicle":c="g.slice, g.pathbar";break;default:c="g.points > g.point"}r.selectAll(c).each(function(s){var b=s.transform;if(b){b.scale=o&&b.hide?0:a/b.fontSize;var g=i.select(this).select("text");m.setTransormAndDisplay(g,b)}})}}function y(d,r,n){if(n.uniformtext.mode){var u=l(d),a=n.uniformtext.minsize,o=r.scale*r.fontSize;r.hide=os.range[1]&&(C+=Math.PI);var D=function(S){return A(x,C,[S.rp0,S.rp1],[S.thetag0,S.thetag1],g)?v+Math.min(1,Math.abs(S.thetag1-S.thetag0)/h)-1+(S.rp1-x)/(S.rp1-S.rp0)-1:1/0};if(i.getClosest(a,D,r),r.index!==!1){var L=r.index,w=a[L];r.x0=r.x1=w.ct[0],r.y0=r.y1=w.ct[1];var M=m.extendFlat({},w,{r:w.s,theta:w.p});return y(w,o,r),p(M,o,c,r),r.hovertemplate=o.hovertemplate,r.color=t(o,w),r.xLabelVal=r.yLabelVal=void 0,w.s<0&&(r.idealAlign="left"),[r]}}},23381:function(R,F,e){R.exports={moduleType:"trace",name:"barpolar",basePlotModule:e(23580),categories:["polar","bar","showLegend"],attributes:e(55023),layoutAttributes:e(40151),supplyDefaults:e(6135),supplyLayoutDefaults:e(19860),calc:e(74692).calc,crossTraceCalc:e(74692).crossTraceCalc,plot:e(60173),colorbar:e(4898),formatLabels:e(98608),style:e(16688).style,styleOnSelect:e(16688).styleOnSelect,hoverPoints:e(27379),selectPoints:e(81974),meta:{}}},40151:function(R){R.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},19860:function(R,F,e){var i=e(71828),m=e(40151);R.exports=function(t,y,p){var l={},d;function r(a,o){return i.coerce(t[d]||{},y[d],m,a,o)}for(var n=0;n0?(s=o,b=c):(s=c,b=o);var g=p.findEnclosingVertexAngles(s,d.vangles)[0],A=p.findEnclosingVertexAngles(b,d.vangles)[1],v=[g,(s+b)/2,A];return p.pathPolygonAnnulus(u,a,s,b,v,r,n)}:function(u,a,o,c){return t.pathAnnulus(u,a,o,c,r,n)}}},53522:function(R,F,e){var i=e(82196),m=e(1486),t=e(22399),y=e(12663).axisHoverFormat,p=e(5386).f,l=e(1426).extendFlat,d=i.marker,r=d.line;R.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:i.xperiod,yperiod:i.yperiod,xperiod0:i.xperiod0,yperiod0:i.yperiod0,xperiodalignment:i.xperiodalignment,yperiodalignment:i.yperiodalignment,xhoverformat:y("x"),yhoverformat:y("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:l({},d.symbol,{arrayOk:!1,editType:"plot"}),opacity:l({},d.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:l({},d.angle,{arrayOk:!1,editType:"calc"}),size:l({},d.size,{arrayOk:!1,editType:"calc"}),color:l({},d.color,{arrayOk:!1,editType:"style"}),line:{color:l({},r.color,{arrayOk:!1,dflt:t.defaultLine,editType:"style"}),width:l({},r.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:i.fillcolor,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},offsetgroup:m.offsetgroup,alignmentgroup:m.alignmentgroup,selected:{marker:i.selected.marker,editType:"style"},unselected:{marker:i.unselected.marker,editType:"style"},text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),hovertemplate:p({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},48518:function(R,F,e){var i=e(92770),m=e(89298),t=e(42973),y=e(71828),p=e(50606).BADNUM,l=y._;R.exports=function(C,D){var L=C._fullLayout,w=m.getFromId(C,D.xaxis||"x"),M=m.getFromId(C,D.yaxis||"y"),S=[],f=D.type==="violin"?"_numViolins":"_numBoxes",P,E,k,O,G,z,U;D.orientation==="h"?(k=w,O="x",G=M,z="y",U=!!D.yperiodalignment):(k=M,O="y",G=w,z="x",U=!!D.xperiodalignment);var H=d(D,z,G,L[f]),B=H[0],W=H[1],q=y.distinctVals(B,G),re=q.vals,ie=q.minDiff/2,le,he,$,Z,K,Q,ae=(D.boxpoints||D.points)==="all"?y.identity:function(et){return et.vle.uf};if(D._hasPreCompStats){var fe=D[O],te=function(et){return k.d2c((D[et]||[])[P])},ne=1/0,ce=-1/0;for(P=0;P=le.q1&&le.q3>=le.med){var de=te("lowerfence");le.lf=de!==p&&de<=le.q1?de:b(le,$,Z);var we=te("upperfence");le.uf=we!==p&&we>=le.q3?we:g(le,$,Z);var Se=te("mean");le.mean=Se!==p?Se:Z?y.mean($,Z):(le.q1+le.q3)/2;var Te=te("sd");le.sd=Se!==p&&Te>=0?Te:Z?y.stdev($,Z,le.mean):le.q3-le.q1,le.lo=A(le),le.uo=v(le);var Fe=te("notchspan");Fe=Fe!==p&&Fe>0?Fe:h(le,Z),le.ln=le.med-Fe,le.un=le.med+Fe;var Ie=le.lf,Me=le.uf;D.boxpoints&&$.length&&(Ie=Math.min(Ie,$[0]),Me=Math.max(Me,$[Z-1])),D.notched&&(Ie=Math.min(Ie,le.ln),Me=Math.max(Me,le.un)),le.min=Ie,le.max=Me}else{y.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+le.q1,"median = "+le.med,"q3 = "+le.q3].join(` +`));var Ae;le.med!==p?Ae=le.med:le.q1!==p?le.q3!==p?Ae=(le.q1+le.q3)/2:Ae=le.q1:le.q3!==p?Ae=le.q3:Ae=0,le.med=Ae,le.q1=le.q3=Ae,le.lf=le.uf=Ae,le.mean=le.sd=Ae,le.ln=le.un=Ae,le.min=le.max=Ae}ne=Math.min(ne,le.min),ce=Math.max(ce,le.max),le.pts2=he.filter(ae),S.push(le)}}D._extremes[k._id]=m.findExtremes(k,[ne,ce],{padded:!0})}else{var De=k.makeCalcdata(D,O),ke=r(re,ie),We=re.length,_e=n(We);for(P=0;P=0&&Ye0){if(le={},le.pos=le[z]=re[P],he=le.pts=_e[P].sort(c),$=le[O]=he.map(s),Z=$.length,le.min=$[0],le.max=$[Z-1],le.mean=y.mean($,Z),le.sd=y.stdev($,Z,le.mean),le.med=y.interp($,.5),Z%2&&(Ke||lt)){var vt,mt;Ke?(vt=$.slice(0,Z/2),mt=$.slice(Z/2+1)):lt&&(vt=$.slice(0,Z/2+1),mt=$.slice(Z/2)),le.q1=y.interp(vt,.5),le.q3=y.interp(mt,.5)}else le.q1=y.interp($,.25),le.q3=y.interp($,.75);le.lf=b(le,$,Z),le.uf=g(le,$,Z),le.lo=A(le),le.uo=v(le);var Et=h(le,Z);le.ln=le.med-Et,le.un=le.med+Et,Pe=Math.min(Pe,le.ln),Ve=Math.max(Ve,le.un),le.pts2=he.filter(ae),S.push(le)}D._extremes[k._id]=m.findExtremes(k,D.notched?De.concat([Pe,Ve]):De,{padded:!0})}return o(S,D),S.length>0?(S[0].t={num:L[f],dPos:ie,posLetter:z,valLetter:O,labels:{med:l(C,"median:"),min:l(C,"min:"),q1:l(C,"q1:"),q3:l(C,"q3:"),max:l(C,"max:"),mean:D.boxmean==="sd"?l(C,"mean \xB1 \u03C3:"):l(C,"mean:"),lf:l(C,"lower fence:"),uf:l(C,"upper fence:")}},L[f]++,S):[{t:{empty:!0}}]};function d(x,C,D,L){var w=C in x,M=C+"0"in x,S="d"+C in x;if(w||M&&S){var f=D.makeCalcdata(x,C),P=t(x,D,C,f).vals;return[P,f]}var E;M?E=x[C+"0"]:"name"in x&&(D.type==="category"||i(x.name)&&["linear","log"].indexOf(D.type)!==-1||y.isDateTime(x.name)&&D.type==="date")?E=x.name:E=L;for(var k=D.type==="multicategory"?D.r2c_just_indices(E):D.d2c(E,0,x[C+"calendar"]),O=x._length,G=new Array(O),z=0;z1,M=1-o[d+"gap"],S=1-o[d+"groupgap"];for(b=0;b0;if(k==="positive"?(le=O*(E?1:.5),Z=$,he=Z=z):k==="negative"?(le=Z=z,he=O*(E?1:.5),K=$):(le=he=O,Z=K=$),ce){var oe=f.pointpos,de=f.jitter,we=f.marker.size/2,Se=0;oe+de>=0&&(Se=$*(oe+de),Se>le?(ne=!0,fe=we,Q=Se):Se>Z&&(fe=we,Q=le)),Se<=le&&(Q=le);var Te=0;oe-de<=0&&(Te=-$*(oe-de),Te>he?(ne=!0,te=we,ae=Te):Te>K&&(te=we,ae=he)),Te<=he&&(ae=he)}else Q=le,ae=he;var Fe=new Array(A.length);for(g=0;g0?(k="v",M>0?O=Math.min(f,S):O=Math.min(S)):M>0?(k="h",O=Math.min(f)):O=0;if(!O){c.visible=!1;return}c._length=O;var B=s("orientation",k);c._hasPreCompStats?B==="v"&&M===0?(s("x0",0),s("dx",1)):B==="h"&&w===0&&(s("y0",0),s("dy",1)):B==="v"&&M===0?s("x0"):B==="h"&&w===0&&s("y0");var W=m.getComponentMethod("calendars","handleTraceDefaults");W(o,c,["x","y"],b)}function u(o,c,s,b){var g=b.prefix,A=i.coerce2(o,c,d,"marker.outliercolor"),v=s("marker.line.outliercolor"),h="outliers";c._hasPreCompStats?h="all":(A||v)&&(h="suspectedoutliers");var x=s(g+"points",h);x?(s("jitter",x==="all"?.3:0),s("pointpos",x==="all"?-1.5:0),s("marker.symbol"),s("marker.opacity"),s("marker.size"),s("marker.angle"),s("marker.color",c.line.color),s("marker.line.color"),s("marker.line.width"),x==="suspectedoutliers"&&(s("marker.line.outliercolor",c.marker.color),s("marker.line.outlierwidth")),s("selected.marker.color"),s("unselected.marker.color"),s("selected.marker.size"),s("unselected.marker.size"),s("text"),s("hovertext")):delete c.marker;var C=s("hoveron");(C==="all"||C.indexOf("points")!==-1)&&s("hovertemplate"),i.coerceSelectionMarkerOpacity(c,s)}function a(o,c){var s,b;function g(h){return i.coerce(b._input,b,d,h)}for(var A=0;AD.lo&&(B.so=!0)}return w});C.enter().append("path").classed("point",!0),C.exit().remove(),C.call(t.translatePoints,s,b)}function n(u,a,o,c){var s=a.val,b=a.pos,g=!!b.rangebreaks,A=c.bPos,v=c.bPosPxOffset||0,h=o.boxmean||(o.meanline||{}).visible,x,C;Array.isArray(c.bdPos)?(x=c.bdPos[0],C=c.bdPos[1]):(x=c.bdPos,C=c.bdPos);var D=u.selectAll("path.mean").data(o.type==="box"&&o.boxmean||o.type==="violin"&&o.box.visible&&o.meanline.visible?m.identity:[]);D.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),D.exit().remove(),D.each(function(L){var w=b.c2l(L.pos+A,!0),M=b.l2p(w-x)+v,S=b.l2p(w+C)+v,f=g?(M+S)/2:b.l2p(w)+v,P=s.c2p(L.mean,!0),E=s.c2p(L.mean-L.sd,!0),k=s.c2p(L.mean+L.sd,!0);o.orientation==="h"?i.select(this).attr("d","M"+P+","+M+"V"+S+(h==="sd"?"m0,0L"+E+","+f+"L"+P+","+M+"L"+k+","+f+"Z":"")):i.select(this).attr("d","M"+M+","+P+"H"+S+(h==="sd"?"m0,0L"+f+","+E+"L"+M+","+P+"L"+f+","+k+"Z":""))})}R.exports={plot:l,plotBoxAndWhiskers:d,plotPoints:r,plotBoxMean:n}},24626:function(R){R.exports=function(e,i){var m=e.cd,t=e.xaxis,y=e.yaxis,p=[],l,d;if(i===!1)for(l=0;l=10)return null;for(var p=1/0,l=-1/0,d=t.length,r=0;r0?Math.floor:Math.ceil,U=O>0?Math.ceil:Math.floor,H=O>0?Math.min:Math.max,B=O>0?Math.max:Math.min,W=z(E+G),q=U(k-G);o=P(E);var re=[[o]];for(l=W;l*O=0;y--)p[u-y]=e[a][y],l[u-y]=i[a][y];for(d.push({x:p,y:l,bicubic:r}),y=a,p=[],l=[];y>=0;y--)p[a-y]=e[y][0],l[a-y]=i[y][0];return d.push({x:p,y:l,bicubic:n}),d}},20347:function(R,F,e){var i=e(89298),m=e(1426).extendFlat;R.exports=function(y,p,l){var d,r,n,u,a,o,c,s,b,g,A,v,h,x,C=y["_"+p],D=y[p+"axis"],L=D._gridlines=[],w=D._minorgridlines=[],M=D._boundarylines=[],S=y["_"+l],f=y[l+"axis"];D.tickmode==="array"&&(D.tickvals=C.slice());var P=y._xctrl,E=y._yctrl,k=P[0].length,O=P.length,G=y._a.length,z=y._b.length;i.prepTicks(D),D.tickmode==="array"&&delete D.tickvals;var U=D.smoothing?3:1;function H(W){var q,re,ie,le,he,$,Z,K,Q,ae,fe,te,ne=[],ce=[],oe={};if(p==="b")for(re=y.b2j(W),ie=Math.floor(Math.max(0,Math.min(z-2,re))),le=re-ie,oe.length=z,oe.crossLength=G,oe.xy=function(de){return y.evalxy([],de,re)},oe.dxy=function(de,we){return y.dxydi([],de,ie,we,le)},q=0;q0&&(Q=y.dxydi([],q-1,ie,0,le),ne.push(he[0]+Q[0]/3),ce.push(he[1]+Q[1]/3),ae=y.dxydi([],q-1,ie,1,le),ne.push(K[0]-ae[0]/3),ce.push(K[1]-ae[1]/3)),ne.push(K[0]),ce.push(K[1]),he=K;else for(q=y.a2i(W),$=Math.floor(Math.max(0,Math.min(G-2,q))),Z=q-$,oe.length=G,oe.crossLength=z,oe.xy=function(de){return y.evalxy([],q,de)},oe.dxy=function(de,we){return y.dxydj([],$,de,Z,we)},re=0;re0&&(fe=y.dxydj([],$,re-1,Z,0),ne.push(he[0]+fe[0]/3),ce.push(he[1]+fe[1]/3),te=y.dxydj([],$,re-1,Z,1),ne.push(K[0]-te[0]/3),ce.push(K[1]-te[1]/3)),ne.push(K[0]),ce.push(K[1]),he=K;return oe.axisLetter=p,oe.axis=D,oe.crossAxis=f,oe.value=W,oe.constvar=l,oe.index=s,oe.x=ne,oe.y=ce,oe.smoothing=f.smoothing,oe}function B(W){var q,re,ie,le,he,$=[],Z=[],K={};if(K.length=C.length,K.crossLength=S.length,p==="b")for(ie=Math.max(0,Math.min(z-2,W)),he=Math.min(1,Math.max(0,W-ie)),K.xy=function(Q){return y.evalxy([],Q,W)},K.dxy=function(Q,ae){return y.dxydi([],Q,ie,ae,he)},q=0;qC.length-1)&&L.push(m(B(r),{color:D.gridcolor,width:D.gridwidth,dash:D.griddash}));for(s=o;sC.length-1)&&!(A<0||A>C.length-1))for(v=C[n],h=C[A],d=0;dC[C.length-1])&&w.push(m(H(g),{color:D.minorgridcolor,width:D.minorgridwidth,dash:D.minorgriddash})));D.startline&&M.push(m(B(0),{color:D.startlinecolor,width:D.startlinewidth})),D.endline&&M.push(m(B(C.length-1),{color:D.endlinecolor,width:D.endlinewidth}))}else{for(u=5e-15,a=[Math.floor((C[C.length-1]-D.tick0)/D.dtick*(1+u)),Math.ceil((C[0]-D.tick0)/D.dtick/(1+u))].sort(function(W,q){return W-q}),o=a[0],c=a[1],s=o;s<=c;s++)b=D.tick0+D.dtick*s,L.push(m(H(b),{color:D.gridcolor,width:D.gridwidth,dash:D.griddash}));for(s=o-1;sC[C.length-1])&&w.push(m(H(g),{color:D.minorgridcolor,width:D.minorgridwidth,dash:D.minorgriddash}));D.startline&&M.push(m(H(C[0]),{color:D.startlinecolor,width:D.startlinewidth})),D.endline&&M.push(m(H(C[C.length-1]),{color:D.endlinecolor,width:D.endlinewidth}))}}},83311:function(R,F,e){var i=e(89298),m=e(1426).extendFlat;R.exports=function(y,p){var l,d,r,n,u,a=p._labels=[],o=p._gridlines;for(l=0;ly.length&&(t=t.slice(0,y.length)):t=[],l=0;l90&&(c-=180,r=-r),{angle:c,flip:r,p:e.c2p(t,i,m),offsetMultplier:n}}},89740:function(R,F,e){var i=e(39898),m=e(91424),t=e(27669),y=e(67961),p=e(11651),l=e(63893),d=e(71828),r=d.strRotate,n=d.strTranslate,u=e(18783);R.exports=function(h,x,C,D){var L=h._context.staticPlot,w=x.xaxis,M=x.yaxis,S=h._fullLayout,f=S._clips;d.makeTraceGroups(D,C,"trace").each(function(P){var E=i.select(this),k=P[0],O=k.trace,G=O.aaxis,z=O.baxis,U=d.ensureSingle(E,"g","minorlayer"),H=d.ensureSingle(E,"g","majorlayer"),B=d.ensureSingle(E,"g","boundarylayer"),W=d.ensureSingle(E,"g","labellayer");E.style("opacity",O.opacity),o(w,M,H,G,"a",G._gridlines,!0),o(w,M,H,z,"b",z._gridlines,!0),o(w,M,U,G,"a",G._minorgridlines,!0),o(w,M,U,z,"b",z._minorgridlines,!0),o(w,M,B,G,"a-boundary",G._boundarylines,L),o(w,M,B,z,"b-boundary",z._boundarylines,L);var q=c(h,w,M,O,k,W,G._labels,"a-label"),re=c(h,w,M,O,k,W,z._labels,"b-label");s(h,W,O,k,w,M,q,re),a(O,k,f,w,M)})};function a(v,h,x,C,D){var L,w,M,S,f=x.select("#"+v._clipPathId);f.size()||(f=x.append("clipPath").classed("carpetclip",!0));var P=d.ensureSingle(f,"path","carpetboundary"),E=h.clipsegments,k=[];for(S=0;S0?"start":"end","data-notex":1}).call(m.font,E.font).text(E.text).call(l.convertToTspans,v),H=m.bBox(this);U.attr("transform",n(O.p[0],O.p[1])+r(O.angle)+n(E.axis.labelpadding*z,H.height*.3)),f=Math.max(f,H.width+E.axis.labelpadding)}),S.exit().remove(),P.maxExtent=f,P}function s(v,h,x,C,D,L,w,M){var S,f,P,E,k=d.aggNums(Math.min,null,x.a),O=d.aggNums(Math.max,null,x.a),G=d.aggNums(Math.min,null,x.b),z=d.aggNums(Math.max,null,x.b);S=.5*(k+O),f=G,P=x.ab2xy(S,f,!0),E=x.dxyda_rough(S,f),w.angle===void 0&&d.extendFlat(w,p(x,D,L,P,x.dxydb_rough(S,f))),A(v,h,x,C,P,E,x.aaxis,D,L,w,"a-title"),S=k,f=.5*(G+z),P=x.ab2xy(S,f,!0),E=x.dxydb_rough(S,f),M.angle===void 0&&d.extendFlat(M,p(x,D,L,P,x.dxyda_rough(S,f))),A(v,h,x,C,P,E,x.baxis,D,L,M,"b-title")}var b=u.LINE_SPACING,g=(1-u.MID_SHIFT)/b+1;function A(v,h,x,C,D,L,w,M,S,f,P){var E=[];w.title.text&&E.push(w.title.text);var k=h.selectAll("text."+P).data(E),O=f.maxExtent;k.enter().append("text").classed(P,!0),k.each(function(){var G=p(x,M,S,D,L);["start","both"].indexOf(w.showticklabels)===-1&&(O=0);var z=w.title.font.size;O+=z+w.title.offset;var U=f.angle+(f.flip<0?180:0),H=(U-G.angle+450)%360,B=H>90&&H<270,W=i.select(this);W.text(w.title.text).call(l.convertToTspans,v),B&&(O=(-l.lineCount(W)+g)*b*z-O),W.attr("transform",n(G.p[0],G.p[1])+r(G.angle)+n(0,O)).attr("text-anchor","middle").call(m.font,w.title.font)}),k.exit().remove()}},11435:function(R,F,e){var i=e(35509),m=e(65888).findBin,t=e(45664),y=e(20349),p=e(54495),l=e(73057);R.exports=function(r){var n=r._a,u=r._b,a=n.length,o=u.length,c=r.aaxis,s=r.baxis,b=n[0],g=n[a-1],A=u[0],v=u[o-1],h=n[n.length-1]-n[0],x=u[u.length-1]-u[0],C=h*i.RELATIVE_CULL_TOLERANCE,D=x*i.RELATIVE_CULL_TOLERANCE;b-=C,g+=C,A-=D,v+=D,r.isVisible=function(L,w){return L>b&&LA&&wg||wv},r.setScale=function(){var L=r._x,w=r._y,M=t(r._xctrl,r._yctrl,L,w,c.smoothing,s.smoothing);r._xctrl=M[0],r._yctrl=M[1],r.evalxy=y([r._xctrl,r._yctrl],a,o,c.smoothing,s.smoothing),r.dxydi=p([r._xctrl,r._yctrl],c.smoothing,s.smoothing),r.dxydj=l([r._xctrl,r._yctrl],c.smoothing,s.smoothing)},r.i2a=function(L){var w=Math.max(0,Math.floor(L[0]),a-2),M=L[0]-w;return(1-M)*n[w]+M*n[w+1]},r.j2b=function(L){var w=Math.max(0,Math.floor(L[1]),a-2),M=L[1]-w;return(1-M)*u[w]+M*u[w+1]},r.ij2ab=function(L){return[r.i2a(L[0]),r.j2b(L[1])]},r.a2i=function(L){var w=Math.max(0,Math.min(m(L,n),a-2)),M=n[w],S=n[w+1];return Math.max(0,Math.min(a-1,w+(L-M)/(S-M)))},r.b2j=function(L){var w=Math.max(0,Math.min(m(L,u),o-2)),M=u[w],S=u[w+1];return Math.max(0,Math.min(o-1,w+(L-M)/(S-M)))},r.ab2ij=function(L){return[r.a2i(L[0]),r.b2j(L[1])]},r.i2c=function(L,w){return r.evalxy([],L,w)},r.ab2xy=function(L,w,M){if(!M&&(Ln[a-1]|wu[o-1]))return[!1,!1];var S=r.a2i(L),f=r.b2j(w),P=r.evalxy([],S,f);if(M){var E=0,k=0,O=[],G,z,U,H;Ln[a-1]?(G=a-2,z=1,E=(L-n[a-1])/(n[a-1]-n[a-2])):(G=Math.max(0,Math.min(a-2,Math.floor(S))),z=S-G),wu[o-1]?(U=o-2,H=1,k=(w-u[o-1])/(u[o-1]-u[o-2])):(U=Math.max(0,Math.min(o-2,Math.floor(f))),H=f-U),E&&(r.dxydi(O,G,U,z,H),P[0]+=O[0]*E,P[1]+=O[1]*E),k&&(r.dxydj(O,G,U,z,H),P[0]+=O[0]*k,P[1]+=O[1]*k)}return P},r.c2p=function(L,w,M){return[w.c2p(L[0]),M.c2p(L[1])]},r.p2x=function(L,w,M){return[w.p2c(L[0]),M.p2c(L[1])]},r.dadi=function(L){var w=Math.max(0,Math.min(n.length-2,L));return n[w+1]-n[w]},r.dbdj=function(L){var w=Math.max(0,Math.min(u.length-2,L));return u[w+1]-u[w]},r.dxyda=function(L,w,M,S){var f=r.dxydi(null,L,w,M,S),P=r.dadi(L,M);return[f[0]/P,f[1]/P]},r.dxydb=function(L,w,M,S){var f=r.dxydj(null,L,w,M,S),P=r.dbdj(w,S);return[f[0]/P,f[1]/P]},r.dxyda_rough=function(L,w,M){var S=h*(M||.1),f=r.ab2xy(L+S,w,!0),P=r.ab2xy(L-S,w,!0);return[(f[0]-P[0])*.5/S,(f[1]-P[1])*.5/S]},r.dxydb_rough=function(L,w,M){var S=x*(M||.1),f=r.ab2xy(L,w+S,!0),P=r.ab2xy(L,w-S,!0);return[(f[0]-P[0])*.5/S,(f[1]-P[1])*.5/S]},r.dpdx=function(L){return L._m},r.dpdy=function(L){return L._m}}},72505:function(R,F,e){var i=e(71828);R.exports=function(t,y,p){var l,d,r,n=[],u=[],a=t[0].length,o=t.length;function c(re,ie){var le=0,he,$=0;return re>0&&(he=t[ie][re-1])!==void 0&&($++,le+=he),re0&&(he=t[ie-1][re])!==void 0&&($++,le+=he),ie0&&d0&&lS);return i.log("Smoother converged to",f,"after",E,"iterations"),t}},19237:function(R,F,e){var i=e(71828).isArray1D;R.exports=function(t,y,p){var l=p("x"),d=l&&l.length,r=p("y"),n=r&&r.length;if(!d&&!n)return!1;if(y._cheater=!l,(!d||i(l))&&(!n||i(r))){var u=d?l.length:1/0;n&&(u=Math.min(u,r.length)),y.a&&y.a.length&&(u=Math.min(u,y.a.length)),y.b&&y.b.length&&(u=Math.min(u,y.b.length)),y._length=u}else y._length=null;return!0}},69568:function(R,F,e){var i=e(5386).f,m=e(19316),t=e(50693),y=e(9012),p=e(22399).defaultLine,l=e(1426).extendFlat,d=m.marker.line;R.exports=l({locations:{valType:"data_array",editType:"calc"},locationmode:m.locationmode,z:{valType:"data_array",editType:"calc"},geojson:l({},m.geojson,{}),featureidkey:m.featureidkey,text:l({},m.text,{}),hovertext:l({},m.hovertext,{}),marker:{line:{color:l({},d.color,{dflt:p}),width:l({},d.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:m.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:m.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:l({},y.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:i(),showlegend:l({},y.showlegend,{dflt:!1})},t("",{cLetter:"z",editTypeOverride:"calc"}))},38675:function(R,F,e){var i=e(92770),m=e(50606).BADNUM,t=e(78803),y=e(75225),p=e(66279);function l(d){return d&&typeof d=="string"}R.exports=function(r,n){var u=n._length,a=new Array(u),o;n.geojson?o=function(A){return l(A)||i(A)}:o=l;for(var c=0;c")}}},51319:function(R,F,e){R.exports={attributes:e(69568),supplyDefaults:e(61869),colorbar:e(61243),calc:e(38675),calcGeoJSON:e(99841).calcGeoJSON,plot:e(99841).plot,style:e(99636).style,styleOnSelect:e(99636).styleOnSelect,hoverPoints:e(42300),eventData:e(92069),selectPoints:e(81253),moduleType:"trace",name:"choropleth",basePlotModule:e(44622),categories:["geo","noOpacity","showLegend"],meta:{}}},99841:function(R,F,e){var i=e(39898),m=e(71828),t=e(41327),y=e(90973).getTopojsonFeatures,p=e(71739).findExtremes,l=e(99636).style;function d(n,u,a){var o=u.layers.backplot.select(".choroplethlayer");m.makeTraceGroups(o,a,"trace choropleth").each(function(c){var s=i.select(this),b=s.selectAll("path.choroplethlocation").data(m.identity);b.enter().append("path").classed("choroplethlocation",!0),b.exit().remove(),l(n,c)})}function r(n,u){for(var a=n[0].trace,o=u[a.geo],c=o._subplot,s=a.locationmode,b=a._length,g=s==="geojson-id"?t.extractTraceFeature(n):y(a,c.topojson),A=[],v=[],h=0;h=0;y--){var p=t[y].id;if(typeof p=="string"&&p.indexOf("water")===0){for(var l=y+1;l=0;r--)l.removeLayer(d[r][1])},p.dispose=function(){var l=this.subplot.map;this._removeLayers(),l.removeSource(this.sourceId)},R.exports=function(d,r){var n=r[0].trace,u=new y(d,n.uid),a=u.sourceId,o=i(r),c=u.below=d.belowLookup["trace-"+n.uid];return d.map.addSource(a,{type:"geojson",data:o.geojson}),u._addLayers(o,c),r[0].trace._glTrace=u,u}},12674:function(R,F,e){var i=e(50693),m=e(12663).axisHoverFormat,t=e(5386).f,y=e(2418),p=e(9012),l=e(1426).extendFlat,d={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:t({editType:"calc"},{keys:["norm"]}),uhoverformat:m("u",1),vhoverformat:m("v",1),whoverformat:m("w",1),xhoverformat:m("x"),yhoverformat:m("y"),zhoverformat:m("z"),showlegend:l({},p.showlegend,{dflt:!1})};l(d,i("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(n){d[n]=y[n]}),d.hoverinfo=l({},p.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),d.transforms=void 0,R.exports=d},31371:function(R,F,e){var i=e(78803);R.exports=function(t,y){for(var p=y.u,l=y.v,d=y.w,r=Math.min(y.x.length,y.y.length,y.z.length,p.length,l.length,d.length),n=-1/0,u=1/0,a=0;ap.level||p.starts.length&&y===p.level)}break;case"constraint":if(i.prefixBoundary=!1,i.edgepaths.length)return;var l=i.x.length,d=i.y.length,r=-1/0,n=1/0;for(t=0;t":u>r&&(i.prefixBoundary=!0);break;case"<":(ur||i.starts.length&&o===n)&&(i.prefixBoundary=!0);break;case"][":a=Math.min(u[0],u[1]),o=Math.max(u[0],u[1]),ar&&(i.prefixBoundary=!0);break}break}}},90654:function(R,F,e){var i=e(21081),m=e(86068),t=e(53572);function y(p,l,d){var r=l.contours,n=l.line,u=r.size||1,a=r.coloring,o=m(l,{isColorbar:!0});if(a==="heatmap"){var c=i.extractOpts(l);d._fillgradient=c.reversescale?i.flipScale(c.colorscale):c.colorscale,d._zrange=[c.min,c.max]}else a==="fill"&&(d._fillcolor=o);d._line={color:a==="lines"?o:n.color,width:r.showlines!==!1?n.width:0,dash:n.dash},d._levels={start:r.start,end:t(r),size:u}}R.exports={min:"zmin",max:"zmax",calc:y}},36914:function(R){R.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},83179:function(R,F,e){var i=e(92770),m=e(14523),t=e(7901),y=t.addOpacity,p=t.opacity,l=e(74808),d=l.CONSTRAINT_REDUCTION,r=l.COMPARISON_OPS2;R.exports=function(a,o,c,s,b,g){var A=o.contours,v,h,x,C=c("contours.operation");if(A._operation=d[C],n(c,A),C==="="?v=A.showlines=!0:(v=c("contours.showlines"),x=c("fillcolor",y((a.line||{}).color||b,.5))),v){var D=x&&p(x)?y(o.fillcolor,1):b;h=c("line.color",D),c("line.width",2),c("line.dash")}c("line.smoothing"),m(c,s,h,g)};function n(u,a){var o;r.indexOf(a.operation)===-1?(u("contours.value",[0,1]),Array.isArray(a.value)?a.value.length>2?a.value=a.value.slice(2):a.length===0?a.value=[0,1]:a.length<2?(o=parseFloat(a.value[0]),a.value=[o,o+1]):a.value=[parseFloat(a.value[0]),parseFloat(a.value[1])]:i(a.value)&&(o=parseFloat(a.value),a.value=[o,o+1])):(u("contours.value",0),i(a.value)||(Array.isArray(a.value)?a.value=parseFloat(a.value[0]):a.value=0))}},64237:function(R,F,e){var i=e(74808),m=e(92770);R.exports={"[]":y("[]"),"][":y("]["),">":p(">"),"<":p("<"),"=":p("=")};function t(l,d){var r=Array.isArray(d),n;function u(a){return m(a)?+a:null}return i.COMPARISON_OPS2.indexOf(l)!==-1?n=u(r?d[0]:d):i.INTERVAL_OPS.indexOf(l)!==-1?n=r?[u(d[0]),u(d[1])]:[u(d),u(d)]:i.SET_OPS.indexOf(l)!==-1&&(n=r?d.map(u):[u(d)]),n}function y(l){return function(d){d=t(l,d);var r=Math.min(d[0],d[1]),n=Math.max(d[0],d[1]);return{start:r,end:n,size:n-r}}}function p(l){return function(d){return d=t(l,d),{start:d,end:1/0,size:1/0}}}},67217:function(R){R.exports=function(e,i,m,t){var y=t("contours.start"),p=t("contours.end"),l=y===!1||p===!1,d=m("contours.size"),r;l?r=i.autocontour=!0:r=m("autocontour",!1),(r||!d)&&m("ncontours")}},84857:function(R,F,e){var i=e(71828);R.exports=function(t,y){var p,l,d,r=function(a){return a.reverse()},n=function(a){return a};switch(y){case"=":case"<":return t;case">":for(t.length!==1&&i.warn("Contour data invalid for the specified inequality operation."),l=t[0],p=0;p1e3){i.warn("Too many contours, clipping at 1000",p);break}return u}},53572:function(R){R.exports=function(e){return e.end+e.size/1e6}},81696:function(R,F,e){var i=e(71828),m=e(36914);R.exports=function(n,u,a){var o,c,s,b,g;for(u=u||.01,a=a||.01,s=0;s20?(s=m.CHOOSESADDLE[s][(b[0]||b[1])<0?0:1],r.crossings[c]=m.SADDLEREMAINDER[s]):delete r.crossings[c],b=m.NEWDELTA[s],!b){i.log("Found bad marching index:",s,n,r.level);break}g.push(d(r,n,b)),n[0]+=b[0],n[1]+=b[1],c=n.join(","),t(g[g.length-1],g[g.length-2],a,o)&&g.pop();var D=b[0]&&(n[0]<0||n[0]>v-2)||b[1]&&(n[1]<0||n[1]>A-2),L=n[0]===h[0]&&n[1]===h[1]&&b[0]===x[0]&&b[1]===x[1];if(L||u&&D)break;s=r.crossings[c]}C===1e4&&i.log("Infinite loop in contour?");var w=t(g[0],g[g.length-1],a,o),M=0,S=.2*r.smoothing,f=[],P=0,E,k,O,G,z,U,H,B,W,q,re;for(C=1;C=P;C--)if(E=f[C],E=P&&E+f[k]B&&W--,r.edgepaths[W]=re.concat(g,q));break}$||(r.edgepaths[B]=g.concat(q))}for(B=0;B20&&n?r===208||r===1114?a=u[0]===0?1:-1:o=u[1]===0?1:-1:m.BOTTOMSTART.indexOf(r)!==-1?o=1:m.LEFTSTART.indexOf(r)!==-1?a=1:m.TOPSTART.indexOf(r)!==-1?o=-1:a=-1,[a,o]}function d(r,n,u){var a=n[0]+Math.max(u[0],0),o=n[1]+Math.max(u[1],0),c=r.z[o][a],s=r.xaxis,b=r.yaxis;if(u[1]){var g=(r.level-c)/(r.z[o][a+1]-c),A=(g!==1?(1-g)*s.c2l(r.x[a]):0)+(g!==0?g*s.c2l(r.x[a+1]):0);return[s.c2p(s.l2c(A),!0),b.c2p(r.y[o],!0),a+g,o]}else{var v=(r.level-c)/(r.z[o+1][a]-c),h=(v!==1?(1-v)*b.c2l(r.y[o]):0)+(v!==0?v*b.c2l(r.y[o+1]):0);return[s.c2p(r.x[a],!0),b.c2p(b.l2c(h),!0),a,o+v]}}},52421:function(R,F,e){var i=e(7901),m=e(46248);R.exports=function(y,p,l,d,r){r||(r={}),r.isContour=!0;var n=m(y,p,l,d,r);return n&&n.forEach(function(u){var a=u.trace;a.contours.type==="constraint"&&(a.fillcolor&&i.opacity(a.fillcolor)?u.color=i.addOpacity(a.fillcolor,1):a.contours.showlines&&i.opacity(a.line.color)&&(u.color=i.addOpacity(a.line.color,1)))}),n}},99442:function(R,F,e){R.exports={attributes:e(70600),supplyDefaults:e(13031),calc:e(27529),plot:e(29854).plot,style:e(84426),colorbar:e(90654),hoverPoints:e(52421),moduleType:"trace",name:"contour",basePlotModule:e(93612),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}},14523:function(R,F,e){var i=e(71828);R.exports=function(t,y,p,l){l||(l={});var d=t("contours.showlabels");if(d){var r=y.font;i.coerceFont(t,"contours.labelfont",{family:r.family,size:r.size,color:p}),t("contours.labelformat")}l.hasHover!==!1&&t("zhoverformat")}},86068:function(R,F,e){var i=e(39898),m=e(21081),t=e(53572);R.exports=function(p){var l=p.contours,d=l.start,r=t(l),n=l.size||1,u=Math.floor((r-d)/n)+1,a=l.coloring==="lines"?0:1,o=m.extractOpts(p);isFinite(n)||(n=1,u=1);var c=o.reversescale?m.flipScale(o.colorscale):o.colorscale,s=c.length,b=new Array(s),g=new Array(s),A,v;if(l.coloring==="heatmap"){var h=o.min,x=o.max;for(v=0;vt?0:1)+(y[0][1]>t?0:2)+(y[1][1]>t?0:4)+(y[1][0]>t?0:8);if(p===5||p===10){var l=(y[0][0]+y[0][1]+y[1][0]+y[1][1])/4;return t>l?p===5?713:1114:p===5?104:208}return p===15?0:p}},29854:function(R,F,e){var i=e(39898),m=e(71828),t=e(91424),y=e(21081),p=e(63893),l=e(89298),d=e(21994),r=e(50347),n=e(87678),u=e(81696),a=e(87558),o=e(84857),c=e(20083),s=e(36914),b=s.LABELOPTIMIZER;F.plot=function(w,M,S,f){var P=M.xaxis,E=M.yaxis;m.makeTraceGroups(f,S,"contour").each(function(k){var O=i.select(this),G=k[0],z=G.trace,U=G.x,H=G.y,B=z.contours,W=a(B,M,G),q=m.ensureSingle(O,"g","heatmapcoloring"),re=[];B.coloring==="heatmap"&&(re=[k]),r(w,M,re,q),n(W),u(W);var ie=P.c2p(U[0],!0),le=P.c2p(U[U.length-1],!0),he=E.c2p(H[0],!0),$=E.c2p(H[H.length-1],!0),Z=[[ie,$],[le,$],[le,he],[ie,he]],K=W;B.type==="constraint"&&(K=o(W,B._operation)),g(O,Z,B),A(O,K,Z,B),h(O,W,w,G,B),C(O,M,w,G,Z)})};function g(L,w,M){var S=m.ensureSingle(L,"g","contourbg"),f=S.selectAll("path").data(M.coloring==="fill"?[0]:[]);f.enter().append("path"),f.exit().remove(),f.attr("d","M"+w.join("L")+"Z").style("stroke","none")}function A(L,w,M,S){var f=S.coloring==="fill"||S.type==="constraint"&&S._operation!=="=",P="M"+M.join("L")+"Z";f&&c(w,S);var E=m.ensureSingle(L,"g","contourfill"),k=E.selectAll("path").data(f?w:[]);k.enter().append("path"),k.exit().remove(),k.each(function(O){var G=(O.prefixBoundary?P:"")+v(O,M);G?i.select(this).attr("d",G).style("stroke","none"):i.select(this).remove()})}function v(L,w){var M="",S=0,f=L.edgepaths.map(function(ie,le){return le}),P=!0,E,k,O,G,z,U;function H(ie){return Math.abs(ie[1]-w[0][1])<.01}function B(ie){return Math.abs(ie[1]-w[2][1])<.01}function W(ie){return Math.abs(ie[0]-w[0][0])<.01}function q(ie){return Math.abs(ie[0]-w[2][0])<.01}for(;f.length;){for(U=t.smoothopen(L.edgepaths[S],L.smoothing),M+=P?U:U.replace(/^M/,"L"),f.splice(f.indexOf(S),1),E=L.edgepaths[S][L.edgepaths[S].length-1],G=-1,O=0;O<4;O++){if(!E){m.log("Missing end?",S,L);break}for(H(E)&&!q(E)?k=w[1]:W(E)?k=w[0]:B(E)?k=w[3]:q(E)&&(k=w[2]),z=0;z=0&&(k=re,G=z):Math.abs(E[1]-k[1])<.01?Math.abs(E[1]-re[1])<.01&&(re[0]-E[0])*(k[0]-re[0])>=0&&(k=re,G=z):m.log("endpt to newendpt is not vert. or horz.",E,k,re)}if(E=k,G>=0)break;M+="L"+k}if(G===L.edgepaths.length){m.log("unclosed perimeter path");break}S=G,P=f.indexOf(S)===-1,P&&(S=f[0],M+="Z")}for(S=0;Sb.MAXCOST*2)break;H&&(k/=2),E=G-k/2,O=E+k*1.5}if(U<=b.MAXCOST)return z};function x(L,w,M,S){var f=w.width/2,P=w.height/2,E=L.x,k=L.y,O=L.theta,G=Math.cos(O)*f,z=Math.sin(O)*f,U=(E>S.center?S.right-E:E-S.left)/(G+Math.abs(Math.sin(O)*P)),H=(k>S.middle?S.bottom-k:k-S.top)/(Math.abs(z)+Math.cos(O)*P);if(U<1||H<1)return 1/0;var B=b.EDGECOST*(1/(U-1)+1/(H-1));B+=b.ANGLECOST*O*O;for(var W=E-G,q=k-z,re=E+G,ie=k+z,le=0;led.end&&(d.start=d.end=(d.start+d.end)/2),p._input.contours||(p._input.contours={}),m.extendFlat(p._input.contours,{start:d.start,end:d.end,size:d.size}),p._input.autocontour=!0}else if(d.type!=="constraint"){var a=d.start,o=d.end,c=p._input.contours;if(a>o&&(d.start=c.start=o,o=d.end=c.end=a,a=d.start),!(d.size>0)){var s;a===o?s=1:s=t(a,o,p.ncontours).dtick,c.size=d.size=s}}};function t(y,p,l){var d={type:"linear",range:[y,p]};return i.autoTicks(d,(p-y)/(l||15)),d}},84426:function(R,F,e){var i=e(39898),m=e(91424),t=e(70035),y=e(86068);R.exports=function(l){var d=i.select(l).selectAll("g.contour");d.style("opacity",function(r){return r[0].trace.opacity}),d.each(function(r){var n=i.select(this),u=r[0].trace,a=u.contours,o=u.line,c=a.size||1,s=a.start,b=a.type==="constraint",g=!b&&a.coloring==="lines",A=!b&&a.coloring==="fill",v=g||A?y(u):null;n.selectAll("g.contourlevel").each(function(C){i.select(this).selectAll("path").call(m.lineGroupStyle,o.width,g?v(C.level):o.color,o.dash)});var h=a.labelfont;if(n.selectAll("g.contourlabels text").each(function(C){m.font(i.select(this),{family:h.family,size:h.size,color:h.color||(g?v(C.level):o.color)})}),b)n.selectAll("g.contourfill path").style("fill",u.fillcolor);else if(A){var x;n.selectAll("g.contourfill path").style("fill",function(C){return x===void 0&&(x=C.level),v(C.level+.5*c)}),x===void 0&&(x=s),n.selectAll("g.contourbg path").style("fill",v(x-.5*c))}}),t(l)}},8724:function(R,F,e){var i=e(1586),m=e(14523);R.exports=function(y,p,l,d,r){var n=l("contours.coloring"),u,a="";n==="fill"&&(u=l("contours.showlines")),u!==!1&&(n!=="lines"&&(a=l("line.color","#000")),l("line.width",.5),l("line.dash")),n!=="none"&&(y.showlegend!==!0&&(p.showlegend=!1),p._dfltShowLegend=!1,i(y,p,d,l,{prefix:"",cLetter:"z"})),l("line.smoothing"),m(l,d,a,r)}},88085:function(R,F,e){var i=e(21606),m=e(70600),t=e(50693),y=e(1426).extendFlat,p=m.contours;R.exports=y({carpet:{valType:"string",editType:"calc"},z:i.z,a:i.x,a0:i.x0,da:i.dx,b:i.y,b0:i.y0,db:i.dy,text:i.text,hovertext:i.hovertext,transpose:i.transpose,atype:i.xtype,btype:i.ytype,fillcolor:m.fillcolor,autocontour:m.autocontour,ncontours:m.ncontours,contours:{type:p.type,start:p.start,end:p.end,size:p.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:p.showlines,showlabels:p.showlabels,labelfont:p.labelfont,labelformat:p.labelformat,operation:p.operation,value:p.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:m.line.color,width:m.line.width,dash:m.line.dash,smoothing:m.line.smoothing,editType:"plot"},transforms:void 0},t("",{cLetter:"z",autoColorDflt:!1}))},59885:function(R,F,e){var i=e(78803),m=e(71828),t=e(68296),y=e(4742),p=e(824),l=e(43907),d=e(70769),r=e(75005),n=e(22882),u=e(18670);R.exports=function(c,s){var b=s._carpetTrace=n(c,s);if(!(!b||!b.visible||b.visible==="legendonly")){if(!s.a||!s.b){var g=c.data[b.index],A=c.data[s.index];A.a||(A.a=g.a),A.b||(A.b=g.b),r(A,s,s._defaultColor,c._fullLayout)}var v=a(c,s);return u(s,s._z),v}};function a(o,c){var s=c._carpetTrace,b=s.aaxis,g=s.baxis,A,v,h,x,C,D,L;b._minDtick=0,g._minDtick=0,m.isArray1D(c.z)&&t(c,b,g,"a","b",["z"]),A=c._a=c._a||c.a,x=c._b=c._b||c.b,A=A?b.makeCalcdata(c,"_a"):[],x=x?g.makeCalcdata(c,"_b"):[],v=c.a0||0,h=c.da||1,C=c.b0||0,D=c.db||1,L=c._z=y(c._z||c.z,c.transpose),c._emptypoints=l(L),p(L,c._emptypoints);var w=m.maxRowLength(L),M=c.xtype==="scaled"?"":A,S=d(c,M,v,h,w,b),f=c.ytype==="scaled"?"":x,P=d(c,f,C,D,L.length,g),E={a:S,b:P,z:L};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&i(o,c,{vals:L,containerStr:"",cLetter:"z"}),[E]}},75005:function(R,F,e){var i=e(71828),m=e(67684),t=e(88085),y=e(83179),p=e(67217),l=e(8724);R.exports=function(r,n,u,a){function o(g,A){return i.coerce(r,n,t,g,A)}function c(g){return i.coerce2(r,n,t,g)}if(o("carpet"),r.a&&r.b){var s=m(r,n,o,a,"a","b");if(!s){n.visible=!1;return}o("text");var b=o("contours.type")==="constraint";b?y(r,n,o,a,u,{hasHover:!1}):(p(r,n,o,c),l(r,n,o,a,{hasHover:!1}))}else n._defaultColor=u,n._length=null}},93740:function(R,F,e){R.exports={attributes:e(88085),supplyDefaults:e(75005),colorbar:e(90654),calc:e(59885),plot:e(51048),style:e(84426),moduleType:"trace",name:"contourcarpet",basePlotModule:e(93612),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},51048:function(R,F,e){var i=e(39898),m=e(27669),t=e(67961),y=e(91424),p=e(71828),l=e(87678),d=e(81696),r=e(29854),n=e(36914),u=e(84857),a=e(87558),o=e(20083),c=e(22882),s=e(4536);R.exports=function(M,S,f,P){var E=S.xaxis,k=S.yaxis;p.makeTraceGroups(P,f,"contour").each(function(O){var G=i.select(this),z=O[0],U=z.trace,H=U._carpetTrace=c(M,U),B=M.calcdata[H.index][0];if(!H.visible||H.visible==="legendonly")return;var W=z.a,q=z.b,re=U.contours,ie=a(re,S,z),le=re.type==="constraint",he=re._operation,$=le?he==="="?"lines":"fill":re.coloring;function Z(Se){var Te=H.ab2xy(Se[0],Se[1],!0);return[E.c2p(Te[0]),k.c2p(Te[1])]}var K=[[W[0],q[q.length-1]],[W[W.length-1],q[q.length-1]],[W[W.length-1],q[0]],[W[0],q[0]]];l(ie);var Q=(W[W.length-1]-W[0])*1e-8,ae=(q[q.length-1]-q[0])*1e-8;d(ie,Q,ae);var fe=ie;re.type==="constraint"&&(fe=u(ie,he)),b(ie,Z);var te,ne,ce,oe,de=[];for(oe=B.clipsegments.length-1;oe>=0;oe--)te=B.clipsegments[oe],ne=m([],te.x,E.c2p),ce=m([],te.y,k.c2p),ne.reverse(),ce.reverse(),de.push(t(ne,ce,te.bicubic));var we="M"+de.join("L")+"Z";C(G,B.clipsegments,E,k,le,$),D(U,G,E,k,fe,K,Z,H,B,$,we),g(G,ie,M,z,re,S,H),y.setClipUrl(G,H._clipPathId,M)})};function b(w,M){var S,f,P,E,k,O,G,z,U;for(S=0;Sie&&(f.max=ie),f.len=f.max-f.min}function v(w,M,S){var f=w.getPointAtLength(M),P=w.getPointAtLength(S),E=P.x-f.x,k=P.y-f.y,O=Math.sqrt(E*E+k*k);return[E/O,k/O]}function h(w){var M=Math.sqrt(w[0]*w[0]+w[1]*w[1]);return[w[0]/M,w[1]/M]}function x(w,M){var S=Math.abs(w[0]*M[0]+w[1]*M[1]),f=Math.sqrt(1-S*S);return f/S}function C(w,M,S,f,P,E){var k,O,G,z,U=p.ensureSingle(w,"g","contourbg"),H=U.selectAll("path").data(E==="fill"&&!P?[0]:[]);H.enter().append("path"),H.exit().remove();var B=[];for(z=0;z=0&&(W=ne,re=ie):Math.abs(B[1]-W[1])<$?Math.abs(B[1]-ne[1])<$&&(ne[0]-B[0])*(W[0]-ne[0])>=0&&(W=ne,re=ie):p.log("endpt to newendpt is not vert. or horz.",B,W,ne)}if(re>=0)break;z+=fe(B,W),B=W}if(re===M.edgepaths.length){p.log("unclosed perimeter path");break}G=re,H=U.indexOf(G)===-1,H&&(G=U[0],z+=fe(B,W)+"Z",B=null)}for(G=0;G0?+g[s]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:x},properties:C})}}var L=y.extractOpts(n),w=L.reversescale?y.flipScale(L.colorscale):L.colorscale,M=w[0][1],S=t.opacity(M)<1?M:t.addOpacity(M,0),f=["interpolate",["linear"],["heatmap-density"],0,S];for(s=1;s=0;d--)p.removeLayer(l[d][1])},y.dispose=function(){var p=this.subplot.map;this._removeLayers(),p.removeSource(this.sourceId)},R.exports=function(l,d){var r=d[0].trace,n=new t(l,r.uid),u=n.sourceId,a=i(d),o=n.below=l.belowLookup["trace-"+r.uid];return l.map.addSource(u,{type:"geojson",data:a.geojson}),n._addLayers(a,o),n}},49789:function(R,F,e){var i=e(71828);R.exports=function(t,y){for(var p=0;p"),a.color=y(c,g),[a]}};function y(p,l){var d=p.marker,r=l.mc||d.color,n=l.mlc||d.line.color,u=l.mlw||d.line.width;if(i(r))return r;if(i(n)&&u)return n}},51759:function(R,F,e){R.exports={attributes:e(1285),layoutAttributes:e(10440),supplyDefaults:e(26199).supplyDefaults,crossTraceDefaults:e(26199).crossTraceDefaults,supplyLayoutDefaults:e(93138),calc:e(9532),crossTraceCalc:e(8984),plot:e(80461),style:e(68266).style,hoverPoints:e(63341),eventData:e(34598),selectPoints:e(81974),moduleType:"trace",name:"funnel",basePlotModule:e(93612),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},10440:function(R){R.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},93138:function(R,F,e){var i=e(71828),m=e(10440);R.exports=function(t,y,p){var l=!1;function d(u,a){return i.coerce(t,y,m,u,a)}for(var r=0;r path").each(function(g){if(!g.isBlank){var A=b.marker;i.select(this).call(t.fill,g.mc||A.color).call(t.stroke,g.mlc||A.line.color).call(m.dashLine,A.line.dash,g.mlw||A.line.width).style("opacity",b.selectedpoints&&!g.selected?y:1)}}),d(s,b,n),s.selectAll(".regions").each(function(){i.select(this).selectAll("path").style("stroke-width",0).call(t.fill,b.connector.fillcolor)}),s.selectAll(".lines").each(function(){var g=b.connector.line;m.lineGroupStyle(i.select(this).selectAll("path"),g.width,g.color,g.dash)})})}R.exports={style:r}},86807:function(R,F,e){var i=e(34e3),m=e(9012),t=e(27670).Y,y=e(5386).f,p=e(5386).s,l=e(1426).extendFlat;R.exports={labels:i.labels,label0:i.label0,dlabel:i.dlabel,values:i.values,marker:{colors:i.marker.colors,line:{color:l({},i.marker.line.color,{dflt:null}),width:l({},i.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},text:i.text,hovertext:i.hovertext,scalegroup:l({},i.scalegroup,{}),textinfo:l({},i.textinfo,{flags:["label","text","value","percent"]}),texttemplate:p({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:l({},m.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:y({},{keys:["label","color","value","text","percent"]}),textposition:l({},i.textposition,{values:["inside","none"],dflt:"inside"}),textfont:i.textfont,insidetextfont:i.insidetextfont,title:{text:i.title.text,font:i.title.font,position:l({},i.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:t({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}},6452:function(R,F,e){var i=e(74875);F.name="funnelarea",F.plot=function(m,t,y,p){i.plotBasePlot(F.name,m,t,y,p)},F.clean=function(m,t,y,p){i.cleanBasePlot(F.name,m,t,y,p)}},89574:function(R,F,e){var i=e(32354);function m(y,p){return i.calc(y,p)}function t(y){i.crossTraceCalc(y,{type:"funnelarea"})}R.exports={calc:m,crossTraceCalc:t}},86282:function(R,F,e){var i=e(71828),m=e(86807),t=e(27670).c,y=e(90769).handleText,p=e(37434).handleLabelsAndValues;R.exports=function(d,r,n,u){function a(D,L){return i.coerce(d,r,m,D,L)}var o=a("labels"),c=a("values"),s=p(o,c),b=s.len;if(r._hasLabels=s.hasLabels,r._hasValues=s.hasValues,!r._hasLabels&&r._hasValues&&(a("label0"),a("dlabel")),!b){r.visible=!1;return}r._length=b;var g=a("marker.line.width");g&&a("marker.line.color",u.paper_bgcolor),a("marker.colors"),a("scalegroup");var A=a("text"),v=a("texttemplate"),h;if(v||(h=a("textinfo",Array.isArray(A)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),v||h&&h!=="none"){var x=a("textposition");y(d,r,u,a,x,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}t(r,u,a);var C=a("title.text");C&&(a("title.position"),i.coerceFont(a,"title.font",u.font)),a("aspectratio"),a("baseratio")}},10421:function(R,F,e){R.exports={moduleType:"trace",name:"funnelarea",basePlotModule:e(6452),categories:["pie-like","funnelarea","showLegend"],attributes:e(86807),layoutAttributes:e(80097),supplyDefaults:e(86282),supplyLayoutDefaults:e(57402),calc:e(89574).calc,crossTraceCalc:e(89574).crossTraceCalc,plot:e(79187),style:e(71858),styleOne:e(63463),meta:{}}},80097:function(R,F,e){var i=e(92774).hiddenlabels;R.exports={hiddenlabels:i,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},57402:function(R,F,e){var i=e(71828),m=e(80097);R.exports=function(y,p){function l(d,r){return i.coerce(y,p,m,d,r)}l("hiddenlabels"),l("funnelareacolorway",p.colorway),l("extendfunnelareacolors")}},79187:function(R,F,e){var i=e(39898),m=e(91424),t=e(71828),y=t.strScale,p=t.strTranslate,l=e(63893),d=e(17295),r=d.toMoveInsideBar,n=e(72597),u=n.recordMinTextSize,a=n.clearMinTextSize,o=e(53581),c=e(14575),s=c.attachFxHandlers,b=c.determineInsideTextFont,g=c.layoutAreas,A=c.prerenderTitles,v=c.positionTitleOutside,h=c.formatSliceLabel;R.exports=function(w,M){var S=w._context.staticPlot,f=w._fullLayout;a("funnelarea",f),A(M,w),g(M,f._size),t.makeTraceGroups(f._funnelarealayer,M,"trace").each(function(P){var E=i.select(this),k=P[0],O=k.trace;D(P),E.each(function(){var G=i.select(this).selectAll("g.slice").data(P);G.enter().append("g").classed("slice",!0),G.exit().remove(),G.each(function(U,H){if(U.hidden){i.select(this).selectAll("path,g").remove();return}U.pointNumber=U.i,U.curveNumber=O.index;var B=k.cx,W=k.cy,q=i.select(this),re=q.selectAll("path.surface").data([U]);re.enter().append("path").classed("surface",!0).style({"pointer-events":S?"none":"all"}),q.call(s,w,P);var ie="M"+(B+U.TR[0])+","+(W+U.TR[1])+x(U.TR,U.BR)+x(U.BR,U.BL)+x(U.BL,U.TL)+"Z";re.attr("d",ie),h(w,U,k);var le=o.castOption(O.textposition,U.pts),he=q.selectAll("g.slicetext").data(U.text&&le!=="none"?[0]:[]);he.enter().append("g").classed("slicetext",!0),he.exit().remove(),he.each(function(){var $=t.ensureSingle(i.select(this),"text","",function(ce){ce.attr("data-notex",1)}),Z=t.ensureUniformFontSize(w,b(O,U,f.font));$.text(U.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(m.font,Z).call(l.convertToTspans,w);var K=m.bBox($.node()),Q,ae,fe,te=Math.min(U.BL[1],U.BR[1])+W,ne=Math.max(U.TL[1],U.TR[1])+W;ae=Math.max(U.TL[0],U.BL[0])+B,fe=Math.min(U.TR[0],U.BR[0])+B,Q=r(ae,fe,te,ne,K,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),Q.fontSize=Z.size,u(O.type,Q,f),P[H].transform=Q,t.setTransormAndDisplay($,Q)})});var z=i.select(this).selectAll("g.titletext").data(O.title.text?[0]:[]);z.enter().append("g").classed("titletext",!0),z.exit().remove(),z.each(function(){var U=t.ensureSingle(i.select(this),"text","",function(W){W.attr("data-notex",1)}),H=O.title.text;O._meta&&(H=t.templateString(H,O._meta)),U.text(H).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(m.font,O.title.font).call(l.convertToTspans,w);var B=v(k,f._size);U.attr("transform",p(B.x,B.y)+y(Math.min(1,B.scale))+p(B.tx,B.ty))})})})};function x(L,w){var M=w[0]-L[0],S=w[1]-L[1];return"l"+M+","+S}function C(L,w){return[.5*(L[0]+w[0]),.5*(L[1]+w[1])]}function D(L){if(!L.length)return;var w=L[0],M=w.trace,S=M.aspectratio,f=M.baseratio;f>.999&&(f=.999);var P=Math.pow(f,2),E=w.vTotal,k=E*P/(1-P),O=E,G=k/E;function z(){var oe=Math.sqrt(G);return{x:oe,y:-oe}}function U(){var oe=z();return[oe.x,oe.y]}var H,B=[];B.push(U());var W,q;for(W=L.length-1;W>-1;W--)if(q=L[W],!q.hidden){var re=q.v/O;G+=re,B.push(U())}var ie=1/0,le=-1/0;for(W=0;W-1;W--)if(q=L[W],!q.hidden){te+=1;var ne=B[te][0],ce=B[te][1];q.TL=[-ne,ce],q.TR=[ne,ce],q.BL=ae,q.BR=fe,q.pxmid=C(q.TR,q.BR),ae=q.TL,fe=q.TR}}},71858:function(R,F,e){var i=e(39898),m=e(63463),t=e(72597).resizeText;R.exports=function(p){var l=p._fullLayout._funnelarealayer.selectAll(".trace");t(p,l,"funnelarea"),l.each(function(d){var r=d[0],n=r.trace,u=i.select(this);u.style({opacity:n.opacity}),u.selectAll("path.surface").each(function(a){i.select(this).call(m,a,n)})})}},21606:function(R,F,e){var i=e(82196),m=e(9012),t=e(41940),y=e(12663).axisHoverFormat,p=e(5386).f,l=e(5386).s,d=e(50693),r=e(1426).extendFlat;R.exports=r({z:{valType:"data_array",editType:"calc"},x:r({},i.x,{impliedEdits:{xtype:"array"}}),x0:r({},i.x0,{impliedEdits:{xtype:"scaled"}}),dx:r({},i.dx,{impliedEdits:{xtype:"scaled"}}),y:r({},i.y,{impliedEdits:{ytype:"array"}}),y0:r({},i.y0,{impliedEdits:{ytype:"scaled"}}),dy:r({},i.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:r({},i.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:r({},i.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:r({},i.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:r({},i.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:r({},i.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:r({},i.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:y("x"),yhoverformat:y("y"),zhoverformat:y("z",1),hovertemplate:p(),texttemplate:l({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:r({},m.showlegend,{dflt:!1})},{transforms:void 0},d("",{cLetter:"z",autoColorDflt:!1}))},90757:function(R,F,e){var i=e(73972),m=e(71828),t=e(89298),y=e(42973),p=e(17562),l=e(78803),d=e(68296),r=e(4742),n=e(824),u=e(43907),a=e(70769),o=e(50606).BADNUM;R.exports=function(g,A){var v=t.getFromId(g,A.xaxis||"x"),h=t.getFromId(g,A.yaxis||"y"),x=i.traceIs(A,"contour"),C=i.traceIs(A,"histogram"),D=i.traceIs(A,"gl2d"),L=x?"best":A.zsmooth,w,M,S,f,P,E,k,O,G,z,U;if(v._minDtick=0,h._minDtick=0,C)U=p(g,A),f=U.orig_x,w=U.x,M=U.x0,S=U.dx,O=U.orig_y,P=U.y,E=U.y0,k=U.dy,G=U.z;else{var H=A.z;m.isArray1D(H)?(d(A,v,h,"x","y",["z"]),w=A._x,P=A._y,H=A._z):(f=A.x?v.makeCalcdata(A,"x"):[],O=A.y?h.makeCalcdata(A,"y"):[],w=y(A,v,"x",f).vals,P=y(A,h,"y",O).vals,A._x=w,A._y=P),M=A.x0,S=A.dx,E=A.y0,k=A.dy,G=r(H,A,v,h)}(v.rangebreaks||h.rangebreaks)&&(G=s(w,P,G),C||(w=c(w),P=c(P),A._x=w,A._y=P)),!C&&(x||A.connectgaps)&&(A._emptypoints=u(G),n(G,A._emptypoints));function B(fe){L=A._input.zsmooth=A.zsmooth=!1,m.warn('cannot use zsmooth: "fast": '+fe)}if(L==="fast"){if(v.type==="log"||h.type==="log")B("log axis found");else if(!C){if(w.length){var W=(w[w.length-1]-w[0])/(w.length-1),q=Math.abs(W/100);for(z=0;zq){B("x scale is not linear");break}}if(P.length&&L==="fast"){var re=(P[P.length-1]-P[0])/(P.length-1),ie=Math.abs(re/100);for(z=0;zie){B("y scale is not linear");break}}}}var le=m.maxRowLength(G),he=A.xtype==="scaled"?"":w,$=a(A,he,M,S,le,v),Z=A.ytype==="scaled"?"":P,K=a(A,Z,E,k,G.length,h);D||(A._extremes[v._id]=t.findExtremes(v,$),A._extremes[h._id]=t.findExtremes(h,K));var Q={x:$,y:K,z:G,text:A._text||A.text,hovertext:A._hovertext||A.hovertext};if(A.xperiodalignment&&f&&(Q.orig_x=f),A.yperiodalignment&&O&&(Q.orig_y=O),he&&he.length===$.length-1&&(Q.xCenter=he),Z&&Z.length===K.length-1&&(Q.yCenter=Z),C&&(Q.xRanges=U.xRanges,Q.yRanges=U.yRanges,Q.pts=U.pts),x||l(g,A,{vals:G,cLetter:"z"}),x&&A.contours&&A.contours.coloring==="heatmap"){var ae={type:A.type==="contour"?"heatmap":"histogram2d",xcalendar:A.xcalendar,ycalendar:A.ycalendar};Q.xfill=a(ae,he,M,S,le,v),Q.yfill=a(ae,Z,E,k,G.length,h)}return[Q]};function c(b){for(var g=[],A=b.length,v=0;v=0;b--)s=l[b],o=s[0],c=s[1],g=((p[[o-1,c]]||n)[2]+(p[[o+1,c]]||n)[2]+(p[[o,c-1]]||n)[2]+(p[[o,c+1]]||n)[2])/20,g&&(A[s]=[o,c,g],l.splice(b,1),v=!0);if(!v)throw"findEmpties iterated with no new neighbors";for(s in A)p[s]=A[s],y.push(A[s])}return y.sort(function(h,x){return x[2]-h[2]})}},46248:function(R,F,e){var i=e(30211),m=e(71828),t=e(89298),y=e(21081).extractOpts;R.exports=function(l,d,r,n,u){u||(u={});var a=u.isContour,o=l.cd[0],c=o.trace,s=l.xa,b=l.ya,g=o.x,A=o.y,v=o.z,h=o.xCenter,x=o.yCenter,C=o.zmask,D=c.zhoverformat,L=g,w=A,M,S,f,P;if(l.index!==!1){try{f=Math.round(l.index[1]),P=Math.round(l.index[0])}catch{m.error("Error hovering on heatmap, pointNumber must be [row,col], found:",l.index);return}if(f<0||f>=v[0].length||P<0||P>v.length)return}else{if(i.inbox(d-g[0],d-g[g.length-1],0)>0||i.inbox(r-A[0],r-A[A.length-1],0)>0)return;if(a){var E;for(L=[2*g[0]-g[1]],E=1;Em;u++)n=p(d,r,y(n));return n>m&&i.log("interp2d didn't converge quickly",n),d};function p(l,d,r){var n=0,u,a,o,c,s,b,g,A,v,h,x,C,D;for(c=0;cC&&(n=Math.max(n,Math.abs(l[a][o]-x)/(D-C))))}return n}},58623:function(R,F,e){var i=e(71828);R.exports=function(t,y){t("texttemplate");var p=i.extendFlat({},y.font,{color:"auto",size:"auto"});i.coerceFont(t,"textfont",p)}},70769:function(R,F,e){var i=e(73972),m=e(71828).isArrayOrTypedArray;R.exports=function(y,p,l,d,r,n){var u=[],a=i.traceIs(y,"contour"),o=i.traceIs(y,"histogram"),c=i.traceIs(y,"gl2d"),s,b,g,A=m(p)&&p.length>1;if(A&&!o&&n.type!=="category"){var v=p.length;if(v<=r){if(a||c)u=p.slice(0,r);else if(r===1)u=[p[0]-.5,p[0]+.5];else{for(u=[1.5*p[0]-.5*p[1]],g=1;g0;)K=M.c2p(U[te]),te--;for(K0;)fe=S.c2p(H[te]),te--;if(feKt||Kt>S._length))for(ne=Dt;neir||ir>M._length)){var Mr=r({x:$t,y:Vt},k,C._fullLayout);Mr.x=$t,Mr.y=Vt;var Xe=E.z[te][ne];Xe===void 0?(Mr.z="",Mr.zLabel=""):(Mr.z=Xe,Mr.zLabel=p.tickText(dr,Xe,"hover").text);var je=E.text&&E.text[te]&&E.text[te][ne];(je===void 0||je===!1)&&(je=""),Mr.text=je;var It=l.texttemplateString(Yt,Mr,C._fullLayout._d3locale,Mr,k._meta||{});if(!!It){var _t=It.split("
"),Zt=_t.length,rr=0;for(ce=0;ce0&&(r=!0);for(var o=0;ol){var d=l-y[m];return y[m]=l,d}}else return y[m]=l,l;return 0},max:function(m,t,y,p){var l=p[t];if(i(l))if(l=Number(l),i(y[m])){if(y[m]M&&My){var P=S===m?1:6,E=S===m?"M12":"M1";return function(k,O){var G=A.c2d(k,m,v),z=G.indexOf("-",P);z>0&&(G=G.substr(0,z));var U=A.d2c(G,0,v);if(Ud?c>y?c>m*1.1?m:c>t*1.1?t:y:c>p?p:c>l?l:d:Math.pow(10,Math.floor(Math.log(c)/Math.LN10))}function a(c,s,b,g,A,v){if(g&&c>y){var h=o(s,A,v),x=o(b,A,v),C=c===m?0:1;return h[C]!==x[C]}return Math.floor(b/c)-Math.floor(s/c)>.1}function o(c,s,b){var g=s.c2d(c,m,b).split("-");return g[0]===""&&(g.unshift(),g[0]="-"+g[0]),g}},72138:function(R,F,e){var i=e(92770),m=e(71828),t=e(73972),y=e(89298),p=e(75341),l=e(59575),d=e(36362),r=e(42174),n=e(40965);function u(b,g){var A=[],v=[],h=g.orientation==="h",x=y.getFromId(b,h?g.yaxis:g.xaxis),C=h?"y":"x",D={x:"y",y:"x"}[C],L=g[C+"calendar"],w=g.cumulative,M,S=a(b,g,x,C),f=S[0],P=S[1],E=typeof f.size=="string",k=[],O=E?k:f,G=[],z=[],U=[],H=0,B=g.histnorm,W=g.histfunc,q=B.indexOf("density")!==-1,re,ie,le;w.enabled&&q&&(B=B.replace(/ ?density$/,""),q=!1);var he=W==="max"||W==="min",$=he?null:0,Z=l.count,K=d[B],Q=!1,ae=function(We){return x.r2c(We,0,L)},fe;for(m.isArrayOrTypedArray(g[D])&&W!=="count"&&(fe=g[D],Q=W==="avg",Z=l[W]),M=ae(f.start),ie=ae(f.end)+(M-y.tickIncrement(M,f.size,!1,L))/1e6;M=0&&le=Ae;M--)if(v[M]){De=M;break}for(M=Ae;M<=De;M++)if(i(A[M])&&i(v[M])){var ke={p:A[M],s:v[M],b:0};w.enabled||(ke.pts=U[M],oe?ke.ph0=ke.ph1=U[M].length?P[U[M][0]]:A[M]:(g._computePh=!0,ke.ph0=Fe(k[M]),ke.ph1=Fe(k[M+1],!0))),Me.push(ke)}return Me.length===1&&(Me[0].width1=y.tickIncrement(Me[0].p,f.size,!1,L)-Me[0].p),p(Me,g),m.isArrayOrTypedArray(g.selectedpoints)&&m.tagSelected(Me,g,Se),Me}function a(b,g,A,v,h){var x=v+"bins",C=b._fullLayout,D=g["_"+v+"bingroup"],L=C._histogramBinOpts[D],w=C.barmode==="overlay",M,S,f,P,E,k,O,G=function(Te){return A.r2c(Te,0,P)},z=function(Te){return A.c2r(Te,0,P)},U=A.type==="date"?function(Te){return Te||Te===0?m.cleanDate(Te,null,P):null}:function(Te){return i(Te)?Number(Te):null};function H(Te,Fe,Ie){Fe[Te+"Found"]?(Fe[Te]=U(Fe[Te]),Fe[Te]===null&&(Fe[Te]=Ie[Te])):(k[Te]=Fe[Te]=Ie[Te],m.nestedProperty(S[0],x+"."+Te).set(Ie[Te]))}if(g["_"+v+"autoBinFinished"])delete g["_"+v+"autoBinFinished"];else{S=L.traces;var B=[],W=!0,q=!1,re=!1;for(M=0;MA.r2l(fe)&&(ne=y.tickIncrement(ne,L.size,!0,P)),Z.start=A.l2r(ne),ae||m.nestedProperty(g,x+".start").set(Z.start)}var ce=L.end,oe=A.r2l($.end),de=oe!==void 0;if((L.endFound||de)&&oe!==A.r2l(ce)){var we=de?oe:m.aggNums(Math.max,null,E);Z.end=A.l2r(we),de||m.nestedProperty(g,x+".start").set(Z.end)}var Se="autobin"+v;return g._input[Se]===!1&&(g._input[x]=m.extendFlat({},g[x]||{}),delete g._input[Se],delete g[Se]),[Z,E]}function o(b,g,A,v,h){var x=b._fullLayout,C=c(b,g),D=!1,L=1/0,w=[g],M,S,f;for(M=0;M=0;v--)D(v);else if(g==="increasing"){for(v=1;v=0;v--)b[v]+=b[v+1];A==="exclude"&&(b.push(0),b.shift())}}R.exports={calc:u,calcAllAutoBins:a}},72406:function(R){R.exports={eventDataKeys:["binNumber"]}},82222:function(R,F,e){var i=e(71828),m=e(41675),t=e(73972).traceIs,y=e(26125),p=i.nestedProperty,l=e(99082).getAxisGroup,d=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],r=["x","y"];R.exports=function(u,a){var o=a._histogramBinOpts={},c=[],s={},b=[],g,A,v,h,x,C,D;function L(re,ie){return i.coerce(g._input,g,g._module.attributes,re,ie)}function w(re){return re.orientation==="v"?"x":"y"}function M(re,ie){var le=m.getFromTrace({_fullLayout:a},re,ie);return le.type}function S(re,ie,le){var he=re.uid+"__"+le;ie||(ie=he);var $=M(re,le),Z=re[le+"calendar"]||"",K=o[ie],Q=!0;K&&($===K.axType&&Z===K.calendar?(Q=!1,K.traces.push(re),K.dirs.push(le)):(ie=he,$!==K.axType&&i.warn(["Attempted to group the bins of trace",re.index,"set on a","type:"+$,"axis","with bins on","type:"+K.axType,"axis."].join(" ")),Z!==K.calendar&&i.warn(["Attempted to group the bins of trace",re.index,"set with a",Z,"calendar","with bins",K.calendar?"on a "+K.calendar+" calendar":"w/o a set calendar"].join(" ")))),Q&&(o[ie]={traces:[re],dirs:[le],axType:$,calendar:re[le+"calendar"]||""}),re["_"+le+"bingroup"]=ie}for(x=0;xG&&P.splice(G,P.length-G),O.length>G&&O.splice(G,O.length-G);var z=[],U=[],H=[],B=typeof f.size=="string",W=typeof k.size=="string",q=[],re=[],ie=B?q:f,le=W?re:k,he=0,$=[],Z=[],K=c.histnorm,Q=c.histfunc,ae=K.indexOf("density")!==-1,fe=Q==="max"||Q==="min",te=fe?null:0,ne=t.count,ce=y[K],oe=!1,de=[],we=[],Se="z"in c?c.z:"marker"in c&&Array.isArray(c.marker.color)?c.marker.color:"";Se&&Q!=="count"&&(oe=Q==="avg",ne=t[Q]);var Te=f.size,Fe=v(f.start),Ie=v(f.end)+(Fe-m.tickIncrement(Fe,Te,!1,g))/1e6;for(D=Fe;D=0&&w=0&&M-1,flipY:U.tiling.flip.indexOf("y")>-1,orientation:U.tiling.orientation,pad:{inner:U.tiling.pad},maxDepth:U._maxDepth}),re=q.descendants(),ie=1/0,le=-1/0;re.forEach(function(Q){var ae=Q.depth;ae>=U._maxDepth?(Q.x0=Q.x1=(Q.x0+Q.x1)/2,Q.y0=Q.y1=(Q.y0+Q.y1)/2):(ie=Math.min(ie,ae),le=Math.max(le,ae))}),g=g.data(re,r.getPtId),U._maxVisibleLayers=isFinite(le)?le-ie+1:0,g.enter().append("g").classed("slice",!0),S(g,a,k,[v,h],D),g.order();var he=null;if(M&&E){var $=r.getPtId(E);g.each(function(Q){he===null&&r.getPtId(Q)===$&&(he={x0:Q.x0,x1:Q.x1,y0:Q.y0,y1:Q.y1})})}var Z=function(){return he||{x0:0,x1:v,y0:0,y1:h}},K=g;return M&&(K=K.transition().each("end",function(){var Q=i.select(this);r.setSliceCursor(Q,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),K.each(function(Q){Q._x0=x(Q.x0),Q._x1=x(Q.x1),Q._y0=C(Q.y0),Q._y1=C(Q.y1),Q._hoverX=x(Q.x1-U.tiling.pad),Q._hoverY=C(W?Q.y1-U.tiling.pad/2:Q.y0+U.tiling.pad/2);var ae=i.select(this),fe=m.ensureSingle(ae,"path","surface",function(oe){oe.style("pointer-events",O?"none":"all")});M?fe.transition().attrTween("d",function(oe){var de=f(oe,a,Z(),[v,h],{orientation:U.tiling.orientation,flipX:U.tiling.flip.indexOf("x")>-1,flipY:U.tiling.flip.indexOf("y")>-1});return function(we){return D(de(we))}}):fe.attr("d",D),ae.call(n,b,c,s,{styleOne:l,eventDataKeys:d.eventDataKeys,transitionTime:d.CLICK_TRANSITION_TIME,transitionEasing:d.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,c,{isTransitioning:c._transitioning}),fe.call(l,Q,U,{hovered:!1}),Q.x0===Q.x1||Q.y0===Q.y1?Q._text="":Q._text=u(Q,b,U,s,G)||"";var te=m.ensureSingle(ae,"g","slicetext"),ne=m.ensureSingle(te,"text","",function(oe){oe.attr("data-notex",1)}),ce=m.ensureUniformFontSize(c,r.determineTextFont(U,Q,G.font));ne.text(Q._text||" ").classed("slicetext",!0).attr("text-anchor",B?"end":H?"start":"middle").call(t.font,ce).call(y.convertToTspans,c),Q.textBB=t.bBox(ne.node()),Q.transform=L(Q,{fontSize:ce.size}),Q.transform.fontSize=ce.size,M?ne.transition().attrTween("transform",function(oe){var de=P(oe,a,Z(),[v,h]);return function(we){return w(de(we))}}):ne.attr("transform",w(Q))}),he}},69816:function(R,F,e){R.exports={moduleType:"trace",name:"icicle",basePlotModule:e(96346),categories:[],animatable:!0,attributes:e(46291),layoutAttributes:e(92894),supplyDefaults:e(56524),supplyLayoutDefaults:e(21070),calc:e(46584).y,crossTraceCalc:e(46584).T,plot:e(85596),style:e(82454).style,colorbar:e(4898),meta:{}}},92894:function(R){R.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},21070:function(R,F,e){var i=e(71828),m=e(92894);R.exports=function(y,p){function l(d,r){return i.coerce(y,p,m,d,r)}l("iciclecolorway",p.colorway),l("extendiciclecolors")}},21538:function(R,F,e){var i=e(674),m=e(14102);R.exports=function(y,p,l){var d=l.flipX,r=l.flipY,n=l.orientation==="h",u=l.maxDepth,a=p[0],o=p[1];u&&(a=(y.height+1)*p[0]/Math.min(y.height+1,u),o=(y.height+1)*p[1]/Math.min(y.height+1,u));var c=i.partition().padding(l.pad.inner).size(n?[p[1],a]:[p[0],o])(y);return(n||d||r)&&m(c,p,{swapXY:n,flipX:d,flipY:r}),c}},85596:function(R,F,e){var i=e(80694),m=e(90666);R.exports=function(y,p,l,d){return i(y,p,l,d,{type:"icicle",drawDescendants:m})}},82454:function(R,F,e){var i=e(39898),m=e(7901),t=e(71828),y=e(72597).resizeText;function p(d){var r=d._fullLayout._iciclelayer.selectAll(".trace");y(d,r,"icicle"),r.each(function(n){var u=i.select(this),a=n[0],o=a.trace;u.style("opacity",o.opacity),u.selectAll("path.surface").each(function(c){i.select(this).call(l,c,o)})})}function l(d,r,n){var u=r.data.data,a=!r.children,o=u.i,c=t.castOption(n,o,"marker.line.color")||m.defaultLine,s=t.castOption(n,o,"marker.line.width")||0;d.style("stroke-width",s).call(m.fill,u.color).call(m.stroke,c).style("opacity",a?n.leaf.opacity:null)}R.exports={style:p,styleOne:l}},17230:function(R,F,e){for(var i=e(9012),m=e(5386).f,t=e(1426).extendFlat,y=e(51877).colormodel,p=["rgb","rgba","rgba256","hsl","hsla"],l=[],d=[],r=0;r0||i.inbox(d-r.y0,d-(r.y0+r.h*n.dy),0)>0)){var o=Math.floor((l-r.x0)/n.dx),c=Math.floor(Math.abs(d-r.y0)/n.dy),s;if(n._hasZ?s=r.z[c][o]:n._hasSource&&(s=n._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(o,c,1,1).data),!!s){var b=r.hi||n.hoverinfo,g;if(b){var A=b.split("+");A.indexOf("all")!==-1&&(A=["color"]),A.indexOf("color")!==-1&&(g=!0)}var v=t.colormodel[n.colormodel],h=v.colormodel||n.colormodel,x=h.length,C=n._scaler(s),D=v.suffix,L=[];(n.hovertemplate||g)&&(L.push("["+[C[0]+D[0],C[1]+D[1],C[2]+D[2]].join(", ")),x===4&&L.push(", "+C[3]+D[3]),L.push("]"),L=L.join(""),p.extraText=h.toUpperCase()+": "+L);var w;Array.isArray(n.hovertext)&&Array.isArray(n.hovertext[c])?w=n.hovertext[c][o]:Array.isArray(n.text)&&Array.isArray(n.text[c])&&(w=n.text[c][o]);var M=a.c2p(r.y0+(c+.5)*n.dy),S=r.x0+(o+.5)*n.dx,f=r.y0+(c+.5)*n.dy,P="["+s.slice(0,n.colormodel.length).join(", ")+"]";return[m.extendFlat(p,{index:[c,o],x0:u.c2p(r.x0+o*n.dx),x1:u.c2p(r.x0+(o+1)*n.dx),y0:M,y1:M,color:C,xVal:S,xLabelVal:S,yVal:f,yLabelVal:f,zLabelVal:P,text:w,hovertemplateLabels:{zLabel:P,colorLabel:L,"color[0]Label":C[0]+D[0],"color[1]Label":C[1]+D[1],"color[2]Label":C[2]+D[2],"color[3]Label":C[3]+D[3]}})]}}}},94507:function(R,F,e){R.exports={attributes:e(17230),supplyDefaults:e(13245),calc:e(71113),plot:e(60775),style:e(12826),hoverPoints:e(28749),eventData:e(30835),moduleType:"trace",name:"image",basePlotModule:e(93612),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},60775:function(R,F,e){var i=e(39898),m=e(71828),t=m.strTranslate,y=e(77922),p=e(51877),l=m.isIOS()||m.isSafari()||m.isIE();R.exports=function(r,n,u,a){var o=n.xaxis,c=n.yaxis,s=!(l||r._context._exportedPlot);m.makeTraceGroups(a,u,"im").each(function(b){var g=i.select(this),A=b[0],v=A.trace,h=(v.zsmooth==="fast"||v.zsmooth===!1&&s)&&!v._hasZ&&v._hasSource&&o.type==="linear"&&c.type==="linear";v._realImage=h;var x=A.z,C=A.x0,D=A.y0,L=A.w,w=A.h,M=v.dx,S=v.dy,f,P,E,k,O,G;for(G=0;f===void 0&&G0;)P=o.c2p(C+G*M),G--;for(G=0;k===void 0&&G0;)O=c.c2p(D+G*S),G--;if(Phe[0];if($||Z){var K=f+U/2,Q=k+H/2;ie+="transform:"+t(K+"px",Q+"px")+"scale("+($?-1:1)+","+(Z?-1:1)+")"+t(-K+"px",-Q+"px")+";"}}re.attr("style",ie);var ae=new Promise(function(fe){if(v._hasZ)fe();else if(v._hasSource)if(v._canvas&&v._canvas.el.width===L&&v._canvas.el.height===w&&v._canvas.source===v.source)fe();else{var te=document.createElement("canvas");te.width=L,te.height=w;var ne=te.getContext("2d",{willReadFrequently:!0});v._image=v._image||new Image;var ce=v._image;ce.onload=function(){ne.drawImage(ce,0,0),v._canvas={el:te,source:v.source},fe()},ce.setAttribute("src",v.source)}}).then(function(){var fe,te;if(v._hasZ)te=q(function(oe,de){return x[de][oe]}),fe=te.toDataURL("image/png");else if(v._hasSource)if(h)fe=v.source;else{var ne=v._canvas.el.getContext("2d",{willReadFrequently:!0}),ce=ne.getImageData(0,0,L,w).data;te=q(function(oe,de){var we=4*(de*L+oe);return[ce[we],ce[we+1],ce[we+2],ce[we+3]]}),fe=te.toDataURL("image/png")}re.attr({"xlink:href":fe,height:H,width:U,x:f,y:k})});r._promises.push(ae)})}},12826:function(R,F,e){var i=e(39898);R.exports=function(t){i.select(t).selectAll(".im image").style("opacity",function(y){return y[0].trace.opacity})}},54846:function(R,F,e){var i=e(1426).extendFlat,m=e(1426).extendDeep,t=e(30962).overrideAll,y=e(41940),p=e(22399),l=e(27670).Y,d=e(13838),r=e(44467).templatedArray,n=e(22372),u=e(12663).descriptionOnlyNumbers,a=y({editType:"plot",colorEditType:"plot"}),o={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:p.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},c={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},s=r("step",m({},o,{range:c}));R.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:l({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:i({},a,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:u("value")},font:i({},a,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:u("value")},increasing:{symbol:{valType:"string",dflt:n.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:n.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:n.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:n.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:i({},a,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:m({},o,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:p.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:t({range:c,visible:i({},d.visible,{dflt:!0}),tickmode:d.minor.tickmode,nticks:d.nticks,tick0:d.tick0,dtick:d.dtick,tickvals:d.tickvals,ticktext:d.ticktext,ticks:i({},d.ticks,{dflt:"outside"}),ticklen:d.ticklen,tickwidth:d.tickwidth,tickcolor:d.tickcolor,ticklabelstep:d.ticklabelstep,showticklabels:d.showticklabels,labelalias:d.labelalias,tickfont:y({}),tickangle:d.tickangle,tickformat:d.tickformat,tickformatstops:d.tickformatstops,tickprefix:d.tickprefix,showtickprefix:d.showtickprefix,ticksuffix:d.ticksuffix,showticksuffix:d.showticksuffix,separatethousands:d.separatethousands,exponentformat:d.exponentformat,minexponent:d.minexponent,showexponent:d.showexponent,editType:"plot"},"plot"),steps:s,threshold:{line:{color:i({},o.line.color,{}),width:i({},o.line.width,{dflt:1}),editType:"plot"},thickness:i({},o.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}},15970:function(R,F,e){var i=e(74875);F.name="indicator",F.plot=function(m,t,y,p){i.plotBasePlot(F.name,m,t,y,p)},F.clean=function(m,t,y,p){i.cleanBasePlot(F.name,m,t,y,p)}},24667:function(R){function F(e,i){var m=[],t=i.value;typeof i._lastValue!="number"&&(i._lastValue=i.value);var y=i._lastValue,p=y;return i._hasDelta&&typeof i.delta.reference=="number"&&(p=i.delta.reference),m[0]={y:t,lastY:y,delta:t-p,relativeDelta:(t-p)/p},m}R.exports={calc:F}},84577:function(R){R.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}},94425:function(R,F,e){var i=e(71828),m=e(54846),t=e(27670).c,y=e(44467),p=e(85501),l=e(84577),d=e(26218),r=e(38701),n=e(96115),u=e(89426);function a(c,s,b,g){function A(G,z){return i.coerce(c,s,m,G,z)}t(s,g,A),A("mode"),s._hasNumber=s.mode.indexOf("number")!==-1,s._hasDelta=s.mode.indexOf("delta")!==-1,s._hasGauge=s.mode.indexOf("gauge")!==-1;var v=A("value");s._range=[0,typeof v=="number"?1.5*v:1];var h=new Array(2),x;s._hasNumber&&(A("number.valueformat"),A("number.font.color",g.font.color),A("number.font.family",g.font.family),A("number.font.size"),s.number.font.size===void 0&&(s.number.font.size=l.defaultNumberFontSize,h[0]=!0),A("number.prefix"),A("number.suffix"),x=s.number.font.size);var C;s._hasDelta&&(A("delta.font.color",g.font.color),A("delta.font.family",g.font.family),A("delta.font.size"),s.delta.font.size===void 0&&(s.delta.font.size=(s._hasNumber?.5:1)*(x||l.defaultNumberFontSize),h[1]=!0),A("delta.reference",s.value),A("delta.relative"),A("delta.valueformat",s.delta.relative?"2%":""),A("delta.increasing.symbol"),A("delta.increasing.color"),A("delta.decreasing.symbol"),A("delta.decreasing.color"),A("delta.position"),A("delta.prefix"),A("delta.suffix"),C=s.delta.font.size),s._scaleNumbers=(!s._hasNumber||h[0])&&(!s._hasDelta||h[1])||!1,A("title.font.color",g.font.color),A("title.font.family",g.font.family),A("title.font.size",.25*(x||C||l.defaultNumberFontSize)),A("title.text");var D,L,w,M;function S(G,z){return i.coerce(D,L,m.gauge,G,z)}function f(G,z){return i.coerce(w,M,m.gauge.axis,G,z)}if(s._hasGauge){D=c.gauge,D||(D={}),L=y.newContainer(s,"gauge"),S("shape");var P=s._isBullet=s.gauge.shape==="bullet";P||A("title.align","center");var E=s._isAngular=s.gauge.shape==="angular";E||A("align","center"),S("bgcolor",g.paper_bgcolor),S("borderwidth"),S("bordercolor"),S("bar.color"),S("bar.line.color"),S("bar.line.width");var k=l.valueThickness*(s.gauge.shape==="bullet"?.5:1);S("bar.thickness",k),p(D,L,{name:"steps",handleItemDefaults:o}),S("threshold.value"),S("threshold.thickness"),S("threshold.line.width"),S("threshold.line.color"),w={},D&&(w=D.axis||{}),M=y.newContainer(L,"axis"),f("visible"),s._range=f("range",s._range);var O={outerTicks:!0};d(w,M,f,"linear"),u(w,M,f,"linear",O),n(w,M,f,"linear",O),r(w,M,f,O)}else A("title.align","center"),A("align","center"),s._isAngular=s._isBullet=!1;s._length=null}function o(c,s){function b(g,A){return i.coerce(c,s,m.gauge.steps,g,A)}b("color"),b("line.color"),b("line.width"),b("range"),b("thickness")}R.exports={supplyDefaults:a}},15154:function(R,F,e){R.exports={moduleType:"trace",name:"indicator",basePlotModule:e(15970),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:e(54846),supplyDefaults:e(94425).supplyDefaults,calc:e(24667).calc,plot:e(75634),meta:{}}},75634:function(R,F,e){var i=e(39898),m=e(81684).sX,t=e(81684).k4,y=e(71828),p=y.strScale,l=y.strTranslate,d=y.rad2deg,r=e(18783).MID_SHIFT,n=e(91424),u=e(84577),a=e(63893),o=e(89298),c=e(71453),s=e(52830),b=e(13838),g=e(7901),A={left:"start",center:"middle",right:"end"},v={left:0,center:.5,right:1},h=/[yzafpnµmkMGTPEZY]/;function x(O){return O&&O.duration>0}R.exports=function(G,z,U,H){var B=G._fullLayout,W;x(U)&&H&&(W=H()),y.makeTraceGroups(B._indicatorlayer,z,"trace").each(function(q){var re=q[0],ie=re.trace,le=i.select(this),he=ie._hasGauge,$=ie._isAngular,Z=ie._isBullet,K=ie.domain,Q={w:B._size.w*(K.x[1]-K.x[0]),h:B._size.h*(K.y[1]-K.y[0]),l:B._size.l+B._size.w*K.x[0],r:B._size.r+B._size.w*(1-K.x[1]),t:B._size.t+B._size.h*(1-K.y[1]),b:B._size.b+B._size.h*K.y[0]},ae=Q.l+Q.w/2,fe=Q.t+Q.h/2,te=Math.min(Q.w/2,Q.h),ne=u.innerRadius*te,ce,oe,de,we=ie.align||"center";if(oe=fe,!he)ce=Q.l+v[we]*Q.w,de=function(_e){return f(_e,Q.w,Q.h)};else if($&&(ce=ae,oe=fe+te/2,de=function(_e){return P(_e,.9*ne)}),Z){var Se=u.bulletPadding,Te=1-u.bulletNumberDomainSize+Se;ce=Q.l+(Te+(1-Te)*v[we])*Q.w,de=function(_e){return f(_e,(u.bulletNumberDomainSize-Se)*Q.w,Q.h)}}L(G,le,q,{numbersX:ce,numbersY:oe,numbersScaler:de,transitionOpts:U,onComplete:W});var Fe,Ie;he&&(Fe={range:ie.gauge.axis.range,color:ie.gauge.bgcolor,line:{color:ie.gauge.bordercolor,width:0},thickness:1},Ie={range:ie.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:ie.gauge.bordercolor,width:ie.gauge.borderwidth},thickness:1});var Me=le.selectAll("g.angular").data($?q:[]);Me.exit().remove();var Ae=le.selectAll("g.angularaxis").data($?q:[]);Ae.exit().remove(),$&&D(G,le,q,{radius:te,innerRadius:ne,gauge:Me,layer:Ae,size:Q,gaugeBg:Fe,gaugeOutline:Ie,transitionOpts:U,onComplete:W});var De=le.selectAll("g.bullet").data(Z?q:[]);De.exit().remove();var ke=le.selectAll("g.bulletaxis").data(Z?q:[]);ke.exit().remove(),Z&&C(G,le,q,{gauge:De,layer:ke,size:Q,gaugeBg:Fe,gaugeOutline:Ie,transitionOpts:U,onComplete:W});var We=le.selectAll("text.title").data(q);We.exit().remove(),We.enter().append("text").classed("title",!0),We.attr("text-anchor",function(){return Z?A.right:A[ie.title.align]}).text(ie.title.text).call(n.font,ie.title.font).call(a.convertToTspans,G),We.attr("transform",function(){var _e=Q.l+Q.w*v[ie.title.align],Ye,Pe=u.titlePadding,Ve=n.bBox(We.node());if(he){if($)if(ie.gauge.axis.visible){var Ze=n.bBox(Ae.node());Ye=Ze.top-Pe-Ve.bottom}else Ye=Q.t+Q.h/2-te/2-Ve.bottom-Pe;Z&&(Ye=oe-(Ve.top+Ve.bottom)/2,_e=Q.l-u.bulletPadding*Q.w)}else Ye=ie._numbersTop-Pe-Ve.bottom;return l(_e,Ye)})})};function C(O,G,z,U){var H=z[0].trace,B=U.gauge,W=U.layer,q=U.gaugeBg,re=U.gaugeOutline,ie=U.size,le=H.domain,he=U.transitionOpts,$=U.onComplete,Z,K,Q,ae,fe;B.enter().append("g").classed("bullet",!0),B.attr("transform",l(ie.l,ie.t)),W.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),W.selectAll("g.xbulletaxistick,path,text").remove();var te=ie.h,ne=H.gauge.bar.thickness*te,ce=le.x[0],oe=le.x[0]+(le.x[1]-le.x[0])*(H._hasNumber||H._hasDelta?1-u.bulletNumberDomainSize:1);Z=S(O,H.gauge.axis),Z._id="xbulletaxis",Z.domain=[ce,oe],Z.setScale(),K=o.calcTicks(Z),Q=o.makeTransTickFn(Z),ae=o.getTickSigns(Z)[2],fe=ie.t+ie.h,Z.visible&&(o.drawTicks(O,Z,{vals:Z.ticks==="inside"?o.clipEnds(Z,K):K,layer:W,path:o.makeTickPath(Z,fe,ae),transFn:Q}),o.drawLabels(O,Z,{vals:K,layer:W,transFn:Q,labelFns:o.makeLabelFns(Z,fe)}));function de(Ae){Ae.attr("width",function(De){return Math.max(0,Z.c2p(De.range[1])-Z.c2p(De.range[0]))}).attr("x",function(De){return Z.c2p(De.range[0])}).attr("y",function(De){return .5*(1-De.thickness)*te}).attr("height",function(De){return De.thickness*te})}var we=[q].concat(H.gauge.steps),Se=B.selectAll("g.bg-bullet").data(we);Se.enter().append("g").classed("bg-bullet",!0).append("rect"),Se.select("rect").call(de).call(w),Se.exit().remove();var Te=B.selectAll("g.value-bullet").data([H.gauge.bar]);Te.enter().append("g").classed("value-bullet",!0).append("rect"),Te.select("rect").attr("height",ne).attr("y",(te-ne)/2).call(w),x(he)?Te.select("rect").transition().duration(he.duration).ease(he.easing).each("end",function(){$&&$()}).each("interrupt",function(){$&&$()}).attr("width",Math.max(0,Z.c2p(Math.min(H.gauge.axis.range[1],z[0].y)))):Te.select("rect").attr("width",typeof z[0].y=="number"?Math.max(0,Z.c2p(Math.min(H.gauge.axis.range[1],z[0].y))):0),Te.exit().remove();var Fe=z.filter(function(){return H.gauge.threshold.value||H.gauge.threshold.value===0}),Ie=B.selectAll("g.threshold-bullet").data(Fe);Ie.enter().append("g").classed("threshold-bullet",!0).append("line"),Ie.select("line").attr("x1",Z.c2p(H.gauge.threshold.value)).attr("x2",Z.c2p(H.gauge.threshold.value)).attr("y1",(1-H.gauge.threshold.thickness)/2*te).attr("y2",(1-(1-H.gauge.threshold.thickness)/2)*te).call(g.stroke,H.gauge.threshold.line.color).style("stroke-width",H.gauge.threshold.line.width),Ie.exit().remove();var Me=B.selectAll("g.gauge-outline").data([re]);Me.enter().append("g").classed("gauge-outline",!0).append("rect"),Me.select("rect").call(de).call(w),Me.exit().remove()}function D(O,G,z,U){var H=z[0].trace,B=U.size,W=U.radius,q=U.innerRadius,re=U.gaugeBg,ie=U.gaugeOutline,le=[B.l+B.w/2,B.t+B.h/2+W/2],he=U.gauge,$=U.layer,Z=U.transitionOpts,K=U.onComplete,Q=Math.PI/2;function ae(Ke){var lt=H.gauge.axis.range[0],vt=H.gauge.axis.range[1],mt=(Ke-lt)/(vt-lt)*Math.PI-Q;return mt<-Q?-Q:mt>Q?Q:mt}function fe(Ke){return i.svg.arc().innerRadius((q+W)/2-Ke/2*(W-q)).outerRadius((q+W)/2+Ke/2*(W-q)).startAngle(-Q)}function te(Ke){Ke.attr("d",function(lt){return fe(lt.thickness).startAngle(ae(lt.range[0])).endAngle(ae(lt.range[1]))()})}var ne,ce,oe,de;he.enter().append("g").classed("angular",!0),he.attr("transform",l(le[0],le[1])),$.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),$.selectAll("g.xangularaxistick,path,text").remove(),ne=S(O,H.gauge.axis),ne.type="linear",ne.range=H.gauge.axis.range,ne._id="xangularaxis",ne.ticklabeloverflow="allow",ne.setScale();var we=function(Ke){return(ne.range[0]-Ke.x)/(ne.range[1]-ne.range[0])*Math.PI+Math.PI},Se={},Te=o.makeLabelFns(ne,0),Fe=Te.labelStandoff;Se.xFn=function(Ke){var lt=we(Ke);return Math.cos(lt)*Fe},Se.yFn=function(Ke){var lt=we(Ke),vt=Math.sin(lt)>0?.2:1;return-Math.sin(lt)*(Fe+Ke.fontSize*vt)+Math.abs(Math.cos(lt))*(Ke.fontSize*r)},Se.anchorFn=function(Ke){var lt=we(Ke),vt=Math.cos(lt);return Math.abs(vt)<.1?"middle":vt>0?"start":"end"},Se.heightFn=function(Ke,lt,vt){var mt=we(Ke);return-.5*(1+Math.sin(mt))*vt};var Ie=function(Ke){return l(le[0]+W*Math.cos(Ke),le[1]-W*Math.sin(Ke))};oe=function(Ke){return Ie(we(Ke))};var Me=function(Ke){var lt=we(Ke);return Ie(lt)+"rotate("+-d(lt)+")"};if(ce=o.calcTicks(ne),de=o.getTickSigns(ne)[2],ne.visible){de=ne.ticks==="inside"?-1:1;var Ae=(ne.linewidth||1)/2;o.drawTicks(O,ne,{vals:ce,layer:$,path:"M"+de*Ae+",0h"+de*ne.ticklen,transFn:Me}),o.drawLabels(O,ne,{vals:ce,layer:$,transFn:oe,labelFns:Se})}var De=[re].concat(H.gauge.steps),ke=he.selectAll("g.bg-arc").data(De);ke.enter().append("g").classed("bg-arc",!0).append("path"),ke.select("path").call(te).call(w),ke.exit().remove();var We=fe(H.gauge.bar.thickness),_e=he.selectAll("g.value-arc").data([H.gauge.bar]);_e.enter().append("g").classed("value-arc",!0).append("path");var Ye=_e.select("path");x(Z)?(Ye.transition().duration(Z.duration).ease(Z.easing).each("end",function(){K&&K()}).each("interrupt",function(){K&&K()}).attrTween("d",M(We,ae(z[0].lastY),ae(z[0].y))),H._lastValue=z[0].y):Ye.attr("d",typeof z[0].y=="number"?We.endAngle(ae(z[0].y)):"M0,0Z"),Ye.call(w),_e.exit().remove(),De=[];var Pe=H.gauge.threshold.value;(Pe||Pe===0)&&De.push({range:[Pe,Pe],color:H.gauge.threshold.color,line:{color:H.gauge.threshold.line.color,width:H.gauge.threshold.line.width},thickness:H.gauge.threshold.thickness});var Ve=he.selectAll("g.threshold-arc").data(De);Ve.enter().append("g").classed("threshold-arc",!0).append("path"),Ve.select("path").call(te).call(w),Ve.exit().remove();var Ze=he.selectAll("g.gauge-outline").data([ie]);Ze.enter().append("g").classed("gauge-outline",!0).append("path"),Ze.select("path").call(te).call(w),Ze.exit().remove()}function L(O,G,z,U){var H=z[0].trace,B=U.numbersX,W=U.numbersY,q=H.align||"center",re=A[q],ie=U.transitionOpts,le=U.onComplete,he=y.ensureSingle(G,"g","numbers"),$,Z,K,Q=[];H._hasNumber&&Q.push("number"),H._hasDelta&&(Q.push("delta"),H.delta.position==="left"&&Q.reverse());var ae=he.selectAll("text").data(Q);ae.enter().append("text"),ae.attr("text-anchor",function(){return re}).attr("class",function(Ie){return Ie}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),ae.exit().remove();function fe(Ie,Me,Ae,De){if(Ie.match("s")&&Ae>=0!=De>=0&&!Me(Ae).slice(-1).match(h)&&!Me(De).slice(-1).match(h)){var ke=Ie.slice().replace("s","f").replace(/\d+/,function(_e){return parseInt(_e)-1}),We=S(O,{tickformat:ke});return function(_e){return Math.abs(_e)<1?o.tickText(We,_e).text:Me(_e)}}else return Me}function te(){var Ie=S(O,{tickformat:H.number.valueformat},H._range);Ie.setScale(),o.prepTicks(Ie);var Me=function(_e){return o.tickText(Ie,_e).text},Ae=H.number.suffix,De=H.number.prefix,ke=he.select("text.number");function We(){var _e=typeof z[0].y=="number"?De+Me(z[0].y)+Ae:"-";ke.text(_e).call(n.font,H.number.font).call(a.convertToTspans,O)}return x(ie)?ke.transition().duration(ie.duration).ease(ie.easing).each("end",function(){We(),le&&le()}).each("interrupt",function(){We(),le&&le()}).attrTween("text",function(){var _e=i.select(this),Ye=t(z[0].lastY,z[0].y);H._lastValue=z[0].y;var Pe=fe(H.number.valueformat,Me,z[0].lastY,z[0].y);return function(Ve){_e.text(De+Pe(Ye(Ve))+Ae)}}):We(),$=E(De+Me(z[0].y)+Ae,H.number.font,re,O),ke}function ne(){var Ie=S(O,{tickformat:H.delta.valueformat},H._range);Ie.setScale(),o.prepTicks(Ie);var Me=function(Ve){return o.tickText(Ie,Ve).text},Ae=H.delta.suffix,De=H.delta.prefix,ke=function(Ve){var Ze=H.delta.relative?Ve.relativeDelta:Ve.delta;return Ze},We=function(Ve,Ze){return Ve===0||typeof Ve!="number"||isNaN(Ve)?"-":(Ve>0?H.delta.increasing.symbol:H.delta.decreasing.symbol)+De+Ze(Ve)+Ae},_e=function(Ve){return Ve.delta>=0?H.delta.increasing.color:H.delta.decreasing.color};H._deltaLastValue===void 0&&(H._deltaLastValue=ke(z[0]));var Ye=he.select("text.delta");Ye.call(n.font,H.delta.font).call(g.fill,_e({delta:H._deltaLastValue}));function Pe(){Ye.text(We(ke(z[0]),Me)).call(g.fill,_e(z[0])).call(a.convertToTspans,O)}return x(ie)?Ye.transition().duration(ie.duration).ease(ie.easing).tween("text",function(){var Ve=i.select(this),Ze=ke(z[0]),Ke=H._deltaLastValue,lt=fe(H.delta.valueformat,Me,Ke,Ze),vt=t(Ke,Ze);return H._deltaLastValue=Ze,function(mt){Ve.text(We(vt(mt),lt)),Ve.call(g.fill,_e({delta:vt(mt)}))}}).each("end",function(){Pe(),le&&le()}).each("interrupt",function(){Pe(),le&&le()}):Pe(),Z=E(We(ke(z[0]),Me),H.delta.font,re,O),Ye}var ce=H.mode+H.align,oe;if(H._hasDelta&&(oe=ne(),ce+=H.delta.position+H.delta.font.size+H.delta.font.family+H.delta.valueformat,ce+=H.delta.increasing.symbol+H.delta.decreasing.symbol,K=Z),H._hasNumber&&(te(),ce+=H.number.font.size+H.number.font.family+H.number.valueformat+H.number.suffix+H.number.prefix,K=$),H._hasDelta&&H._hasNumber){var de=[($.left+$.right)/2,($.top+$.bottom)/2],we=[(Z.left+Z.right)/2,(Z.top+Z.bottom)/2],Se,Te,Fe=.75*H.delta.font.size;H.delta.position==="left"&&(Se=k(H,"deltaPos",0,-1*($.width*v[H.align]+Z.width*(1-v[H.align])+Fe),ce,Math.min),Te=de[1]-we[1],K={width:$.width+Z.width+Fe,height:Math.max($.height,Z.height),left:Z.left+Se,right:$.right,top:Math.min($.top,Z.top+Te),bottom:Math.max($.bottom,Z.bottom+Te)}),H.delta.position==="right"&&(Se=k(H,"deltaPos",0,$.width*(1-v[H.align])+Z.width*v[H.align]+Fe,ce,Math.max),Te=de[1]-we[1],K={width:$.width+Z.width+Fe,height:Math.max($.height,Z.height),left:$.left,right:Z.right+Se,top:Math.min($.top,Z.top+Te),bottom:Math.max($.bottom,Z.bottom+Te)}),H.delta.position==="bottom"&&(Se=null,Te=Z.height,K={width:Math.max($.width,Z.width),height:$.height+Z.height,left:Math.min($.left,Z.left),right:Math.max($.right,Z.right),top:$.bottom-$.height,bottom:$.bottom+Z.height}),H.delta.position==="top"&&(Se=null,Te=$.top,K={width:Math.max($.width,Z.width),height:$.height+Z.height,left:Math.min($.left,Z.left),right:Math.max($.right,Z.right),top:$.bottom-$.height-Z.height,bottom:$.bottom}),oe.attr({dx:Se,dy:Te})}(H._hasNumber||H._hasDelta)&&he.attr("transform",function(){var Ie=U.numbersScaler(K);ce+=Ie[2];var Me=k(H,"numbersScale",1,Ie[0],ce,Math.min),Ae;H._scaleNumbers||(Me=1),H._isAngular?Ae=W-Me*K.bottom:Ae=W-Me*(K.top+K.bottom)/2,H._numbersTop=Me*K.top+Ae;var De=K[q];q==="center"&&(De=(K.left+K.right)/2);var ke=B-Me*De;return ke=k(H,"numbersTranslate",0,ke,ce,Math.max),l(ke,Ae)+p(Me)})}function w(O){O.each(function(G){g.stroke(i.select(this),G.line.color)}).each(function(G){g.fill(i.select(this),G.color)}).style("stroke-width",function(G){return G.line.width})}function M(O,G,z){return function(){var U=m(G,z);return function(H){return O.endAngle(U(H))()}}}function S(O,G,z){var U=O._fullLayout,H=y.extendFlat({type:"linear",ticks:"outside",range:z,showline:!0},G),B={type:"linear",_id:"x"+G._id},W={letter:"x",font:U.font,noHover:!0,noTickson:!0};function q(re,ie){return y.coerce(H,B,b,re,ie)}return c(H,B,q,W,U),s(H,B,q,W),B}function f(O,G,z){var U=Math.min(G/O.width,z/O.height);return[U,O,G+"x"+z]}function P(O,G){var z=Math.sqrt(O.width/2*(O.width/2)+O.height*O.height),U=G/z;return[U,O,G]}function E(O,G,z,U){var H=document.createElementNS("http://www.w3.org/2000/svg","text"),B=i.select(H);return B.text(O).attr("x",0).attr("y",0).attr("text-anchor",z).attr("data-unformatted",O).call(a.convertToTspans,U).call(n.font,G),n.bBox(B.node())}function k(O,G,z,U,H,B){var W="_cache"+G;O[W]&&O[W].key===H||(O[W]={key:H,value:z});var q=y.aggNums(B,null,[O[W].value,U],2);return O[W].value=q,q}},16249:function(R,F,e){var i=e(50693),m=e(12663).axisHoverFormat,t=e(5386).f,y=e(2418),p=e(9012),l=e(1426).extendFlat,d=e(30962).overrideAll;function r(a){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function n(a){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var u=R.exports=d(l({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:r(),y:r(),z:r()},caps:{x:n(),y:n(),z:n()},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:t(),xhoverformat:m("x"),yhoverformat:m("y"),zhoverformat:m("z"),valuehoverformat:m("value",1),showlegend:l({},p.showlegend,{dflt:!1})},i("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:y.opacity,lightposition:y.lightposition,lighting:y.lighting,flatshading:y.flatshading,contour:y.contour,hoverinfo:l({},p.hoverinfo)}),"calc","nested");u.flatshading.dflt=!0,u.lighting.facenormalsepsilon.dflt=0,u.x.editType=u.y.editType=u.z.editType=u.value.editType="calc+clearAxisTypes",u.transforms=void 0},56959:function(R,F,e){var i=e(78803),m=e(88489).processGrid,t=e(88489).filter;R.exports=function(p,l){l._len=Math.min(l.x.length,l.y.length,l.z.length,l.value.length),l._x=t(l.x,l._len),l._y=t(l.y,l._len),l._z=t(l.z,l._len),l._value=t(l.value,l._len);var d=m(l);l._gridFill=d.fill,l._Xs=d.Xs,l._Ys=d.Ys,l._Zs=d.Zs,l._len=d.len;for(var r=1/0,n=-1/0,u=0;u0;s--){var b=Math.min(c[s],c[s-1]),g=Math.max(c[s],c[s-1]);if(g>b&&b-1}function te(rt,ot){return rt===null?ot:rt}function ne(rt,ot,qe){re();var Oe=[ot],Ce=[qe];if(K>=1)Oe=[ot],Ce=[qe];else if(K>0){var pe=ae(ot,qe);Oe=pe.xyzv,Ce=pe.abc}for(var be=0;be-1?qe[He]:q(st,ct,bt);Ut>-1?Re[He]=Ut:Re[He]=le(st,ct,bt,te(rt,Lt))}he(Re[0],Re[1],Re[2])}}function ce(rt,ot,qe){var Oe=function(Ce,pe,be){ne(rt,[ot[Ce],ot[pe],ot[be]],[qe[Ce],qe[pe],qe[be]])};Oe(0,1,2),Oe(2,3,0)}function oe(rt,ot,qe){var Oe=function(Ce,pe,be){ne(rt,[ot[Ce],ot[pe],ot[be]],[qe[Ce],qe[pe],qe[be]])};Oe(0,1,2),Oe(3,0,1),Oe(2,3,0),Oe(1,2,3)}function de(rt,ot,qe,Oe){var Ce=rt[3];CeOe&&(Ce=Oe);for(var pe=(rt[3]-Ce)/(rt[3]-ot[3]+1e-9),be=[],Re=0;Re<4;Re++)be[Re]=(1-pe)*rt[Re]+pe*ot[Re];return be}function we(rt,ot,qe){return rt>=ot&&rt<=qe}function Se(rt){var ot=.001*(z-G);return rt>=G-ot&&rt<=z+ot}function Te(rt){for(var ot=[],qe=0;qe<4;qe++){var Oe=rt[qe];ot.push([o._x[Oe],o._y[Oe],o._z[Oe],o._value[Oe]])}return ot}var Fe=3;function Ie(rt,ot,qe,Oe,Ce,pe){pe||(pe=1),qe=[-1,-1,-1];var be=!1,Re=[we(ot[0][3],Oe,Ce),we(ot[1][3],Oe,Ce),we(ot[2][3],Oe,Ce)];if(!Re[0]&&!Re[1]&&!Re[2])return!1;var He=function(ct,bt,Lt){return Se(bt[0][3])&&Se(bt[1][3])&&Se(bt[2][3])?(ne(ct,bt,Lt),!0):peRe?[k,pe]:[pe,O];lt(ot,He[0],He[1])}}var st=[[Math.min(G,O),Math.max(G,O)],[Math.min(k,z),Math.max(k,z)]];["x","y","z"].forEach(function(ct){for(var bt=[],Lt=0;Lt0&&(Or.push(Yt.id),ct==="x"?xt.push([Yt.distRatio,0,0]):ct==="y"?xt.push([0,Yt.distRatio,0]):xt.push([0,0,Yt.distRatio]))}else ct==="x"?lr=et(1,M-1):ct==="y"?lr=et(1,S-1):lr=et(1,f-1);Or.length>0&&(ct==="x"?bt[Ut]=vt(rt,Or,Gt,Ft,xt,bt[Ut]):ct==="y"?bt[Ut]=mt(rt,Or,Gt,Ft,xt,bt[Ut]):bt[Ut]=Et(rt,Or,Gt,Ft,xt,bt[Ut]),Ut++),lr.length>0&&(ct==="x"?bt[Ut]=Ye(rt,lr,Gt,Ft,bt[Ut]):ct==="y"?bt[Ut]=Pe(rt,lr,Gt,Ft,bt[Ut]):bt[Ut]=Ve(rt,lr,Gt,Ft,bt[Ut]),Ut++)}var br=o.caps[ct];br.show&&br.fill&&(Q(br.fill),ct==="x"?bt[Ut]=Ye(rt,[0,M-1],Gt,Ft,bt[Ut]):ct==="y"?bt[Ut]=Pe(rt,[0,S-1],Gt,Ft,bt[Ut]):bt[Ut]=Ve(rt,[0,f-1],Gt,Ft,bt[Ut]),Ut++)}}),h===0&&ie(),o._meshX=U,o._meshY=H,o._meshZ=B,o._meshIntensity=W,o._Xs=D,o._Ys=L,o._Zs=w}return Be(),o}function a(o,c){var s=o.glplot.gl,b=i({gl:s}),g=new d(o,b,c.uid);return b._trace=g,g.update(c),o.glplot.add(b),g}R.exports={findNearestOnAxis:l,generateIsoMeshes:u,createIsosurfaceTrace:a}},82738:function(R,F,e){var i=e(71828),m=e(73972),t=e(16249),y=e(1586);function p(d,r,n,u){function a(o,c){return i.coerce(d,r,t,o,c)}l(d,r,n,u,a)}function l(d,r,n,u,a){var o=a("isomin"),c=a("isomax");c!=null&&o!==void 0&&o!==null&&o>c&&(r.isomin=null,r.isomax=null);var s=a("x"),b=a("y"),g=a("z"),A=a("value");if(!s||!s.length||!b||!b.length||!g||!g.length||!A||!A.length){r.visible=!1;return}var v=m.getComponentMethod("calendars","handleTraceDefaults");v(d,r,["x","y","z"],u),a("valuehoverformat"),["x","y","z"].forEach(function(D){a(D+"hoverformat");var L="caps."+D,w=a(L+".show");w&&a(L+".fill");var M="slices."+D,S=a(M+".show");S&&(a(M+".fill"),a(M+".locations"))});var h=a("spaceframe.show");h&&a("spaceframe.fill");var x=a("surface.show");x&&(a("surface.count"),a("surface.fill"),a("surface.pattern"));var C=a("contour.show");C&&(a("contour.color"),a("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(D){a(D)}),y(d,r,u,a,{prefix:"",cLetter:"c"}),r._length=null}R.exports={supplyDefaults:p,supplyIsoDefaults:l}},64943:function(R,F,e){R.exports={attributes:e(16249),supplyDefaults:e(82738).supplyDefaults,calc:e(56959),colorbar:{min:"cmin",max:"cmax"},plot:e(22674).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:e(58547),categories:["gl3d","showLegend"],meta:{}}},2418:function(R,F,e){var i=e(50693),m=e(12663).axisHoverFormat,t=e(5386).f,y=e(54532),p=e(9012),l=e(1426).extendFlat;R.exports=l({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:t({editType:"calc"}),xhoverformat:m("x"),yhoverformat:m("y"),zhoverformat:m("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},i("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:y.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:l({},y.contours.x.show,{}),color:y.contours.x.color,width:y.contours.x.width,editType:"calc"},lightposition:{x:l({},y.lightposition.x,{dflt:1e5}),y:l({},y.lightposition.y,{dflt:1e5}),z:l({},y.lightposition.z,{dflt:0}),editType:"calc"},lighting:l({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},y.lighting),hoverinfo:l({},p.hoverinfo,{editType:"calc"}),showlegend:l({},p.showlegend,{dflt:!1})})},82932:function(R,F,e){var i=e(78803);R.exports=function(t,y){y.intensity&&i(t,y,{vals:y.intensity,containerStr:"",cLetter:"c"})}},91134:function(R,F,e){var i=e(9330).gl_mesh3d,m=e(9330).delaunay_triangulate,t=e(9330).alpha_shape,y=e(9330).convex_hull,p=e(81697).parseColorScale,l=e(78614),d=e(21081).extractOpts,r=e(90060);function n(A,v,h){this.scene=A,this.uid=h,this.mesh=v,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var u=n.prototype;u.handlePick=function(A){if(A.object===this.mesh){var v=A.index=A.data.index;A.data._cellCenter?A.traceCoordinate=A.data.dataCoordinate:A.traceCoordinate=[this.data.x[v],this.data.y[v],this.data.z[v]];var h=this.data.hovertext||this.data.text;return Array.isArray(h)&&h[v]!==void 0?A.textLabel=h[v]:h&&(A.textLabel=h),!0}};function a(A){for(var v=[],h=A.length,x=0;x=v-.5)return!1;return!0}u.update=function(A){var v=this.scene,h=v.fullSceneLayout;this.data=A;var x=A.x.length,C=r(o(h.xaxis,A.x,v.dataScale[0],A.xcalendar),o(h.yaxis,A.y,v.dataScale[1],A.ycalendar),o(h.zaxis,A.z,v.dataScale[2],A.zcalendar)),D;if(A.i&&A.j&&A.k){if(A.i.length!==A.j.length||A.j.length!==A.k.length||!b(A.i,x)||!b(A.j,x)||!b(A.k,x))return;D=r(c(A.i),c(A.j),c(A.k))}else A.alphahull===0?D=y(C):A.alphahull>0?D=t(A.alphahull,C):D=s(A.delaunayaxis,C);var L={positions:C,cells:D,lightPosition:[A.lightposition.x,A.lightposition.y,A.lightposition.z],ambient:A.lighting.ambient,diffuse:A.lighting.diffuse,specular:A.lighting.specular,roughness:A.lighting.roughness,fresnel:A.lighting.fresnel,vertexNormalsEpsilon:A.lighting.vertexnormalsepsilon,faceNormalsEpsilon:A.lighting.facenormalsepsilon,opacity:A.opacity,contourEnable:A.contour.show,contourColor:l(A.contour.color).slice(0,3),contourWidth:A.contour.width,useFacetNormals:A.flatshading};if(A.intensity){var w=d(A);this.color="#fff";var M=A.intensitymode;L[M+"Intensity"]=A.intensity,L[M+"IntensityBounds"]=[w.min,w.max],L.colormap=p(A)}else A.vertexcolor?(this.color=A.vertexcolor[0],L.vertexColors=a(A.vertexcolor)):A.facecolor?(this.color=A.facecolor[0],L.cellColors=a(A.facecolor)):(this.color=A.color,L.meshColor=l(A.color));this.mesh.update(L)},u.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function g(A,v){var h=A.glplot.gl,x=i({gl:h}),C=new n(A,x,v.uid);return x._trace=C,C.update(v),A.glplot.add(x),C}R.exports=g},58669:function(R,F,e){var i=e(73972),m=e(71828),t=e(1586),y=e(2418);R.exports=function(l,d,r,n){function u(b,g){return m.coerce(l,d,y,b,g)}function a(b){var g=b.map(function(A){var v=u(A);return v&&m.isArrayOrTypedArray(v)?v:null});return g.every(function(A){return A&&A.length===g[0].length})&&g}var o=a(["x","y","z"]);if(!o){d.visible=!1;return}if(a(["i","j","k"]),d.i&&(!d.j||!d.k)||d.j&&(!d.k||!d.i)||d.k&&(!d.i||!d.j)){d.visible=!1;return}var c=i.getComponentMethod("calendars","handleTraceDefaults");c(l,d,["x","y","z"],n),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(b){u(b)});var s=u("contour.show");s&&(u("contour.color"),u("contour.width")),"intensity"in l?(u("intensity"),u("intensitymode"),t(l,d,n,u,{prefix:"",cLetter:"c"})):(d.showscale=!1,"facecolor"in l?u("facecolor"):"vertexcolor"in l?u("vertexcolor"):u("color",r)),u("text"),u("hovertext"),u("hovertemplate"),u("xhoverformat"),u("yhoverformat"),u("zhoverformat"),d._length=null}},21164:function(R,F,e){R.exports={attributes:e(2418),supplyDefaults:e(58669),calc:e(82932),colorbar:{min:"cmin",max:"cmax"},plot:e(91134),moduleType:"trace",name:"mesh3d",basePlotModule:e(58547),categories:["gl3d","showLegend"],meta:{}}},2522:function(R,F,e){var i=e(71828).extendFlat,m=e(82196),t=e(12663).axisHoverFormat,y=e(79952).P,p=e(77914),l=e(22372),d=l.INCREASING.COLOR,r=l.DECREASING.COLOR,n=m.line;function u(a){return{line:{color:i({},n.color,{dflt:a}),width:n.width,dash:y,editType:"style"},editType:"style"}}R.exports={xperiod:m.xperiod,xperiod0:m.xperiod0,xperiodalignment:m.xperiodalignment,xhoverformat:t("x"),yhoverformat:t("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:i({},n.width,{}),dash:i({},y,{}),editType:"style"},increasing:u(d),decreasing:u(r),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:i({},p.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}})}},3485:function(R,F,e){var i=e(71828),m=i._,t=e(89298),y=e(42973),p=e(50606).BADNUM;function l(u,a){var o=t.getFromId(u,a.xaxis),c=t.getFromId(u,a.yaxis),s=n(u,o,a),b=a._minDiff;a._minDiff=null;var g=a._origX;a._origX=null;var A=a._xcalc;a._xcalc=null;var v=r(u,a,g,A,c,d);return a._extremes[o._id]=t.findExtremes(o,A,{vpad:b/2}),v.length?(i.extendFlat(v[0].t,{wHover:b/2,tickLen:s}),v):[{t:{empty:!0}}]}function d(u,a,o,c){return{o:u,h:a,l:o,c}}function r(u,a,o,c,s,b){for(var g=s.makeCalcdata(a,"open"),A=s.makeCalcdata(a,"high"),v=s.makeCalcdata(a,"low"),h=s.makeCalcdata(a,"close"),x=Array.isArray(a.text),C=Array.isArray(a.hovertext),D=!0,L=null,w=!!a.xperiodalignment,M=[],S=0;SL):D=O>P,L=O;var G=b(P,E,k,O);G.pos=f,G.yc=(P+O)/2,G.i=S,G.dir=D?"increasing":"decreasing",G.x=G.pos,G.y=[k,E],w&&(G.orig_p=o[S]),x&&(G.tx=a.text[S]),C&&(G.htx=a.hovertext[S]),M.push(G)}else M.push({pos:f,empty:!0})}return a._extremes[s._id]=t.findExtremes(s,i.concat(v,A),{padded:!0}),M.length&&(M[0].t={labels:{open:m(u,"open:")+" ",high:m(u,"high:")+" ",low:m(u,"low:")+" ",close:m(u,"close:")+" "}}),M}function n(u,a,o){var c=o._minDiff;if(!c){var s=u._fullData,b=[];c=1/0;var g;for(g=0;g"+h.labels[O]+i.hoverLabelText(A,G,v.yhoverformat)):(U=m.extendFlat({},C),U.y0=U.y1=z,U.yLabelVal=G,U.yLabel=h.labels[O]+i.hoverLabelText(A,G,v.yhoverformat),U.name="",x.push(U),E[G]=U)}return x}function a(o,c,s,b){var g=o.cd,A=o.ya,v=g[0].trace,h=g[0].t,x=n(o,c,s,b);if(!x)return[];var C=x.index,D=g[C],L=x.index=D.i,w=D.dir;function M(G){return h.labels[G]+i.hoverLabelText(A,v[G][L],v.yhoverformat)}var S=D.hi||v.hoverinfo,f=S.split("+"),P=S==="all",E=P||f.indexOf("y")!==-1,k=P||f.indexOf("text")!==-1,O=E?[M("open"),M("high"),M("low"),M("close")+" "+d[w]]:[];return k&&p(D,v,O),x.extraText=O.join("
"),x.y0=x.y1=A.c2p(D.yc,!0),[x]}R.exports={hoverPoints:r,hoverSplit:u,hoverOnPoints:a}},54186:function(R,F,e){R.exports={moduleType:"trace",name:"ohlc",basePlotModule:e(93612),categories:["cartesian","svg","showLegend"],meta:{},attributes:e(2522),supplyDefaults:e(16169),calc:e(3485).calc,plot:e(72314),style:e(53101),hoverPoints:e(66449).hoverPoints,selectPoints:e(67324)}},14555:function(R,F,e){var i=e(73972),m=e(71828);R.exports=function(y,p,l,d){var r=l("x"),n=l("open"),u=l("high"),a=l("low"),o=l("close");l("hoverlabel.split");var c=i.getComponentMethod("calendars","handleTraceDefaults");if(c(y,p,["x"],d),!!(n&&u&&a&&o)){var s=Math.min(n.length,u.length,a.length,o.length);return r&&(s=Math.min(s,m.minRowLength(r))),p._length=s,s}}},72314:function(R,F,e){var i=e(39898),m=e(71828);R.exports=function(y,p,l,d){var r=p.yaxis,n=p.xaxis,u=!!n.rangebreaks;m.makeTraceGroups(d,l,"trace ohlc").each(function(a){var o=i.select(this),c=a[0],s=c.t,b=c.trace;if(b.visible!==!0||s.empty){o.remove();return}var g=s.tickLen,A=o.selectAll("path").data(m.identity);A.enter().append("path"),A.exit().remove(),A.attr("d",function(v){if(v.empty)return"M0,0Z";var h=n.c2p(v.pos-g,!0),x=n.c2p(v.pos+g,!0),C=u?(h+x)/2:n.c2p(v.pos,!0),D=r.c2p(v.o,!0),L=r.c2p(v.h,!0),w=r.c2p(v.l,!0),M=r.c2p(v.c,!0);return"M"+h+","+D+"H"+C+"M"+C+","+L+"V"+w+"M"+x+","+M+"H"+C})})}},67324:function(R){R.exports=function(e,i){var m=e.cd,t=e.xaxis,y=e.yaxis,p=[],l,d=m[0].t.bPos||0;if(i===!1)for(l=0;l=v.length||h[v[x]]!==void 0)return!1;h[v[x]]=!0}return!0}},14647:function(R,F,e){var i=e(71828),m=e(52075).hasColorscale,t=e(1586),y=e(27670).c,p=e(85501),l=e(99506),d=e(94397);function r(u,a,o,c,s){s("line.shape"),s("line.hovertemplate");var b=s("line.color",c.colorway[0]);if(m(u,"line")&&i.isArrayOrTypedArray(b)){if(b.length)return s("line.colorscale"),t(u,a,c,s,{prefix:"line.",cLetter:"c"}),b.length;a.line.color=o}return 1/0}function n(u,a){function o(h,x){return i.coerce(u,a,l.dimensions,h,x)}var c=o("values"),s=o("visible");if(c&&c.length||(s=a.visible=!1),s){o("label"),o("displayindex",a._index);var b=u.categoryarray,g=Array.isArray(b)&&b.length>0,A;g&&(A="array");var v=o("categoryorder",A);v==="array"?(o("categoryarray"),o("ticktext")):(delete u.categoryarray,delete u.ticktext),!g&&v==="array"&&(a.categoryorder="trace")}}R.exports=function(a,o,c,s){function b(x,C){return i.coerce(a,o,l,x,C)}var g=p(a,o,{name:"dimensions",handleItemDefaults:n}),A=r(a,o,c,s,b);y(o,s,b),(!Array.isArray(g)||!g.length)&&(o.visible=!1),d(o,g,"values",A),b("hoveron"),b("hovertemplate"),b("arrangement"),b("bundlecolors"),b("sortpaths"),b("counts");var v={family:s.font.family,size:Math.round(s.font.size),color:s.font.color};i.coerceFont(b,"labelfont",v);var h={family:s.font.family,size:Math.round(s.font.size/1.2),color:s.font.color};i.coerceFont(b,"tickfont",h)}},94873:function(R,F,e){R.exports={attributes:e(99506),supplyDefaults:e(14647),calc:e(28699),plot:e(45784),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:e(27677),categories:["noOpacity"],meta:{}}},45460:function(R,F,e){var i=e(39898),m=e(81684).k4,t=e(72391),y=e(30211),p=e(71828),l=p.strTranslate,d=e(91424),r=e(84267),n=e(63893);function u(Q,ae,fe,te){var ne=ae._context.staticPlot,ce=Q.map(le.bind(0,ae,fe)),oe=te.selectAll("g.parcatslayer").data([null]);oe.enter().append("g").attr("class","parcatslayer").style("pointer-events",ne?"none":"all");var de=oe.selectAll("g.trace.parcats").data(ce,a),we=de.enter().append("g").attr("class","trace parcats");de.attr("transform",function(Ye){return l(Ye.x,Ye.y)}),we.append("g").attr("class","paths");var Se=de.select("g.paths"),Te=Se.selectAll("path.path").data(function(Ye){return Ye.paths},a);Te.attr("fill",function(Ye){return Ye.model.color});var Fe=Te.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Ye){return Ye.model.color}).attr("fill-opacity",0);h(Fe),Te.attr("d",function(Ye){return Ye.svgD}),Fe.empty()||Te.sort(c),Te.exit().remove(),Te.on("mouseover",s).on("mouseout",b).on("click",v),we.append("g").attr("class","dimensions");var Ie=de.select("g.dimensions"),Me=Ie.selectAll("g.dimension").data(function(Ye){return Ye.dimensions},a);Me.enter().append("g").attr("class","dimension"),Me.attr("transform",function(Ye){return l(Ye.x,0)}),Me.exit().remove();var Ae=Me.selectAll("g.category").data(function(Ye){return Ye.categories},a),De=Ae.enter().append("g").attr("class","category");Ae.attr("transform",function(Ye){return l(0,Ye.y)}),De.append("rect").attr("class","catrect").attr("pointer-events","none"),Ae.select("rect.catrect").attr("fill","none").attr("width",function(Ye){return Ye.width}).attr("height",function(Ye){return Ye.height}),D(De);var ke=Ae.selectAll("rect.bandrect").data(function(Ye){return Ye.bands},a);ke.each(function(){p.raiseToTop(this)}),ke.attr("fill",function(Ye){return Ye.color});var We=ke.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Ye){return Ye.color}).attr("fill-opacity",0);ke.attr("fill",function(Ye){return Ye.color}).attr("width",function(Ye){return Ye.width}).attr("height",function(Ye){return Ye.height}).attr("y",function(Ye){return Ye.y}).attr("cursor",function(Ye){return Ye.parcatsViewModel.arrangement==="fixed"?"default":Ye.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),w(We),ke.exit().remove(),De.append("text").attr("class","catlabel").attr("pointer-events","none");var _e=ae._fullLayout.paper_bgcolor;Ae.select("text.catlabel").attr("text-anchor",function(Ye){return o(Ye)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",n.makeTextShadow(_e)).style("fill","rgb(0, 0, 0)").attr("x",function(Ye){return o(Ye)?Ye.width+5:-5}).attr("y",function(Ye){return Ye.height/2}).text(function(Ye){return Ye.model.categoryLabel}).each(function(Ye){d.font(i.select(this),Ye.parcatsViewModel.categorylabelfont),n.convertToTspans(i.select(this),ae)}),De.append("text").attr("class","dimlabel"),Ae.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Ye){return Ye.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Ye){return Ye.width/2}).attr("y",-5).text(function(Ye,Pe){return Pe===0?Ye.parcatsViewModel.model.dimensions[Ye.model.dimensionInd].dimensionLabel:null}).each(function(Ye){d.font(i.select(this),Ye.parcatsViewModel.labelfont)}),Ae.selectAll("rect.bandrect").on("mouseover",z).on("mouseout",U),Ae.exit().remove(),Me.call(i.behavior.drag().origin(function(Ye){return{x:Ye.x,y:0}}).on("dragstart",H).on("drag",B).on("dragend",W)),de.each(function(Ye){Ye.traceSelection=i.select(this),Ye.pathSelection=i.select(this).selectAll("g.paths").selectAll("path.path"),Ye.dimensionSelection=i.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),de.exit().remove()}R.exports=function(Q,ae,fe,te){u(fe,Q,te,ae)};function a(Q){return Q.key}function o(Q){var ae=Q.parcatsViewModel.dimensions.length,fe=Q.parcatsViewModel.dimensions[ae-1].model.dimensionInd;return Q.model.dimensionInd===fe}function c(Q,ae){return Q.model.rawColor>ae.model.rawColor?1:Q.model.rawColor"),Ze=i.mouse(ne)[0];y.loneHover({trace:ce,x:Ae-de.left+we.left,y:De-de.top+we.top,text:Ve,color:Q.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:ke,idealAlign:Ze1&&Se.displayInd===we.dimensions.length-1?(Ie=oe.left,Me="left"):(Ie=oe.left+oe.width,Me="right");var Ae=de.model.count,De=de.model.categoryLabel,ke=Ae/de.parcatsViewModel.model.count,We={countLabel:Ae,categoryLabel:De,probabilityLabel:ke.toFixed(3)},_e=[];de.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&_e.push(["Count:",We.countLabel].join(" ")),de.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&_e.push(["P("+We.categoryLabel+"):",We.probabilityLabel].join(" "));var Ye=_e.join("
");return{trace:Te,x:te*(Ie-ae.left),y:ne*(Fe-ae.top),text:Ye,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:Me,hovertemplate:Te.hovertemplate,hovertemplateLabels:We,eventData:[{data:Te._input,fullData:Te,count:Ae,category:De,probability:ke}]}}function O(Q,ae,fe){var te=[];return i.select(fe.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ne=this;te.push(k(Q,ae,ne))}),te}function G(Q,ae,fe){Q._fullLayout._calcInverseTransform(Q);var te=Q._fullLayout._invScaleX,ne=Q._fullLayout._invScaleY,ce=fe.getBoundingClientRect(),oe=i.select(fe).datum(),de=oe.categoryViewModel,we=de.parcatsViewModel,Se=we.model.dimensions[de.model.dimensionInd],Te=we.trace,Fe=ce.y+ce.height/2,Ie,Me;we.dimensions.length>1&&Se.displayInd===we.dimensions.length-1?(Ie=ce.left,Me="left"):(Ie=ce.left+ce.width,Me="right");var Ae=de.model.categoryLabel,De=oe.parcatsViewModel.model.count,ke=0;oe.categoryViewModel.bands.forEach(function(mt){mt.color===oe.color&&(ke+=mt.count)});var We=de.model.count,_e=0;we.pathSelection.each(function(mt){mt.model.color===oe.color&&(_e+=mt.model.count)});var Ye=ke/De,Pe=ke/_e,Ve=ke/We,Ze={countLabel:De,categoryLabel:Ae,probabilityLabel:Ye.toFixed(3)},Ke=[];de.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ke.push(["Count:",Ze.countLabel].join(" ")),de.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(Ke.push("P(color \u2229 "+Ae+"): "+Ze.probabilityLabel),Ke.push("P("+Ae+" | color): "+Pe.toFixed(3)),Ke.push("P(color | "+Ae+"): "+Ve.toFixed(3)));var lt=Ke.join("
"),vt=r.mostReadable(oe.color,["black","white"]);return{trace:Te,x:te*(Ie-ae.left),y:ne*(Fe-ae.top),text:lt,color:oe.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:vt,fontSize:10,idealAlign:Me,hovertemplate:Te.hovertemplate,hovertemplateLabels:Ze,eventData:[{data:Te._input,fullData:Te,category:Ae,count:De,probability:Ye,categorycount:We,colorcount:_e,bandcolorcount:ke}]}}function z(Q){if(!Q.parcatsViewModel.dragDimension&&Q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var ae=i.mouse(this)[1];if(ae<-1)return;var fe=Q.parcatsViewModel.graphDiv,te=fe._fullLayout,ne=te._paperdiv.node().getBoundingClientRect(),ce=Q.parcatsViewModel.hoveron,oe=this;if(ce==="color"?(f(oe),E(oe,"plotly_hover",i.event)):(S(oe),P(oe,"plotly_hover",i.event)),Q.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var de;ce==="category"?de=k(fe,ne,oe):ce==="color"?de=G(fe,ne,oe):ce==="dimension"&&(de=O(fe,ne,oe)),de&&y.loneHover(de,{container:te._hoverlayer.node(),outerContainer:te._paper.node(),gd:fe})}}}function U(Q){var ae=Q.parcatsViewModel;if(!ae.dragDimension&&(h(ae.pathSelection),D(ae.dimensionSelection.selectAll("g.category")),w(ae.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),y.loneUnhover(ae.graphDiv._fullLayout._hoverlayer.node()),ae.pathSelection.sort(c),ae.hoverinfoItems.indexOf("skip")===-1)){var fe=Q.parcatsViewModel.hoveron,te=this;fe==="color"?E(te,"plotly_unhover",i.event):P(te,"plotly_unhover",i.event)}}function H(Q){Q.parcatsViewModel.arrangement!=="fixed"&&(Q.dragDimensionDisplayInd=Q.model.displayInd,Q.initialDragDimensionDisplayInds=Q.parcatsViewModel.model.dimensions.map(function(ae){return ae.displayInd}),Q.dragHasMoved=!1,Q.dragCategoryDisplayInd=null,i.select(this).selectAll("g.category").select("rect.catrect").each(function(ae){var fe=i.mouse(this)[0],te=i.mouse(this)[1];-2<=fe&&fe<=ae.width+2&&-2<=te&&te<=ae.height+2&&(Q.dragCategoryDisplayInd=ae.model.displayInd,Q.initialDragCategoryDisplayInds=Q.model.categories.map(function(ne){return ne.displayInd}),ae.model.dragY=ae.y,p.raiseToTop(this.parentNode),i.select(this.parentNode).selectAll("rect.bandrect").each(function(ne){ne.yTe.y+Te.height/2&&(ce.model.displayInd=Te.model.displayInd,Te.model.displayInd=de),Q.dragCategoryDisplayInd=ce.model.displayInd}if(Q.dragCategoryDisplayInd===null||Q.parcatsViewModel.arrangement==="freeform"){ne.model.dragX=i.event.x;var Fe=Q.parcatsViewModel.dimensions[fe],Ie=Q.parcatsViewModel.dimensions[te];Fe!==void 0&&ne.model.dragXIe.x&&(ne.model.displayInd=Ie.model.displayInd,Ie.model.displayInd=Q.dragDimensionDisplayInd),Q.dragDimensionDisplayInd=ne.model.displayInd}Z(Q.parcatsViewModel),$(Q.parcatsViewModel),ie(Q.parcatsViewModel),re(Q.parcatsViewModel)}}function W(Q){if(Q.parcatsViewModel.arrangement!=="fixed"&&Q.dragDimensionDisplayInd!==null){i.select(this).selectAll("text").attr("font-weight","normal");var ae={},fe=q(Q.parcatsViewModel),te=Q.parcatsViewModel.model.dimensions.map(function(Ie){return Ie.displayInd}),ne=Q.initialDragDimensionDisplayInds.some(function(Ie,Me){return Ie!==te[Me]});ne&&te.forEach(function(Ie,Me){var Ae=Q.parcatsViewModel.model.dimensions[Me].containerInd;ae["dimensions["+Ae+"].displayindex"]=Ie});var ce=!1;if(Q.dragCategoryDisplayInd!==null){var oe=Q.model.categories.map(function(Ie){return Ie.displayInd});if(ce=Q.initialDragCategoryDisplayInds.some(function(Ie,Me){return Ie!==oe[Me]}),ce){var de=Q.model.categories.slice().sort(function(Ie,Me){return Ie.displayInd-Me.displayInd}),we=de.map(function(Ie){return Ie.categoryValue}),Se=de.map(function(Ie){return Ie.categoryLabel});ae["dimensions["+Q.model.containerInd+"].categoryarray"]=[we],ae["dimensions["+Q.model.containerInd+"].ticktext"]=[Se],ae["dimensions["+Q.model.containerInd+"].categoryorder"]="array"}}if(Q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!Q.dragHasMoved&&Q.potentialClickBand&&(Q.parcatsViewModel.hoveron==="color"?E(Q.potentialClickBand,"plotly_click",i.event.sourceEvent):P(Q.potentialClickBand,"plotly_click",i.event.sourceEvent)),Q.model.dragX=null,Q.dragCategoryDisplayInd!==null){var Te=Q.parcatsViewModel.dimensions[Q.dragDimensionDisplayInd].categories[Q.dragCategoryDisplayInd];Te.model.dragY=null,Q.dragCategoryDisplayInd=null}Q.dragDimensionDisplayInd=null,Q.parcatsViewModel.dragDimension=null,Q.dragHasMoved=null,Q.potentialClickBand=null,Z(Q.parcatsViewModel),$(Q.parcatsViewModel);var Fe=i.transition().duration(300).ease("cubic-in-out");Fe.each(function(){ie(Q.parcatsViewModel,!0),re(Q.parcatsViewModel,!0)}).each("end",function(){(ne||ce)&&t.restyle(Q.parcatsViewModel.graphDiv,ae,[fe])})}}function q(Q){for(var ae,fe=Q.graphDiv._fullData,te=0;te=0;we--)Se+="C"+oe[we]+","+(ae[we+1]+te)+" "+ce[we]+","+(ae[we]+te)+" "+(Q[we]+fe[we])+","+(ae[we]+te),Se+="l-"+fe[we]+",0 ";return Se+="Z",Se}function $(Q){var ae=Q.dimensions,fe=Q.model,te=ae.map(function(Ue){return Ue.categories.map(function(Be){return Be.y})}),ne=Q.model.dimensions.map(function(Ue){return Ue.categories.map(function(Be){return Be.displayInd})}),ce=Q.model.dimensions.map(function(Ue){return Ue.displayInd}),oe=Q.dimensions.map(function(Ue){return Ue.model.dimensionInd}),de=ae.map(function(Ue){return Ue.x}),we=ae.map(function(Ue){return Ue.width}),Se=[];for(var Te in fe.paths)fe.paths.hasOwnProperty(Te)&&Se.push(fe.paths[Te]);function Fe(Ue){var Be=Ue.categoryInds.map(function(ot,qe){return ne[qe][ot]}),rt=oe.map(function(ot){return Be[ot]});return rt}Se.sort(function(Ue,Be){var rt=Fe(Ue),ot=Fe(Be);return Q.sortpaths==="backward"&&(rt.reverse(),ot.reverse()),rt.push(Ue.valueInds[0]),ot.push(Be.valueInds[0]),Q.bundlecolors&&(rt.unshift(Ue.rawColor),ot.unshift(Be.rawColor)),rtot?1:0});for(var Ie=new Array(Se.length),Me=ae[0].model.count,Ae=ae[0].categories.map(function(Ue){return Ue.height}).reduce(function(Ue,Be){return Ue+Be}),De=0;De0?We=Ae*(ke.count/Me):We=0;for(var _e=new Array(te.length),Ye=0;Ye1?oe=(Q.width-2*fe-te)/(ne-1):oe=0,de=fe,we=de+oe*ce;var Se=[],Te=Q.model.maxCats,Fe=ae.categories.length,Ie=8,Me=ae.count,Ae=Q.height-Ie*(Te-1),De,ke,We,_e,Ye,Pe=(Te-Fe)*Ie/2,Ve=ae.categories.map(function(Ze){return{displayInd:Ze.displayInd,categoryInd:Ze.categoryInd}});for(Ve.sort(function(Ze,Ke){return Ze.displayInd-Ke.displayInd}),Ye=0;Ye0?De=ke.count/Me*Ae:De=0,We={key:ke.valueInds[0],model:ke,width:te,height:De,y:ke.dragY!==null?ke.dragY:Pe,bands:[],parcatsViewModel:Q},Pe=Pe+De+Ie,Se.push(We);return{key:ae.dimensionInd,x:ae.dragX!==null?ae.dragX:we,y:0,width:te,model:ae,categories:Se,parcatsViewModel:Q,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}},45784:function(R,F,e){var i=e(45460);R.exports=function(t,y,p,l){var d=t._fullLayout,r=d._paper,n=d._size;i(t,r,y,{width:n.w,height:n.h,margin:{t:n.t,r:n.r,b:n.b,l:n.l}},p,l)}},73362:function(R,F,e){var i=e(50693),m=e(13838),t=e(41940),y=e(27670).Y,p=e(1426).extendFlat,l=e(44467).templatedArray;R.exports={domain:y({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:t({editType:"plot"}),tickfont:t({editType:"plot"}),rangefont:t({editType:"plot"}),dimensions:l("dimension",{label:{valType:"string",editType:"plot"},tickvals:p({},m.tickvals,{editType:"plot"}),ticktext:p({},m.ticktext,{editType:"plot"}),tickformat:p({},m.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:p({editType:"calc"},i("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}},57920:function(R,F,e){var i=e(25706),m=e(39898),t=e(28984).keyFun,y=e(28984).repeat,p=e(71828).sorterAsc,l=e(71828).strTranslate,d=i.bar.snapRatio;function r(W,q){return W*(1-d)+q*d}var n=i.bar.snapClose;function u(W,q){return W*(1-n)+q*n}function a(W,q,re,ie){if(o(re,ie))return re;var le=W?-1:1,he=0,$=q.length-1;if(le<0){var Z=he;he=$,$=Z}for(var K=q[he],Q=K,ae=he;le*ae=q[re][0]&&W<=q[re][1])return!0;return!1}function c(W){W.attr("x",-i.bar.captureWidth/2).attr("width",i.bar.captureWidth)}function s(W){W.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function b(W){if(!W.brush.filterSpecified)return"0,"+W.height;for(var q=g(W.brush.filter.getConsolidated(),W.height),re=[0],ie,le,he,$=q.length?q[0][0]:null,Z=0;ZW[1]+re||q=.9*W[1]+.1*W[0]?"n":q<=.9*W[0]+.1*W[1]?"s":"ns"}function v(){m.select(document.body).style("cursor",null)}function h(W){W.attr("stroke-dasharray",b)}function x(W,q){var re=m.select(W).selectAll(".highlight, .highlight-shadow"),ie=q?re.transition().duration(i.bar.snapDuration).each("end",q):re;h(ie)}function C(W,q){var re=W.brush,ie=re.filterSpecified,le=NaN,he={},$;if(ie){var Z=W.height,K=re.filter.getConsolidated(),Q=g(K,Z),ae=NaN,fe=NaN,te=NaN;for($=0;$<=Q.length;$++){var ne=Q[$];if(ne&&ne[0]<=q&&q<=ne[1]){ae=$;break}else if(fe=$?$-1:NaN,ne&&ne[0]>q){te=$;break}}if(le=ae,isNaN(le)&&(isNaN(fe)||isNaN(te)?le=isNaN(fe)?te:fe:le=q-Q[fe][1]=Se[0]&&we<=Se[1]){he.clickableOrdinalRange=Se;break}}}return he}function D(W,q){m.event.sourceEvent.stopPropagation();var re=q.height-m.mouse(W)[1]-2*i.verticalPadding,ie=q.unitToPaddedPx.invert(re),le=q.brush,he=C(q,re),$=he.interval,Z=le.svgBrush;if(Z.wasDragged=!1,Z.grabbingBar=he.region==="ns",Z.grabbingBar){var K=$.map(q.unitToPaddedPx);Z.grabPoint=re-K[0]-i.verticalPadding,Z.barLength=K[1]-K[0]}Z.clickableOrdinalRange=he.clickableOrdinalRange,Z.stayingIntervals=q.multiselect&&le.filterSpecified?le.filter.getConsolidated():[],$&&(Z.stayingIntervals=Z.stayingIntervals.filter(function(Q){return Q[0]!==$[0]&&Q[1]!==$[1]})),Z.startExtent=he.region?$[he.region==="s"?1:0]:ie,q.parent.inBrushDrag=!0,Z.brushStartCallback()}function L(W,q){m.event.sourceEvent.stopPropagation();var re=q.height-m.mouse(W)[1]-2*i.verticalPadding,ie=q.brush.svgBrush;ie.wasDragged=!0,ie._dragging=!0,ie.grabbingBar?ie.newExtent=[re-ie.grabPoint,re+ie.barLength-ie.grabPoint].map(q.unitToPaddedPx.invert):ie.newExtent=[ie.startExtent,q.unitToPaddedPx.invert(re)].sort(p),q.brush.filterSpecified=!0,ie.extent=ie.stayingIntervals.concat([ie.newExtent]),ie.brushCallback(q),x(W.parentNode)}function w(W,q){var re=q.brush,ie=re.filter,le=re.svgBrush;le._dragging||(M(W,q),L(W,q),q.brush.svgBrush.wasDragged=!1),le._dragging=!1;var he=m.event;he.sourceEvent.stopPropagation();var $=le.grabbingBar;if(le.grabbingBar=!1,le.grabLocation=void 0,q.parent.inBrushDrag=!1,v(),!le.wasDragged){le.wasDragged=void 0,le.clickableOrdinalRange?re.filterSpecified&&q.multiselect?le.extent.push(le.clickableOrdinalRange):(le.extent=[le.clickableOrdinalRange],re.filterSpecified=!0):$?(le.extent=le.stayingIntervals,le.extent.length===0&&O(re)):O(re),le.brushCallback(q),x(W.parentNode),le.brushEndCallback(re.filterSpecified?ie.getConsolidated():[]);return}var Z=function(){ie.set(ie.getConsolidated())};if(q.ordinal){var K=q.unitTickvals;K[K.length-1]le.newExtent[0];le.extent=le.stayingIntervals.concat(Q?[le.newExtent]:[]),le.extent.length||O(re),le.brushCallback(q),Q?x(W.parentNode,Z):(Z(),x(W.parentNode))}else Z();le.brushEndCallback(re.filterSpecified?ie.getConsolidated():[])}function M(W,q){var re=q.height-m.mouse(W)[1]-2*i.verticalPadding,ie=C(q,re),le="crosshair";ie.clickableOrdinalRange?le="pointer":ie.region&&(le=ie.region+"-resize"),m.select(document.body).style("cursor",le)}function S(W){W.on("mousemove",function(q){m.event.preventDefault(),q.parent.inBrushDrag||M(this,q)}).on("mouseleave",function(q){q.parent.inBrushDrag||v()}).call(m.behavior.drag().on("dragstart",function(q){D(this,q)}).on("drag",function(q){L(this,q)}).on("dragend",function(q){w(this,q)}))}function f(W,q){return W[0]-q[0]}function P(W,q,re){var ie=re._context.staticPlot,le=W.selectAll(".background").data(y);le.enter().append("rect").classed("background",!0).call(c).call(s).style("pointer-events",ie?"none":"auto").attr("transform",l(0,i.verticalPadding)),le.call(S).attr("height",function(Z){return Z.height-i.verticalPadding});var he=W.selectAll(".highlight-shadow").data(y);he.enter().append("line").classed("highlight-shadow",!0).attr("x",-i.bar.width/2).attr("stroke-width",i.bar.width+i.bar.strokeWidth).attr("stroke",q).attr("opacity",i.bar.strokeOpacity).attr("stroke-linecap","butt"),he.attr("y1",function(Z){return Z.height}).call(h);var $=W.selectAll(".highlight").data(y);$.enter().append("line").classed("highlight",!0).attr("x",-i.bar.width/2).attr("stroke-width",i.bar.width-i.bar.strokeWidth).attr("stroke",i.bar.fillColor).attr("opacity",i.bar.fillOpacity).attr("stroke-linecap","butt"),$.attr("y1",function(Z){return Z.height}).call(h)}function E(W,q,re){var ie=W.selectAll("."+i.cn.axisBrush).data(y,t);ie.enter().append("g").classed(i.cn.axisBrush,!0),P(ie,q,re)}function k(W){return W.svgBrush.extent.map(function(q){return q.slice()})}function O(W){W.filterSpecified=!1,W.svgBrush.extent=[[-1/0,1/0]]}function G(W){return function(re){var ie=re.brush,le=k(ie),he=le.slice();ie.filter.set(he),W()}}function z(W){for(var q=W.slice(),re=[],ie,le=q.shift();le;){for(ie=le.slice();(le=q.shift())&&le[0]<=ie[1];)ie[1]=Math.max(ie[1],le[1]);re.push(ie)}return re.length===1&&re[0][0]>re[0][1]&&(re=[]),re}function U(){var W=[],q,re;return{set:function(ie){W=ie.map(function(le){return le.slice().sort(p)}).sort(f),W.length===1&&W[0][0]===-1/0&&W[0][1]===1/0&&(W=[[0,-1]]),q=z(W),re=W.reduce(function(le,he){return[Math.min(le[0],he[0]),Math.max(le[1],he[1])]},[1/0,-1/0])},get:function(){return W.slice()},getConsolidated:function(){return q},getBounds:function(){return re}}}function H(W,q,re,ie,le,he){var $=U();return $.set(re),{filter:$,filterSpecified:q,svgBrush:{extent:[],brushStartCallback:ie,brushCallback:G(le),brushEndCallback:he}}}function B(W,q){if(Array.isArray(W[0])?(W=W.map(function(ie){return ie.sort(p)}),q.multiselect?W=z(W.sort(f)):W=[W[0]]):W=[W.sort(p)],q.tickvals){var re=q.tickvals.slice().sort(p);if(W=W.map(function(ie){var le=[a(0,re,ie[0],[]),a(1,re,ie[1],[])];if(le[1]>le[0])return le}).filter(function(ie){return ie}),!W.length)return}return W.length>1?W:W[0]}R.exports={makeBrush:H,ensureAxisBrush:E,cleanRanges:B}},71791:function(R,F,e){R.exports={attributes:e(73362),supplyDefaults:e(3633),calc:e(24639),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:e(49351),categories:["gl","regl","noOpacity","noHover"],meta:{}}},49351:function(R,F,e){var i=e(39898),m=e(27659).a0,t=e(21341),y=e(77922);F.name="parcoords",F.plot=function(p){var l=m(p.calcdata,"parcoords")[0];l.length&&t(p,l)},F.clean=function(p,l,d,r){var n=r._has&&r._has("parcoords"),u=l._has&&l._has("parcoords");n&&!u&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},F.toSVG=function(p){var l=p._fullLayout._glimages,d=i.select(p).selectAll(".svg-container"),r=d.filter(function(u,a){return a===d.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function n(){var u=this,a=u.toDataURL("image/png"),o=l.append("svg:image");o.attr({xmlns:y.svg,"xlink:href":a,preserveAspectRatio:"none",x:0,y:0,width:u.style.width,height:u.style.height})}r.each(n),window.setTimeout(function(){i.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},24639:function(R,F,e){var i=e(71828).isArrayOrTypedArray,m=e(21081),t=e(28984).wrap;R.exports=function(l,d){var r,n;return m.hasColorscale(d,"line")&&i(d.line.color)?(r=d.line.color,n=m.extractOpts(d.line).colorscale,m.calc(l,d,{vals:r,containerStr:"line",cLetter:"c"})):(r=y(d._length),n=[[0,d.line.color],[1,d.line.color]]),t({lineColor:r,cscale:n})};function y(p){for(var l=new Array(p),d=0;dn&&(i.log("parcoords traces support up to "+n+" dimensions at the moment"),h.splice(n));var x=p(s,b,{name:"dimensions",layout:A,handleItemDefaults:o}),C=a(s,b,g,A,v);y(b,A,v),(!Array.isArray(x)||!x.length)&&(b.visible=!1),u(b,x,"values",C);var D={family:A.font.family,size:Math.round(A.font.size/1.2),color:A.font.color};i.coerceFont(v,"labelfont",D),i.coerceFont(v,"tickfont",D),i.coerceFont(v,"rangefont",D),v("labelangle"),v("labelside"),v("unselected.line.color"),v("unselected.line.opacity")}},1602:function(R,F,e){var i=e(71828).isTypedArray;F.convertTypedArray=function(m){return i(m)?Array.prototype.slice.call(m):m},F.isOrdinal=function(m){return!!m.tickvals},F.isVisible=function(m){return m.visible||!("visible"in m)}},67618:function(R,F,e){var i=e(71791);i.plot=e(21341),R.exports=i},83398:function(R,F,e){var i=e(56068),m=i([`precision highp float; +#define GLSLIFY 1 + +varying vec4 fragColor; + +attribute vec4 p01_04, p05_08, p09_12, p13_16, + p17_20, p21_24, p25_28, p29_32, + p33_36, p37_40, p41_44, p45_48, + p49_52, p53_56, p57_60, colors; + +uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D, + loA, hiA, loB, hiB, loC, hiC, loD, hiD; + +uniform vec2 resolution, viewBoxPos, viewBoxSize; +uniform float maskHeight; +uniform float drwLayer; // 0: context, 1: focus, 2: pick +uniform vec4 contextColor; +uniform sampler2D maskTexture, palette; + +bool isPick = (drwLayer > 1.5); +bool isContext = (drwLayer < 0.5); + +const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0); +const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0); + +float val(mat4 p, mat4 v) { + return dot(matrixCompMult(p, v) * UNITS, UNITS); +} + +float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) { + float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D); + float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D); + return y1 * (1.0 - ratio) + y2 * ratio; +} + +int iMod(int a, int b) { + return a - b * (a / b); +} + +bool fOutside(float p, float lo, float hi) { + return (lo < hi) && (lo > p || p > hi); +} + +bool vOutside(vec4 p, vec4 lo, vec4 hi) { + return ( + fOutside(p[0], lo[0], hi[0]) || + fOutside(p[1], lo[1], hi[1]) || + fOutside(p[2], lo[2], hi[2]) || + fOutside(p[3], lo[3], hi[3]) + ); +} + +bool mOutside(mat4 p, mat4 lo, mat4 hi) { + return ( + vOutside(p[0], lo[0], hi[0]) || + vOutside(p[1], lo[1], hi[1]) || + vOutside(p[2], lo[2], hi[2]) || + vOutside(p[3], lo[3], hi[3]) + ); +} + +bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) { + return mOutside(A, loA, hiA) || + mOutside(B, loB, hiB) || + mOutside(C, loC, hiC) || + mOutside(D, loD, hiD); +} + +bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) { + mat4 pnts[4]; + pnts[0] = A; + pnts[1] = B; + pnts[2] = C; + pnts[3] = D; + + for(int i = 0; i < 4; ++i) { + for(int j = 0; j < 4; ++j) { + for(int k = 0; k < 4; ++k) { + if(0 == iMod( + int(255.0 * texture2D(maskTexture, + vec2( + (float(i * 2 + j / 2) + 0.5) / 8.0, + (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight + ))[3] + ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))), + 2 + )) return true; + } + } + } + return false; +} + +vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) { + float x = 0.5 * sign(v) + 0.5; + float y = axisY(x, A, B, C, D); + float z = 1.0 - abs(v); + + z += isContext ? 0.0 : 2.0 * float( + outsideBoundingBox(A, B, C, D) || + outsideRasterMask(A, B, C, D) + ); + + return vec4( + 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0, + z, + 1.0 + ); +} + +void main() { + mat4 A = mat4(p01_04, p05_08, p09_12, p13_16); + mat4 B = mat4(p17_20, p21_24, p25_28, p29_32); + mat4 C = mat4(p33_36, p37_40, p41_44, p45_48); + mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS); + + float v = colors[3]; + + gl_Position = position(isContext, v, A, B, C, D); + + fragColor = + isContext ? vec4(contextColor) : + isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5)); +} +`]),t=i([`precision highp float; +#define GLSLIFY 1 + +varying vec4 fragColor; + +void main() { + gl_FragColor = fragColor; +} +`]),y=e(25706).maxDimensionCount,p=e(71828),l=1e-6,d=2048,r=new Uint8Array(4),n=new Uint8Array(4),u={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function a(M){M.read({x:0,y:0,width:1,height:1,data:r})}function o(M,S,f,P,E){var k=M._gl;k.enable(k.SCISSOR_TEST),k.scissor(S,f,P,E),M.clear({color:[0,0,0,0],depth:1})}function c(M,S,f,P,E,k){var O=k.key;function G(z){var U=Math.min(P,E-z*P);z===0&&(window.cancelAnimationFrame(f.currentRafs[O]),delete f.currentRafs[O],o(M,k.scissorX,k.scissorY,k.scissorWidth,k.viewBoxSize[1])),!f.clearOnly&&(k.count=2*U,k.offset=2*z*P,S(k),z*P+U>>8*S)%256/255}function A(M,S,f){for(var P=new Array(M*(y+4)),E=0,k=0;kFe&&(Fe=te[de].dim1.canvasX,Se=de);oe===0&&o(E,0,0,U.canvasWidth,U.canvasHeight);var Ie=Z(f);for(de=0;dece._length&&(Ae=Ae.slice(0,ce._length));var De=ce.tickvals,ke;function We(Ze,Ke){return{val:Ze,text:ke[Ke]}}function _e(Ze,Ke){return Ze.val-Ke.val}if(Array.isArray(De)&&De.length){ke=ce.ticktext,!Array.isArray(ke)||!ke.length?ke=De.map(t(ce.tickformat)):ke.length>De.length?ke=ke.slice(0,De.length):De.length>ke.length&&(De=De.slice(0,ke.length));for(var Ye=1;Ye=Ke||Et>=lt)return;var et=Ve.lineLayer.readPixel(mt,lt-1-Et),Ue=et[3]!==0,Be=Ue?et[2]+256*(et[1]+256*et[0]):null,rt={x:mt,y:Et,clientX:Ze.clientX,clientY:Ze.clientY,dataIndex:Ve.model.key,curveNumber:Be};Be!==de&&(Ue?$.hover(rt):$.unhover&&$.unhover(rt),de=Be)}}),oe.style("opacity",function(Ve){return Ve.pick?0:1}),Q.style("background","rgba(255, 255, 255, 0)");var Se=Q.selectAll("."+g.cn.parcoords).data(ce,o);Se.exit().remove(),Se.enter().append("g").classed(g.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Se.attr("transform",function(Ve){return d(Ve.model.translateX,Ve.model.translateY)});var Te=Se.selectAll("."+g.cn.parcoordsControlView).data(c,o);Te.enter().append("g").classed(g.cn.parcoordsControlView,!0),Te.attr("transform",function(Ve){return d(Ve.model.pad.l,Ve.model.pad.t)});var Fe=Te.selectAll("."+g.cn.yAxis).data(function(Ve){return Ve.dimensions},o);Fe.enter().append("g").classed(g.cn.yAxis,!0),Te.each(function(Ve){H(Fe,Ve,fe)}),oe.each(function(Ve){if(Ve.viewModel){!Ve.lineLayer||$?Ve.lineLayer=v(this,Ve):Ve.lineLayer.update(Ve),(Ve.key||Ve.key===0)&&(Ve.viewModel[Ve.key]=Ve.lineLayer);var Ze=!Ve.context||$;Ve.lineLayer.render(Ve.viewModel.panels,Ze)}}),Fe.attr("transform",function(Ve){return d(Ve.xScale(Ve.xIndex),0)}),Fe.call(i.behavior.drag().origin(function(Ve){return Ve}).on("drag",function(Ve){var Ze=Ve.parent;ne.linePickActive(!1),Ve.x=Math.max(-g.overdrag,Math.min(Ve.model.width+g.overdrag,i.event.x)),Ve.canvasX=Ve.x*Ve.model.canvasPixelRatio,Fe.sort(function(Ke,lt){return Ke.x-lt.x}).each(function(Ke,lt){Ke.xIndex=lt,Ke.x=Ve===Ke?Ke.x:Ke.xScale(Ke.xIndex),Ke.canvasX=Ke.x*Ke.model.canvasPixelRatio}),H(Fe,Ze,fe),Fe.filter(function(Ke){return Math.abs(Ve.xIndex-Ke.xIndex)!==0}).attr("transform",function(Ke){return d(Ke.xScale(Ke.xIndex),0)}),i.select(this).attr("transform",d(Ve.x,0)),Fe.each(function(Ke,lt,vt){vt===Ve.parent.key&&(Ze.dimensions[lt]=Ke)}),Ze.contextLayer&&Ze.contextLayer.render(Ze.panels,!1,!E(Ze)),Ze.focusLayer.render&&Ze.focusLayer.render(Ze.panels)}).on("dragend",function(Ve){var Ze=Ve.parent;Ve.x=Ve.xScale(Ve.xIndex),Ve.canvasX=Ve.x*Ve.model.canvasPixelRatio,H(Fe,Ze,fe),i.select(this).attr("transform",function(Ke){return d(Ke.x,0)}),Ze.contextLayer&&Ze.contextLayer.render(Ze.panels,!1,!E(Ze)),Ze.focusLayer&&Ze.focusLayer.render(Ze.panels),Ze.pickLayer&&Ze.pickLayer.render(Ze.panels,!0),ne.linePickActive(!0),$&&$.axesMoved&&$.axesMoved(Ze.key,Ze.dimensions.map(function(Ke){return Ke.crossfilterDimensionIndex}))})),Fe.exit().remove();var Ie=Fe.selectAll("."+g.cn.axisOverlays).data(c,o);Ie.enter().append("g").classed(g.cn.axisOverlays,!0),Ie.selectAll("."+g.cn.axis).remove();var Me=Ie.selectAll("."+g.cn.axis).data(c,o);Me.enter().append("g").classed(g.cn.axis,!0),Me.each(function(Ve){var Ze=Ve.model.height/Ve.model.tickDistance,Ke=Ve.domainScale,lt=Ke.domain();i.select(this).call(i.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Ze,Ve.tickFormat).tickValues(Ve.ordinal?lt:null).tickFormat(function(vt){return b.isOrdinal(Ve)?vt:W(Ve.model.dimensions[Ve.visibleIndex],vt)}).scale(Ke)),n.font(Me.selectAll("text"),Ve.model.tickFont)}),Me.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),Me.selectAll("text").style("text-shadow",r.makeTextShadow(te)).style("cursor","default");var Ae=Ie.selectAll("."+g.cn.axisHeading).data(c,o);Ae.enter().append("g").classed(g.cn.axisHeading,!0);var De=Ae.selectAll("."+g.cn.axisTitle).data(c,o);De.enter().append("text").classed(g.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",Z?"none":"auto"),De.text(function(Ve){return Ve.label}).each(function(Ve){var Ze=i.select(this);n.font(Ze,Ve.model.labelFont),r.convertToTspans(Ze,ie)}).attr("transform",function(Ve){var Ze=U(Ve.model.labelAngle,Ve.model.labelSide),Ke=g.axisTitleOffset;return(Ze.dir>0?"":d(0,2*Ke+Ve.model.height))+l(Ze.degrees)+d(-Ke*Ze.dx,-Ke*Ze.dy)}).attr("text-anchor",function(Ve){var Ze=U(Ve.model.labelAngle,Ve.model.labelSide),Ke=Math.abs(Ze.dx),lt=Math.abs(Ze.dy);return 2*Ke>lt?Ze.dir*Ze.dx<0?"start":"end":"middle"});var ke=Ie.selectAll("."+g.cn.axisExtent).data(c,o);ke.enter().append("g").classed(g.cn.axisExtent,!0);var We=ke.selectAll("."+g.cn.axisExtentTop).data(c,o);We.enter().append("g").classed(g.cn.axisExtentTop,!0),We.attr("transform",d(0,-g.axisExtentOffset));var _e=We.selectAll("."+g.cn.axisExtentTopText).data(c,o);_e.enter().append("text").classed(g.cn.axisExtentTopText,!0).call(G),_e.text(function(Ve){return q(Ve,!0)}).each(function(Ve){n.font(i.select(this),Ve.model.rangeFont)});var Ye=ke.selectAll("."+g.cn.axisExtentBottom).data(c,o);Ye.enter().append("g").classed(g.cn.axisExtentBottom,!0),Ye.attr("transform",function(Ve){return d(0,Ve.model.height+g.axisExtentOffset)});var Pe=Ye.selectAll("."+g.cn.axisExtentBottomText).data(c,o);Pe.enter().append("text").classed(g.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(G),Pe.text(function(Ve){return q(Ve,!1)}).each(function(Ve){n.font(i.select(this),Ve.model.rangeFont)}),A.ensureAxisBrush(Ie,te,ie)}},21341:function(R,F,e){var i=e(17171),m=e(79749),t=e(1602).isVisible,y={};function p(r,n,u){var a=n.indexOf(u),o=r.indexOf(a);return o===-1&&(o+=n.length),o}function l(r,n){return function(a,o){return p(r,n,a)-p(r,n,o)}}var d=R.exports=function(n,u){var a=n._fullLayout,o=m(n,[],y);if(!!o){var c={},s={},b={},g={},A=a._size;u.forEach(function(D,L){var w=D[0].trace;b[L]=w.index;var M=g[L]=w._fullInput.index;c[L]=n.data[M].dimensions,s[L]=n.data[M].dimensions.slice()});var v=function(D,L,w){var M=s[D][L],S=w.map(function(G){return G.slice()}),f="dimensions["+L+"].constraintrange",P=a._tracePreGUI[n._fullData[b[D]]._fullInput.uid];if(P[f]===void 0){var E=M.constraintrange;P[f]=E||null}var k=n._fullData[b[D]].dimensions[L];S.length?(S.length===1&&(S=S[0]),M.constraintrange=S,k.constraintrange=S.slice(),S=[S]):(delete M.constraintrange,delete k.constraintrange,S=null);var O={};O[f]=S,n.emit("plotly_restyle",[O,[g[D]]])},h=function(D){n.emit("plotly_hover",D)},x=function(D){n.emit("plotly_unhover",D)},C=function(D,L){var w=l(L,s[D].filter(t));c[D].sort(w),s[D].filter(function(M){return!t(M)}).sort(function(M){return s[D].indexOf(M)}).forEach(function(M){c[D].splice(c[D].indexOf(M),1),c[D].splice(s[D].indexOf(M),0,M)}),n.emit("plotly_restyle",[{dimensions:[c[D]]},[g[D]]])};i(n,u,{width:A.w,height:A.h,margin:{t:A.t,r:A.r,b:A.b,l:A.l}},{filterChanged:v,hover:h,unhover:x,axesMoved:C})}};d.reglPrecompiled=y},34e3:function(R,F,e){var i=e(9012),m=e(27670).Y,t=e(41940),y=e(22399),p=e(5386).f,l=e(5386).s,d=e(1426).extendFlat,r=t({editType:"plot",arrayOk:!0,colorEditType:"plot"});R.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:y.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:d({},i.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:p({},{keys:["label","color","value","percent","text"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:d({},r,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:d({},r,{}),outsidetextfont:d({},r,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:d({},r,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:m({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:d({},r,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},13584:function(R,F,e){var i=e(74875);F.name="pie",F.plot=function(m,t,y,p){i.plotBasePlot(F.name,m,t,y,p)},F.clean=function(m,t,y,p){i.cleanBasePlot(F.name,m,t,y,p)}},32354:function(R,F,e){var i=e(92770),m=e(84267),t=e(7901),y={};function p(n,u){var a=[],o=n._fullLayout,c=o.hiddenlabels||[],s=u.labels,b=u.marker.colors||[],g=u.values,A=u._length,v=u._hasValues&&A,h,x;if(u.dlabel)for(s=new Array(A),h=0;h=0});var E=u.type==="funnelarea"?w:u.sort;return E&&a.sort(function(k,O){return O.v-k.v}),a[0]&&(a[0].vTotal=L),a}function l(n){return function(a,o){return!a||(a=m(a),!a.isValid())?!1:(a=t.addOpacity(a,a.getAlpha()),n[o]||(n[o]=a),a)}}function d(n,u){var a=(u||{}).type;a||(a="pie");var o=n._fullLayout,c=n.calcdata,s=o[a+"colorway"],b=o["_"+a+"colormap"];o["extend"+a+"colors"]&&(s=r(s,y));for(var g=0,A=0;A0){c=!0;break}}c||(o=0)}return{hasLabels:u,hasValues:a,len:o}}function d(r,n,u,a){function o(f,P){return m.coerce(r,n,t,f,P)}var c=o("labels"),s=o("values"),b=l(c,s),g=b.len;if(n._hasLabels=b.hasLabels,n._hasValues=b.hasValues,!n._hasLabels&&n._hasValues&&(o("label0"),o("dlabel")),!g){n.visible=!1;return}n._length=g;var A=o("marker.line.width");A&&o("marker.line.color"),o("marker.colors"),o("scalegroup");var v=o("text"),h=o("texttemplate"),x;if(h||(x=o("textinfo",Array.isArray(v)?"text+percent":"percent")),o("hovertext"),o("hovertemplate"),h||x&&x!=="none"){var C=o("textposition");p(r,n,a,o,C,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var D=Array.isArray(C)||C==="auto",L=D||C==="outside";L&&o("automargin"),(C==="inside"||C==="auto"||Array.isArray(C))&&o("insidetextorientation")}y(n,a,o);var w=o("hole"),M=o("title.text");if(M){var S=o("title.position",w?"middle center":"top center");!w&&S==="middle center"&&(n.title.position="top center"),m.coerceFont(o,"title.font",a.font)}o("sort"),o("direction"),o("rotation"),o("pull")}R.exports={handleLabelsAndValues:l,supplyDefaults:d}},20007:function(R,F,e){var i=e(23469).appendArrayMultiPointValues;R.exports=function(t,y){var p={curveNumber:y.index,pointNumbers:t.pts,data:y._input,fullData:y,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return t.pts.length===1&&(p.pointNumber=p.i=t.pts[0]),i(p,y,t.pts),y.type==="funnelarea"&&(delete p.v,delete p.i),p}},53581:function(R,F,e){var i=e(71828);function m(t){return t.indexOf("e")!==-1?t.replace(/[.]?0+e/,"e"):t.indexOf(".")!==-1?t.replace(/[.]?0+$/,""):t}F.formatPiePercent=function(y,p){var l=m((y*100).toPrecision(3));return i.numSeparate(l,p)+"%"},F.formatPieValue=function(y,p){var l=m(y.toPrecision(10));return i.numSeparate(l,p)},F.getFirstFilled=function(y,p){if(!!Array.isArray(y))for(var l=0;l0&&(Pe+=lt*_e.pxmid[0],Ve+=lt*_e.pxmid[1])}_e.cxFinal=Pe,_e.cyFinal=Ve;function vt(ot,qe,Oe,Ce){var pe=Ce*(qe[0]-ot[0]),be=Ce*(qe[1]-ot[1]);return"a"+Ce*oe.r+","+Ce*oe.r+" 0 "+_e.largeArc+(Oe?" 1 ":" 0 ")+pe+","+be}var mt=de.hole;if(_e.v===oe.vTotal){var Et="M"+(Pe+_e.px0[0])+","+(Ve+_e.px0[1])+vt(_e.px0,_e.pxmid,!0,1)+vt(_e.pxmid,_e.px0,!0,1)+"Z";mt?Ke.attr("d","M"+(Pe+mt*_e.px0[0])+","+(Ve+mt*_e.px0[1])+vt(_e.px0,_e.pxmid,!1,mt)+vt(_e.pxmid,_e.px0,!1,mt)+"Z"+Et):Ke.attr("d",Et)}else{var et=vt(_e.px0,_e.px1,!0,1);if(mt){var Ue=1-mt;Ke.attr("d","M"+(Pe+mt*_e.px1[0])+","+(Ve+mt*_e.px1[1])+vt(_e.px1,_e.px0,!1,mt)+"l"+Ue*_e.px0[0]+","+Ue*_e.px0[1]+et+"Z")}else Ke.attr("d","M"+Pe+","+Ve+"l"+_e.px0[0]+","+_e.px0[1]+et+"Z")}he(Z,_e,oe);var Be=s.castOption(de.textposition,_e.pts),rt=Ze.selectAll("g.slicetext").data(_e.text&&Be!=="none"?[0]:[]);rt.enter().append("g").classed("slicetext",!0),rt.exit().remove(),rt.each(function(){var ot=l.ensureSingle(i.select(this),"text","",function(st){st.attr("data-notex",1)}),qe=l.ensureUniformFontSize(Z,Be==="outside"?x(de,_e,ae.font):C(de,_e,ae.font));ot.text(_e.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(p.font,qe).call(n.convertToTspans,Z);var Oe=p.bBox(ot.node()),Ce;if(Be==="outside")Ce=O(Oe,_e);else if(Ce=L(Oe,_e,oe),Be==="auto"&&Ce.scale<1){var pe=l.ensureUniformFontSize(Z,de.outsidetextfont);ot.call(p.font,pe),Oe=p.bBox(ot.node()),Ce=O(Oe,_e)}var be=Ce.textPosAngle,Re=be===void 0?_e.pxmid:le(oe.r,be);if(Ce.targetX=Pe+Re[0]*Ce.rCenter+(Ce.x||0),Ce.targetY=Ve+Re[1]*Ce.rCenter+(Ce.y||0),$(Ce,Oe),Ce.outside){var He=Ce.targetY;_e.yLabelMin=He-Oe.height/2,_e.yLabelMid=He,_e.yLabelMax=He+Oe.height/2,_e.labelExtraX=0,_e.labelExtraY=0,Te=!0}Ce.fontSize=qe.size,a(de.type,Ce,ae),ne[Ye].transform=Ce,l.setTransormAndDisplay(ot,Ce)})});var Fe=i.select(this).selectAll("g.titletext").data(de.title.text?[0]:[]);if(Fe.enter().append("g").classed("titletext",!0),Fe.exit().remove(),Fe.each(function(){var _e=l.ensureSingle(i.select(this),"text","",function(Ve){Ve.attr("data-notex",1)}),Ye=de.title.text;de._meta&&(Ye=l.templateString(Ye,de._meta)),_e.text(Ye).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(p.font,de.title.font).call(n.convertToTspans,Z);var Pe;de.title.position==="middle center"?Pe=G(oe):Pe=z(oe,fe),_e.attr("transform",r(Pe.x,Pe.y)+d(Math.min(1,Pe.scale))+r(Pe.tx,Pe.ty))}),Te&&W(Se,de),v(we,de),Te&&de.automargin){var Ie=p.bBox(ce.node()),Me=de.domain,Ae=fe.w*(Me.x[1]-Me.x[0]),De=fe.h*(Me.y[1]-Me.y[0]),ke=(.5*Ae-oe.r)/fe.w,We=(.5*De-oe.r)/fe.h;m.autoMargin(Z,"pie."+de.uid+".automargin",{xl:Me.x[0]-ke,xr:Me.x[1]+ke,yb:Me.y[0]-We,yt:Me.y[1]+We,l:Math.max(oe.cx-oe.r-Ie.left,0),r:Math.max(Ie.right-(oe.cx+oe.r),0),b:Math.max(Ie.bottom-(oe.cy+oe.r),0),t:Math.max(oe.cy-oe.r-Ie.top,0),pad:5})}})});setTimeout(function(){te.selectAll("tspan").each(function(){var ne=i.select(this);ne.attr("dy")&&ne.attr("dy",ne.attr("dy"))})},0)}function v(Z,K){Z.each(function(Q){var ae=i.select(this);if(!Q.labelExtraX&&!Q.labelExtraY){ae.select("path.textline").remove();return}var fe=ae.select("g.slicetext text");Q.transform.targetX+=Q.labelExtraX,Q.transform.targetY+=Q.labelExtraY,l.setTransormAndDisplay(fe,Q.transform);var te=Q.cxFinal+Q.pxmid[0],ne=Q.cyFinal+Q.pxmid[1],ce="M"+te+","+ne,oe=(Q.yLabelMax-Q.yLabelMin)*(Q.pxmid[0]<0?-1:1)/4;if(Q.labelExtraX){var de=Q.labelExtraX*Q.pxmid[1]/Q.pxmid[0],we=Q.yLabelMid+Q.labelExtraY-(Q.cyFinal+Q.pxmid[1]);Math.abs(de)>Math.abs(we)?ce+="l"+we*Q.pxmid[0]/Q.pxmid[1]+","+we+"H"+(te+Q.labelExtraX+oe):ce+="l"+Q.labelExtraX+","+de+"v"+(we-de)+"h"+oe}else ce+="V"+(Q.yLabelMid+Q.labelExtraY)+"h"+oe;l.ensureSingle(ae,"path","textline").call(y.stroke,K.outsidetextfont.color).attr({"stroke-width":Math.min(2,K.outsidetextfont.size/8),d:ce,fill:"none"})})}function h(Z,K,Q){var ae=Q[0],fe=ae.cx,te=ae.cy,ne=ae.trace,ce=ne.type==="funnelarea";"_hasHoverLabel"in ne||(ne._hasHoverLabel=!1),"_hasHoverEvent"in ne||(ne._hasHoverEvent=!1),Z.on("mouseover",function(oe){var de=K._fullLayout,we=K._fullData[ne.index];if(!(K._dragging||de.hovermode===!1)){var Se=we.hoverinfo;if(Array.isArray(Se)&&(Se=t.castHoverinfo({hoverinfo:[s.castOption(Se,oe.pts)],_module:ne._module},de,0)),Se==="all"&&(Se="label+text+value+percent+name"),we.hovertemplate||Se!=="none"&&Se!=="skip"&&Se){var Te=oe.rInscribed||0,Fe=fe+oe.pxmid[0]*(1-Te),Ie=te+oe.pxmid[1]*(1-Te),Me=de.separators,Ae=[];if(Se&&Se.indexOf("label")!==-1&&Ae.push(oe.label),oe.text=s.castOption(we.hovertext||we.text,oe.pts),Se&&Se.indexOf("text")!==-1){var De=oe.text;l.isValidTextValue(De)&&Ae.push(De)}oe.value=oe.v,oe.valueLabel=s.formatPieValue(oe.v,Me),Se&&Se.indexOf("value")!==-1&&Ae.push(oe.valueLabel),oe.percent=oe.v/ae.vTotal,oe.percentLabel=s.formatPiePercent(oe.percent,Me),Se&&Se.indexOf("percent")!==-1&&Ae.push(oe.percentLabel);var ke=we.hoverlabel,We=ke.font,_e=[];t.loneHover({trace:ne,x0:Fe-Te*ae.r,x1:Fe+Te*ae.r,y:Ie,_x0:ce?fe+oe.TL[0]:Fe-Te*ae.r,_x1:ce?fe+oe.TR[0]:Fe+Te*ae.r,_y0:ce?te+oe.TL[1]:Ie-Te*ae.r,_y1:ce?te+oe.BL[1]:Ie+Te*ae.r,text:Ae.join("
"),name:we.hovertemplate||Se.indexOf("name")!==-1?we.name:void 0,idealAlign:oe.pxmid[0]<0?"left":"right",color:s.castOption(ke.bgcolor,oe.pts)||oe.color,borderColor:s.castOption(ke.bordercolor,oe.pts),fontFamily:s.castOption(We.family,oe.pts),fontSize:s.castOption(We.size,oe.pts),fontColor:s.castOption(We.color,oe.pts),nameLength:s.castOption(ke.namelength,oe.pts),textAlign:s.castOption(ke.align,oe.pts),hovertemplate:s.castOption(we.hovertemplate,oe.pts),hovertemplateLabels:oe,eventData:[b(oe,we)]},{container:de._hoverlayer.node(),outerContainer:de._paper.node(),gd:K,inOut_bbox:_e}),oe.bbox=_e[0],ne._hasHoverLabel=!0}ne._hasHoverEvent=!0,K.emit("plotly_hover",{points:[b(oe,we)],event:i.event})}}),Z.on("mouseout",function(oe){var de=K._fullLayout,we=K._fullData[ne.index],Se=i.select(this).datum();ne._hasHoverEvent&&(oe.originalEvent=i.event,K.emit("plotly_unhover",{points:[b(Se,we)],event:i.event}),ne._hasHoverEvent=!1),ne._hasHoverLabel&&(t.loneUnhover(de._hoverlayer.node()),ne._hasHoverLabel=!1)}),Z.on("click",function(oe){var de=K._fullLayout,we=K._fullData[ne.index];K._dragging||de.hovermode===!1||(K._hoverdata=[b(oe,we)],t.click(K,i.event))})}function x(Z,K,Q){var ae=s.castOption(Z.outsidetextfont.color,K.pts)||s.castOption(Z.textfont.color,K.pts)||Q.color,fe=s.castOption(Z.outsidetextfont.family,K.pts)||s.castOption(Z.textfont.family,K.pts)||Q.family,te=s.castOption(Z.outsidetextfont.size,K.pts)||s.castOption(Z.textfont.size,K.pts)||Q.size;return{color:ae,family:fe,size:te}}function C(Z,K,Q){var ae=s.castOption(Z.insidetextfont.color,K.pts);!ae&&Z._input.textfont&&(ae=s.castOption(Z._input.textfont.color,K.pts));var fe=s.castOption(Z.insidetextfont.family,K.pts)||s.castOption(Z.textfont.family,K.pts)||Q.family,te=s.castOption(Z.insidetextfont.size,K.pts)||s.castOption(Z.textfont.size,K.pts)||Q.size;return{color:ae||y.contrast(K.color),family:fe,size:te}}function D(Z,K){for(var Q,ae,fe=0;fe=-4;ke-=2)De(Math.PI*ke,"tan");for(ke=4;ke>=-4;ke-=2)De(Math.PI*(ke+1),"tan")}if(Se||Fe){for(ke=4;ke>=-4;ke-=2)De(Math.PI*(ke+1.5),"rad");for(ke=4;ke>=-4;ke-=2)De(Math.PI*(ke+.5),"rad")}}if(ce||Ie||Se){var We=Math.sqrt(Z.width*Z.width+Z.height*Z.height);if(Ae={scale:fe*ae*2/We,rCenter:1-fe,rotate:0},Ae.textPosAngle=(K.startangle+K.stopangle)/2,Ae.scale>=1)return Ae;Me.push(Ae)}(Ie||Fe)&&(Ae=M(Z,ae,ne,oe,de),Ae.textPosAngle=(K.startangle+K.stopangle)/2,Me.push(Ae)),(Ie||Te)&&(Ae=S(Z,ae,ne,oe,de),Ae.textPosAngle=(K.startangle+K.stopangle)/2,Me.push(Ae));for(var _e=0,Ye=0,Pe=0;Pe=1)break}return Me[_e]}function w(Z,K){var Q=Z.startangle,ae=Z.stopangle;return Q>K&&K>ae||Q0?1:-1)/2,y:te/(1+Q*Q/(ae*ae)),outside:!0}}function G(Z){var K=Math.sqrt(Z.titleBox.width*Z.titleBox.width+Z.titleBox.height*Z.titleBox.height);return{x:Z.cx,y:Z.cy,scale:Z.trace.hole*Z.r*2/K,tx:0,ty:-Z.titleBox.height/2+Z.trace.title.font.size}}function z(Z,K){var Q=1,ae=1,fe,te=Z.trace,ne={x:Z.cx,y:Z.cy},ce={tx:0,ty:0};ce.ty+=te.title.font.size,fe=B(te),te.title.position.indexOf("top")!==-1?(ne.y-=(1+fe)*Z.r,ce.ty-=Z.titleBox.height):te.title.position.indexOf("bottom")!==-1&&(ne.y+=(1+fe)*Z.r);var oe=U(Z.r,Z.trace.aspectratio),de=K.w*(te.domain.x[1]-te.domain.x[0])/2;return te.title.position.indexOf("left")!==-1?(de=de+oe,ne.x-=(1+fe)*oe,ce.tx+=Z.titleBox.width/2):te.title.position.indexOf("center")!==-1?de*=2:te.title.position.indexOf("right")!==-1&&(de=de+oe,ne.x+=(1+fe)*oe,ce.tx-=Z.titleBox.width/2),Q=de/Z.titleBox.width,ae=H(Z,K)/Z.titleBox.height,{x:ne.x,y:ne.y,scale:Math.min(Q,ae),tx:ce.tx,ty:ce.ty}}function U(Z,K){return Z/(K===void 0?1:K)}function H(Z,K){var Q=Z.trace,ae=K.h*(Q.domain.y[1]-Q.domain.y[0]);return Math.min(Z.titleBox.height,ae/2)}function B(Z){var K=Z.pull;if(!K)return 0;var Q;if(Array.isArray(K))for(K=0,Q=0;QK&&(K=Z.pull[Q]);return K}function W(Z,K){var Q,ae,fe,te,ne,ce,oe,de,we,Se,Te,Fe,Ie;function Me(We,_e){return We.pxmid[1]-_e.pxmid[1]}function Ae(We,_e){return _e.pxmid[1]-We.pxmid[1]}function De(We,_e){_e||(_e={});var Ye=_e.labelExtraY+(ae?_e.yLabelMax:_e.yLabelMin),Pe=ae?We.yLabelMin:We.yLabelMax,Ve=ae?We.yLabelMax:We.yLabelMin,Ze=We.cyFinal+ne(We.px0[1],We.px1[1]),Ke=Ye-Pe,lt,vt,mt,Et,et,Ue;if(Ke*oe>0&&(We.labelExtraY=Ke),!!Array.isArray(K.pull))for(vt=0;vt=(s.castOption(K.pull,mt.pts)||0))&&((We.pxmid[1]-mt.pxmid[1])*oe>0?(Et=mt.cyFinal+ne(mt.px0[1],mt.px1[1]),Ke=Et-Pe-We.labelExtraY,Ke*oe>0&&(We.labelExtraY+=Ke)):(Ve+We.labelExtraY-Ze)*oe>0&&(lt=3*ce*Math.abs(vt-Se.indexOf(We)),et=mt.cxFinal+te(mt.px0[0],mt.px1[0]),Ue=et+lt-(We.cxFinal+We.pxmid[0])-We.labelExtraX,Ue*ce>0&&(We.labelExtraX+=Ue)))}for(ae=0;ae<2;ae++)for(fe=ae?Me:Ae,ne=ae?Math.max:Math.min,oe=ae?1:-1,Q=0;Q<2;Q++){for(te=Q?Math.max:Math.min,ce=Q?1:-1,de=Z[ae][Q],de.sort(fe),we=Z[1-ae][Q],Se=we.concat(de),Fe=[],Te=0;Te1?(de=Q.r,we=de/fe.aspectratio):(we=Q.r,de=we*fe.aspectratio),de*=(1+fe.baseratio)/2,oe=de*we}ne=Math.min(ne,oe/Q.vTotal)}for(ae=0;aeK.vTotal/2?1:0,de.halfangle=Math.PI*Math.min(de.v/K.vTotal,.5),de.ring=1-ae.hole,de.rInscribed=k(de,K))}function le(Z,K){return[Z*Math.sin(K),-Z*Math.cos(K)]}function he(Z,K,Q){var ae=Z._fullLayout,fe=Q.trace,te=fe.texttemplate,ne=fe.textinfo;if(!te&&ne&&ne!=="none"){var ce=ne.split("+"),oe=function(_e){return ce.indexOf(_e)!==-1},de=oe("label"),we=oe("text"),Se=oe("value"),Te=oe("percent"),Fe=ae.separators,Ie;if(Ie=de?[K.label]:[],we){var Me=s.getFirstFilled(fe.text,K.pts);g(Me)&&Ie.push(Me)}Se&&Ie.push(s.formatPieValue(K.v,Fe)),Te&&Ie.push(s.formatPiePercent(K.v/Q.vTotal,Fe)),K.text=Ie.join("
")}function Ae(_e){return{label:_e.label,value:_e.v,valueLabel:s.formatPieValue(_e.v,ae.separators),percent:_e.v/Q.vTotal,percentLabel:s.formatPiePercent(_e.v/Q.vTotal,ae.separators),color:_e.color,text:_e.text,customdata:l.castOption(fe,_e.i,"customdata")}}if(te){var De=l.castOption(fe,K.i,"texttemplate");if(!De)K.text="";else{var ke=Ae(K),We=s.getFirstFilled(fe.text,K.pts);(g(We)||We==="")&&(ke.text=We),K.text=l.texttemplateString(De,ke,Z._fullLayout._d3locale,ke,fe._meta||{})}}}function $(Z,K){var Q=Z.rotate*Math.PI/180,ae=Math.cos(Q),fe=Math.sin(Q),te=(K.left+K.right)/2,ne=(K.top+K.bottom)/2;Z.textX=te*ae-ne*fe,Z.textY=te*fe+ne*ae,Z.noCenter=!0}R.exports={plot:A,formatSliceLabel:he,transformInsideText:L,determineInsideTextFont:C,positionTitleOutside:z,prerenderTitles:D,layoutAreas:q,attachFxHandlers:h,computeTransform:$}},68357:function(R,F,e){var i=e(39898),m=e(63463),t=e(72597).resizeText;R.exports=function(p){var l=p._fullLayout._pielayer.selectAll(".trace");t(p,l,"pie"),l.each(function(d){var r=d[0],n=r.trace,u=i.select(this);u.style({opacity:n.opacity}),u.selectAll("path.surface").each(function(a){i.select(this).call(m,a,n)})})}},63463:function(R,F,e){var i=e(7901),m=e(53581).castOption;R.exports=function(y,p,l){var d=l.marker.line,r=m(d.color,p.pts)||i.defaultLine,n=m(d.width,p.pts)||0;y.style("stroke-width",n).call(i.fill,p.color).call(i.stroke,r)}},10959:function(R,F,e){var i=e(82196);R.exports={x:i.x,y:i.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:i.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},42743:function(R,F,e){var i=e(9330).gl_pointcloud2d,m=e(78614),t=e(71739).findExtremes,y=e(34603);function p(r,n){this.scene=r,this.uid=n,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=i(r.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=p.prototype;l.handlePick=function(r){var n=this.idToIndex[r.pointId];return{trace:this,dataCoord:r.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[n*2],this.pickXYData[n*2+1]]:[this.pickXData[n],this.pickYData[n]],textLabel:Array.isArray(this.textLabels)?this.textLabels[n]:this.textLabels,color:this.color,name:this.name,pointIndex:n,hoverinfo:this.hoverinfo}},l.update=function(r){this.index=r.index,this.textLabels=r.text,this.name=r.name,this.hoverinfo=r.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(r),this.color=y(r,{})},l.updateFast=function(r){var n=this.xData=this.pickXData=r.x,u=this.yData=this.pickYData=r.y,a=this.pickXYData=r.xy,o=r.xbounds&&r.ybounds,c=r.indices,s,b,g,A=this.bounds,v,h,x;if(a){if(g=a,s=a.length>>>1,o)A[0]=r.xbounds[0],A[2]=r.xbounds[1],A[1]=r.ybounds[0],A[3]=r.ybounds[1];else for(x=0;xA[2]&&(A[2]=v),hA[3]&&(A[3]=h);if(c)b=c;else for(b=new Int32Array(s),x=0;xA[2]&&(A[2]=v),hA[3]&&(A[3]=h);this.idToIndex=b,this.pointcloudOptions.idToIndex=b,this.pointcloudOptions.positions=g;var C=m(r.marker.color),D=m(r.marker.border.color),L=r.opacity*r.marker.opacity;C[3]*=L,this.pointcloudOptions.color=C;var w=r.marker.blend;if(w===null){var M=100;w=n.lengthD&&(D=a.source[v]),a.target[v]>D&&(D=a.target[v]);var L=D+1;n.node._count=L;var w,M=n.node.groups,S={};for(v=0;v0&&p(G,L)&&p(z,L))&&!(S.hasOwnProperty(G)&&S.hasOwnProperty(z)&&S[G]===S[z])){S.hasOwnProperty(z)&&(z=S[z]),S.hasOwnProperty(G)&&(G=S[G]),G=+G,z=+z,b[G]=b[z]=!0;var U="";a.label&&a.label[v]&&(U=a.label[v]);var H=null;U&&g.hasOwnProperty(U)&&(H=g[U]),o.push({pointNumber:v,label:U,color:c?a.color[v]:a.color,customdata:s?a.customdata[v]:a.customdata,concentrationscale:H,source:G,target:z,value:+O}),k.source.push(G),k.target.push(z)}}var B=L+M.length,W=y(u.color),q=y(u.customdata),re=[];for(v=0;vL-1,childrenNodes:[],pointNumber:v,label:ie,color:W?u.color[v]:u.color,customdata:q?u.customdata[v]:u.customdata})}var le=!1;return r(B,k.source,k.target)&&(le=!0),{circular:le,links:o,nodes:re,groups:M,groupLookup:S}}function r(n,u,a){for(var o=m.init2dArray(n,0),c=0;c1})}R.exports=function(u,a){var o=d(a);return t({circular:o.circular,_nodes:o.nodes,_links:o.links,_groups:o.groups,_groupLookup:o.groupLookup})}},85247:function(R){R.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}},26857:function(R,F,e){var i=e(71828),m=e(39953),t=e(7901),y=e(84267),p=e(27670).c,l=e(38048),d=e(44467),r=e(85501);R.exports=function(a,o,c,s){function b(f,P){return i.coerce(a,o,m,f,P)}var g=i.extendDeep(s.hoverlabel,a.hoverlabel),A=a.node,v=d.newContainer(o,"node");function h(f,P){return i.coerce(A,v,m.node,f,P)}h("label"),h("groups"),h("x"),h("y"),h("pad"),h("thickness"),h("line.color"),h("line.width"),h("hoverinfo",a.hoverinfo),l(A,v,h,g),h("hovertemplate");var x=s.colorway,C=function(f){return x[f%x.length]};h("color",v.label.map(function(f,P){return t.addOpacity(C(P),.8)})),h("customdata");var D=a.link||{},L=d.newContainer(o,"link");function w(f,P){return i.coerce(D,L,m.link,f,P)}w("label"),w("arrowlen"),w("source"),w("target"),w("value"),w("line.color"),w("line.width"),w("hoverinfo",a.hoverinfo),l(D,L,w,g),w("hovertemplate");var M=y(s.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";w("color",i.repeat(M,L.value.length)),w("customdata"),r(D,L,{name:"colorscales",handleItemDefaults:n}),p(o,s,b),b("orientation"),b("valueformat"),b("valuesuffix");var S;v.x.length&&v.y.length&&(S="freeform"),b("arrangement",S),i.coerceFont(b,"textfont",i.extendFlat({},s.font)),o._length=null};function n(u,a){function o(c,s){return i.coerce(u,a,m.link.colorscales,c,s)}o("label"),o("cmin"),o("cmax"),o("colorscale")}},29396:function(R,F,e){R.exports={attributes:e(39953),supplyDefaults:e(26857),calc:e(92930),plot:e(60436),moduleType:"trace",name:"sankey",basePlotModule:e(75536),selectPoints:e(84564),categories:["noOpacity"],meta:{}}},60436:function(R,F,e){var i=e(39898),m=e(71828),t=m.numberFormat,y=e(3393),p=e(30211),l=e(7901),d=e(85247).cn,r=m._;function n(x){return x!==""}function u(x,C){return x.filter(function(D){return D.key===C.traceId})}function a(x,C){i.select(x).select("path").style("fill-opacity",C),i.select(x).select("rect").style("fill-opacity",C)}function o(x){i.select(x).select("text.name").style("fill","black")}function c(x){return function(C){return x.node.sourceLinks.indexOf(C.link)!==-1||x.node.targetLinks.indexOf(C.link)!==-1}}function s(x){return function(C){return C.node.sourceLinks.indexOf(x.link)!==-1||C.node.targetLinks.indexOf(x.link)!==-1}}function b(x,C,D){C&&D&&u(D,C).selectAll("."+d.sankeyLink).filter(c(C)).call(A.bind(0,C,D,!1))}function g(x,C,D){C&&D&&u(D,C).selectAll("."+d.sankeyLink).filter(c(C)).call(v.bind(0,C,D,!1))}function A(x,C,D,L){var w=L.datum().link.label;L.style("fill-opacity",function(M){if(!M.link.concentrationscale)return .4}),w&&u(C,x).selectAll("."+d.sankeyLink).filter(function(M){return M.link.label===w}).style("fill-opacity",function(M){if(!M.link.concentrationscale)return .4}),D&&u(C,x).selectAll("."+d.sankeyNode).filter(s(x)).call(b)}function v(x,C,D,L){var w=L.datum().link.label;L.style("fill-opacity",function(M){return M.tinyColorAlpha}),w&&u(C,x).selectAll("."+d.sankeyLink).filter(function(M){return M.link.label===w}).style("fill-opacity",function(M){return M.tinyColorAlpha}),D&&u(C,x).selectAll(d.sankeyNode).filter(s(x)).call(g)}function h(x,C){var D=x.hoverlabel||{},L=m.nestedProperty(D,C).get();return Array.isArray(L)?!1:L}R.exports=function(C,D){for(var L=C._fullLayout,w=L._paper,M=L._size,S=0;S"),color:h($,"bgcolor")||l.addOpacity(fe.color,1),borderColor:h($,"bordercolor"),fontFamily:h($,"font.family"),fontSize:h($,"font.size"),fontColor:h($,"font.color"),nameLength:h($,"namelength"),textAlign:h($,"align"),idealAlign:i.event.x"),color:h($,"bgcolor")||he.tinyColorHue,borderColor:h($,"bordercolor"),fontFamily:h($,"font.family"),fontSize:h($,"font.size"),fontColor:h($,"font.color"),nameLength:h($,"namelength"),textAlign:h($,"align"),idealAlign:"left",hovertemplate:$.hovertemplate,hovertemplateLabels:ne,eventData:[he.node]},{container:L._hoverlayer.node(),outerContainer:L._paper.node(),gd:C});a(de,.85),o(de)}}},ie=function(le,he,$){C._fullLayout.hovermode!==!1&&(i.select(le).call(g,he,$),he.node.trace.node.hoverinfo!=="skip"&&(he.node.fullData=he.node.trace,C.emit("plotly_unhover",{event:i.event,points:[he.node]})),p.loneUnhover(L._hoverlayer.node()))};y(C,w,D,{width:M.w,height:M.h,margin:{t:M.t,r:M.r,b:M.b,l:M.l}},{linkEvents:{hover:E,follow:H,unhover:B,select:P},nodeEvents:{hover:q,follow:re,unhover:ie,select:W}})}},3393:function(R,F,e){var i=e(49887),m=e(81684).k4,t=e(39898),y=e(30838),p=e(86781),l=e(85247),d=e(84267),r=e(7901),n=e(91424),u=e(71828),a=u.strTranslate,o=u.strRotate,c=e(28984),s=c.keyFun,b=c.repeat,g=c.unwrap,A=e(63893),v=e(73972),h=e(18783),x=h.CAP_SHIFT,C=h.LINE_SPACING,D=3;function L(K,Q,ae){var fe=g(Q),te=fe.trace,ne=te.domain,ce=te.orientation==="h",oe=te.node.pad,de=te.node.thickness,we=K.width*(ne.x[1]-ne.x[0]),Se=K.height*(ne.y[1]-ne.y[0]),Te=fe._nodes,Fe=fe._links,Ie=fe.circular,Me;Ie?Me=p.sankeyCircular().circularLinkGap(0):Me=y.sankey(),Me.iterations(l.sankeyIterations).size(ce?[we,Se]:[Se,we]).nodeWidth(de).nodePadding(oe).nodeId(function(et){return et.pointNumber}).nodes(Te).links(Fe);var Ae=Me();Me.nodePadding()=ot||(rt=ot-Be.y0,rt>1e-6&&(Be.y0+=rt,Be.y1+=rt)),ot=Be.y1+oe})}function lt(et){var Ue=et.map(function(pe,be){return{x0:pe.x0,index:be}}).sort(function(pe,be){return pe.x0-be.x0}),Be=[],rt=-1,ot,qe=-1/0,Oe;for(De=0;Deqe+de&&(rt+=1,ot=Ce.x0),qe=Ce.x0,Be[rt]||(Be[rt]=[]),Be[rt].push(Ce),Oe=ot-Ce.x0,Ce.x0+=Oe,Ce.x1+=Oe}return Be}if(te.node.x.length&&te.node.y.length){for(De=0;De0?"L"+te.targetX+" "+te.targetY:"")+"Z":ae="M "+(te.targetX-Q)+" "+(te.targetY-fe)+" L"+(te.rightInnerExtent-Q)+" "+(te.targetY-fe)+"A"+(te.rightLargeArcRadius+fe)+" "+(te.rightSmallArcRadius+fe)+" 0 0 0 "+(te.rightFullExtent-fe-Q)+" "+(te.targetY+te.rightSmallArcRadius)+"L"+(te.rightFullExtent-fe-Q)+" "+te.verticalRightInnerExtent+"A"+(te.rightLargeArcRadius+fe)+" "+(te.rightLargeArcRadius+fe)+" 0 0 0 "+(te.rightInnerExtent-Q)+" "+(te.verticalFullExtent+fe)+"L"+te.leftInnerExtent+" "+(te.verticalFullExtent+fe)+"A"+(te.leftLargeArcRadius+fe)+" "+(te.leftLargeArcRadius+fe)+" 0 0 0 "+(te.leftFullExtent+fe)+" "+te.verticalLeftInnerExtent+"L"+(te.leftFullExtent+fe)+" "+(te.sourceY+te.leftSmallArcRadius)+"A"+(te.leftLargeArcRadius+fe)+" "+(te.leftSmallArcRadius+fe)+" 0 0 0 "+te.leftInnerExtent+" "+(te.sourceY-fe)+"L"+te.sourceX+" "+(te.sourceY-fe)+"L"+te.sourceX+" "+(te.sourceY+fe)+"L"+te.leftInnerExtent+" "+(te.sourceY+fe)+"A"+(te.leftLargeArcRadius-fe)+" "+(te.leftSmallArcRadius-fe)+" 0 0 1 "+(te.leftFullExtent-fe)+" "+(te.sourceY+te.leftSmallArcRadius)+"L"+(te.leftFullExtent-fe)+" "+te.verticalLeftInnerExtent+"A"+(te.leftLargeArcRadius-fe)+" "+(te.leftLargeArcRadius-fe)+" 0 0 1 "+te.leftInnerExtent+" "+(te.verticalFullExtent-fe)+"L"+(te.rightInnerExtent-Q)+" "+(te.verticalFullExtent-fe)+"A"+(te.rightLargeArcRadius-fe)+" "+(te.rightLargeArcRadius-fe)+" 0 0 1 "+(te.rightFullExtent+fe-Q)+" "+te.verticalRightInnerExtent+"L"+(te.rightFullExtent+fe-Q)+" "+(te.targetY+te.rightSmallArcRadius)+"A"+(te.rightLargeArcRadius-fe)+" "+(te.rightSmallArcRadius-fe)+" 0 0 1 "+(te.rightInnerExtent-Q)+" "+(te.targetY+fe)+"L"+(te.targetX-Q)+" "+(te.targetY+fe)+(Q>0?"L"+te.targetX+" "+te.targetY:"")+"Z",ae}function S(){var K=.5;function Q(ae){var fe=ae.linkArrowLength;if(ae.link.circular)return M(ae.link,fe);var te=Math.abs((ae.link.target.x0-ae.link.source.x1)/2);fe>te&&(fe=te);var ne=ae.link.source.x1,ce=ae.link.target.x0-fe,oe=m(ne,ce),de=oe(K),we=oe(1-K),Se=ae.link.y0-ae.link.width/2,Te=ae.link.y0+ae.link.width/2,Fe=ae.link.y1-ae.link.width/2,Ie=ae.link.y1+ae.link.width/2,Me="M"+ne+","+Se,Ae="C"+de+","+Se+" "+we+","+Fe+" "+ce+","+Fe,De="C"+we+","+Ie+" "+de+","+Te+" "+ne+","+Te,ke=fe>0?"L"+(ce+fe)+","+(Fe+ae.link.width/2):"";return ke+="L"+ce+","+Ie,Me+Ae+ke+De+"Z"}return Q}function f(K,Q){var ae=d(Q.color),fe=l.nodePadAcross,te=K.nodePad/2;Q.dx=Q.x1-Q.x0,Q.dy=Q.y1-Q.y0;var ne=Q.dx,ce=Math.max(.5,Q.dy),oe="node_"+Q.pointNumber;return Q.group&&(oe=u.randstr()),Q.trace=K.trace,Q.curveNumber=K.trace.index,{index:Q.pointNumber,key:oe,partOfGroup:Q.partOfGroup||!1,group:Q.group,traceId:K.key,trace:K.trace,node:Q,nodePad:K.nodePad,nodeLineColor:K.nodeLineColor,nodeLineWidth:K.nodeLineWidth,textFont:K.textFont,size:K.horizontal?K.height:K.width,visibleWidth:Math.ceil(ne),visibleHeight:ce,zoneX:-fe,zoneY:-te,zoneWidth:ne+2*fe,zoneHeight:ce+2*te,labelY:K.horizontal?Q.dy/2+1:Q.dx/2+1,left:Q.originalLayer===1,sizeAcross:K.width,forceLayouts:K.forceLayouts,horizontal:K.horizontal,darkBackground:ae.getBrightness()<=128,tinyColorHue:r.tinyRGB(ae),tinyColorAlpha:ae.getAlpha(),valueFormat:K.valueFormat,valueSuffix:K.valueSuffix,sankey:K.sankey,graph:K.graph,arrangement:K.arrangement,uniqueNodeLabelPathId:[K.guid,K.key,oe].join("_"),interactionState:K.interactionState,figure:K}}function P(K){K.attr("transform",function(Q){return a(Q.node.x0.toFixed(3),Q.node.y0.toFixed(3))})}function E(K){K.call(P)}function k(K,Q){K.call(E),Q.attr("d",S())}function O(K){K.attr("width",function(Q){return Q.node.x1-Q.node.x0}).attr("height",function(Q){return Q.visibleHeight})}function G(K){return K.link.width>1||K.linkLineWidth>0}function z(K){var Q=a(K.translateX,K.translateY);return Q+(K.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function U(K,Q,ae){K.on(".basic",null).on("mouseover.basic",function(fe){!fe.interactionState.dragInProgress&&!fe.partOfGroup&&(ae.hover(this,fe,Q),fe.interactionState.hovered=[this,fe])}).on("mousemove.basic",function(fe){!fe.interactionState.dragInProgress&&!fe.partOfGroup&&(ae.follow(this,fe),fe.interactionState.hovered=[this,fe])}).on("mouseout.basic",function(fe){!fe.interactionState.dragInProgress&&!fe.partOfGroup&&(ae.unhover(this,fe,Q),fe.interactionState.hovered=!1)}).on("click.basic",function(fe){fe.interactionState.hovered&&(ae.unhover(this,fe,Q),fe.interactionState.hovered=!1),!fe.interactionState.dragInProgress&&!fe.partOfGroup&&ae.select(this,fe,Q)})}function H(K,Q,ae,fe){var te=t.behavior.drag().origin(function(ne){return{x:ne.node.x0+ne.visibleWidth/2,y:ne.node.y0+ne.visibleHeight/2}}).on("dragstart",function(ne){if(ne.arrangement!=="fixed"&&(u.ensureSingle(fe._fullLayout._infolayer,"g","dragcover",function(oe){fe._fullLayout._dragCover=oe}),u.raiseToTop(this),ne.interactionState.dragInProgress=ne.node,le(ne.node),ne.interactionState.hovered&&(ae.nodeEvents.unhover.apply(0,ne.interactionState.hovered),ne.interactionState.hovered=!1),ne.arrangement==="snap")){var ce=ne.traceId+"|"+ne.key;ne.forceLayouts[ce]?ne.forceLayouts[ce].alpha(1):B(K,ce,ne),W(K,Q,ne,ce,fe)}}).on("drag",function(ne){if(ne.arrangement!=="fixed"){var ce=t.event.x,oe=t.event.y;ne.arrangement==="snap"?(ne.node.x0=ce-ne.visibleWidth/2,ne.node.x1=ce+ne.visibleWidth/2,ne.node.y0=oe-ne.visibleHeight/2,ne.node.y1=oe+ne.visibleHeight/2):(ne.arrangement==="freeform"&&(ne.node.x0=ce-ne.visibleWidth/2,ne.node.x1=ce+ne.visibleWidth/2),oe=Math.max(0,Math.min(ne.size-ne.visibleHeight/2,oe)),ne.node.y0=oe-ne.visibleHeight/2,ne.node.y1=oe+ne.visibleHeight/2),le(ne.node),ne.arrangement!=="snap"&&(ne.sankey.update(ne.graph),k(K.filter(he(ne)),Q))}}).on("dragend",function(ne){if(ne.arrangement!=="fixed"){ne.interactionState.dragInProgress=!1;for(var ce=0;ce0)window.requestAnimationFrame(ne);else{var de=ae.node.originalX;ae.node.x0=de-ae.visibleWidth/2,ae.node.x1=de+ae.visibleWidth/2,re(ae,te)}})}function q(K,Q,ae,fe){return function(){for(var ne=0,ce=0;ce0&&fe.forceLayouts[Q].alpha(0)}}function re(K,Q){for(var ae=[],fe=[],te=0;tez&&P[H].gap;)H--;for(W=P[H].s,U=P.length-1;U>H;U--)P[U].s=W;for(;zO[g]&&g=0;c--){var s=p[c];if(s.type==="scatter"&&s.xaxis===a.xaxis&&s.yaxis===a.yaxis){s.opacity=void 0;break}}}}}},17438:function(R,F,e){var i=e(71828),m=e(73972),t=e(82196),y=e(47581),p=e(34098),l=e(67513),d=e(73927),r=e(565),n=e(49508),u=e(11058),a=e(94039),o=e(82410),c=e(28908),s=e(71828).coercePattern;R.exports=function(g,A,v,h){function x(P,E){return i.coerce(g,A,t,P,E)}var C=l(g,A,h,x);if(C||(A.visible=!1),!!A.visible){d(g,A,h,x),x("xhoverformat"),x("yhoverformat");var D=r(g,A,h,x);h.scattermode==="group"&&A.orientation===void 0&&x("orientation","v");var L=!D&&C=Math.min(we,Se)&&g<=Math.max(we,Se)?0:1/0}var Te=Math.max(3,de.mrc||0),Fe=1-1/Te,Ie=Math.abs(s.c2p(de.x)-g);return Ie=Math.min(we,Se)&&A<=Math.max(we,Se)?0:1/0}var Te=Math.max(3,de.mrc||0),Fe=1-1/Te,Ie=Math.abs(b.c2p(de.y)-A);return Iece!=ne>=ce&&(ae=K[$-1][0],fe=K[$][0],ne-te&&(Q=ae+(fe-ae)*(ce-te)/(ne-te),q=Math.min(q,Q),re=Math.max(re,Q)));q=Math.max(q,0),re=Math.min(re,s._length);var oe=p.defaultLine;return p.opacity(c.fillcolor)?oe=c.fillcolor:p.opacity((c.line||{}).color)&&(oe=c.line.color),i.extendFlat(r,{distance:r.maxHoverDistance,x0:q,x1:re,y0:ce,y1:ce,color:oe,hovertemplate:!1}),delete r.index,c.text&&!Array.isArray(c.text)?r.text=String(c.text):r.text=c.name,[r]}}}},67368:function(R,F,e){var i=e(34098);R.exports={hasLines:i.hasLines,hasMarkers:i.hasMarkers,hasText:i.hasText,isBubble:i.isBubble,attributes:e(82196),layoutAttributes:e(21479),supplyDefaults:e(17438),crossTraceDefaults:e(34936),supplyLayoutDefaults:e(79334),calc:e(47761).calc,crossTraceCalc:e(72626),arraysToCalcdata:e(75225),plot:e(32663),colorbar:e(4898),formatLabels:e(8225),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(33720),selectPoints:e(98002),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:e(93612),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},21479:function(R){R.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},79334:function(R,F,e){var i=e(71828),m=e(21479);R.exports=function(t,y){function p(d,r){return i.coerce(t,y,m,d,r)}var l=y.barmode==="group";y.scattermode==="group"&&p("scattergap",l?y.bargap:.2)}},11058:function(R,F,e){var i=e(71828).isArrayOrTypedArray,m=e(52075).hasColorscale,t=e(1586);R.exports=function(p,l,d,r,n,u){u||(u={});var a=(p.marker||{}).color;if(n("line.color",d),m(p,"line"))t(p,l,r,n,{prefix:"line.",cLetter:"c"});else{var o=(i(a)?!1:a)||d;n("line.color",o)}n("line.width"),u.noDash||n("line.dash"),u.backoff&&n("line.backoff")}},34621:function(R,F,e){var i=e(91424),m=e(50606),t=m.BADNUM,y=m.LOG_CLIP,p=y+.5,l=y-.5,d=e(71828),r=d.segmentsIntersect,n=d.constrain,u=e(47581);R.exports=function(o,c){var s=c.trace||{},b=c.xaxis,g=c.yaxis,A=b.type==="log",v=g.type==="log",h=b._length,x=g._length,C=c.backoff,D=s.marker,L=c.connectGaps,w=c.baseTolerance,M=c.shape,S=M==="linear",f=s.fill&&s.fill!=="none",P=[],E=u.minTolerance,k=o.length,O=new Array(k),G=0,z,U,H,B,W,q,re,ie,le,he,$,Z,K,Q,ae,fe;function te(bt){var Lt=o[bt];if(!Lt)return!1;var Ut=c.linearized?b.l2p(Lt.x):b.c2p(Lt.x),Gt=c.linearized?g.l2p(Lt.y):g.c2p(Lt.y);if(Ut===t){if(A&&(Ut=b.c2p(Lt.x,!0)),Ut===t)return!1;v&&Gt===t&&(Ut*=Math.abs(b._m*x*(b._m>0?p:l)/(g._m*h*(g._m>0?p:l)))),Ut*=1e3}if(Gt===t){if(v&&(Gt=g.c2p(Lt.y,!0)),Gt===t)return!1;Gt*=1e3}return[Ut,Gt]}function ne(bt,Lt,Ut,Gt){var Ft=Ut-bt,tr=Gt-Lt,lr=.5-bt,Or=.5-Lt,xt=Ft*Ft+tr*tr,jt=Ft*lr+tr*Or;if(jt>0&&jt1||Math.abs(lr.y-Ut[0][1])>1)&&(lr=[lr.x,lr.y],Gt&&we(lr,bt)Fe||bt[1]Me)return[n(bt[0],Te,Fe),n(bt[1],Ie,Me)]}function Ke(bt,Lt){if(bt[0]===Lt[0]&&(bt[0]===Te||bt[0]===Fe)||bt[1]===Lt[1]&&(bt[1]===Ie||bt[1]===Me))return!0}function lt(bt,Lt){var Ut=[],Gt=Ze(bt),Ft=Ze(Lt);return Gt&&Ft&&Ke(Gt,Ft)||(Gt&&Ut.push(Gt),Ft&&Ut.push(Ft)),Ut}function vt(bt,Lt,Ut){return function(Gt,Ft){var tr=Ze(Gt),lr=Ze(Ft),Or=[];if(tr&&lr&&Ke(tr,lr))return Or;tr&&Or.push(tr),lr&&Or.push(lr);var xt=2*d.constrain((Gt[bt]+Ft[bt])/2,Lt,Ut)-((tr||Gt)[bt]+(lr||Ft)[bt]);if(xt){var jt;tr&&lr?jt=xt>0==tr[bt]>lr[bt]?tr:lr:jt=tr||lr,jt[bt]+=xt}return Or}}var mt;M==="linear"||M==="spline"?mt=Ve:M==="hv"||M==="vh"?mt=lt:M==="hvh"?mt=vt(0,Te,Fe):M==="vhv"&&(mt=vt(1,Ie,Me));function Et(bt,Lt){var Ut=Lt[0]-bt[0],Gt=(Lt[1]-bt[1])/Ut,Ft=(bt[1]*Lt[0]-Lt[1]*bt[0])/Ut;return Ft>0?[Gt>0?Te:Fe,Me]:[Gt>0?Fe:Te,Ie]}function et(bt){var Lt=bt[0],Ut=bt[1],Gt=Lt===O[G-1][0],Ft=Ut===O[G-1][1];if(!(Gt&&Ft))if(G>1){var tr=Lt===O[G-2][0],lr=Ut===O[G-2][1];Gt&&(Lt===Te||Lt===Fe)&&tr?lr?G--:O[G-1]=bt:Ft&&(Ut===Ie||Ut===Me)&&lr?tr?G--:O[G-1]=bt:O[G++]=bt}else O[G++]=bt}function Ue(bt){O[G-1][0]!==bt[0]&&O[G-1][1]!==bt[1]&&et([We,_e]),et(bt),Ye=null,We=_e=0}var Be=d.isArrayOrTypedArray(D);function rt(bt){if(bt&&C&&(bt.i=z,bt.d=o,bt.trace=s,bt.marker=Be?D[bt.i]:D,bt.backoff=C),ce=bt[0]/h,oe=bt[1]/x,De=bt[0]Fe?Fe:0,ke=bt[1]Me?Me:0,De||ke){if(!G)O[G++]=[De||bt[0],ke||bt[1]];else if(Ye){var Lt=mt(Ye,bt);Lt.length>1&&(Ue(Lt[0]),O[G++]=Lt[1])}else Pe=mt(O[G-1],bt)[0],O[G++]=Pe;var Ut=O[G-1];De&&ke&&(Ut[0]!==De||Ut[1]!==ke)?(Ye&&(We!==De&&_e!==ke?et(We&&_e?Et(Ye,bt):[We||De,_e||ke]):We&&_e&&et([We,_e])),et([De,ke])):We-De&&_e-ke&&et([De||We,ke||_e]),Ye=bt,We=De,_e=ke}else Ye&&Ue(mt(Ye,bt)[0]),O[G++]=bt}for(z=0;zde(q,ot))break;H=q,K=le[0]*ie[0]+le[1]*ie[1],K>$?($=K,B=q,re=!1):K=o.length||!q)break;rt(q),U=q}}Ye&&et([We||Ye[0],_e||Ye[1]]),P.push(O.slice(0,G))}var qe=M.slice(M.length-1);if(C&&qe!=="h"&&qe!=="v"){for(var Oe=!1,Ce=-1,pe=[],be=0;be=0?r=c:(r=c=o,o++),r0?Math.max(u,d):0}}},4898:function(R){R.exports={container:"marker",min:"cmin",max:"cmax"}},49508:function(R,F,e){var i=e(7901),m=e(52075).hasColorscale,t=e(1586),y=e(34098);R.exports=function(l,d,r,n,u,a){var o=y.isBubble(l),c=(l.line||{}).color,s;if(a=a||{},c&&(r=c),u("marker.symbol"),u("marker.opacity",o?.7:1),u("marker.size"),a.noAngle||(u("marker.angle"),a.noAngleRef||u("marker.angleref"),a.noStandOff||u("marker.standoff")),u("marker.color",r),m(l,"marker")&&t(l,d,n,u,{prefix:"marker.",cLetter:"c"}),a.noSelect||(u("selected.marker.color"),u("unselected.marker.color"),u("selected.marker.size"),u("unselected.marker.size")),a.noLine||(c&&!Array.isArray(c)&&d.marker.color!==c?s=c:o?s=i.background:s=i.defaultLine,u("marker.line.color",s),m(l,"marker.line")&&t(l,d,n,u,{prefix:"marker.line.",cLetter:"c"}),u("marker.line.width",o?1:0)),o&&(u("marker.sizeref"),u("marker.sizemin"),u("marker.sizemode")),a.gradient){var b=u("marker.gradient.type");b!=="none"&&u("marker.gradient.color")}}},73927:function(R,F,e){var i=e(71828).dateTick0,m=e(50606),t=m.ONEWEEK;function y(p,l){return p%t===0?i(l,1):i(l,0)}R.exports=function(l,d,r,n,u){if(u||(u={x:!0,y:!0}),u.x){var a=n("xperiod");a&&(n("xperiod0",y(a,d.xcalendar)),n("xperiodalignment"))}if(u.y){var o=n("yperiod");o&&(n("yperiod0",y(o,d.ycalendar)),n("yperiodalignment"))}}},32663:function(R,F,e){var i=e(39898),m=e(73972),t=e(71828),y=t.ensureSingle,p=t.identity,l=e(91424),d=e(34098),r=e(34621),n=e(68687),u=e(61082).tester;R.exports=function(b,g,A,v,h,x){var C,D,L=!h,w=!!h&&h.duration>0,M=n(b,g,A);if(C=v.selectAll("g.trace").data(M,function(f){return f[0].trace.uid}),C.enter().append("g").attr("class",function(f){return"trace scatter trace"+f[0].trace.uid}).style("stroke-miterlimit",2),C.order(),a(b,C,g),w){x&&(D=x());var S=i.transition().duration(h.duration).ease(h.easing).each("end",function(){D&&D()}).each("interrupt",function(){D&&D()});S.each(function(){v.selectAll("g.trace").each(function(f,P){o(b,P,g,f,M,this,h)})})}else C.each(function(f,P){o(b,P,g,f,M,this,h)});L&&C.exit().remove(),v.selectAll("path:not([d])").remove()};function a(s,b,g){b.each(function(A){var v=y(i.select(this),"g","fills");l.setClipUrl(v,g.layerClipId,s);var h=A[0].trace,x=[];h._ownfill&&x.push("_ownFill"),h._nexttrace&&x.push("_nextFill");var C=v.selectAll("g").data(x,p);C.enter().append("g"),C.exit().each(function(D){h[D]=null}).remove(),C.order().each(function(D){h[D]=y(i.select(this),"path","js-fill")})})}function o(s,b,g,A,v,h,x){var C=s._context.staticPlot,D;c(s,b,g,A,v);var L=!!x&&x.duration>0;function w(_e){return L?_e.transition():_e}var M=g.xaxis,S=g.yaxis,f=A[0].trace,P=f.line,E=i.select(h),k=y(E,"g","errorbars"),O=y(E,"g","lines"),G=y(E,"g","points"),z=y(E,"g","text");if(m.getComponentMethod("errorbars","plot")(s,k,g,x),f.visible!==!0)return;w(E).style("opacity",f.opacity);var U,H,B=f.fill.charAt(f.fill.length-1);B!=="x"&&B!=="y"&&(B=""),A[0][g.isRangePlot?"nodeRangePlot3":"node3"]=E;var W="",q=[],re=f._prevtrace;re&&(W=re._prevRevpath||"",H=re._nextFill,q=re._polygons);var ie,le,he="",$="",Z,K,Q,ae,fe,te,ne,ce=[],oe=t.noop;if(U=f._ownFill,d.hasLines(f)||f.fill!=="none"){for(H&&H.datum(A),["hv","vh","hvh","vhv"].indexOf(P.shape)!==-1?(Z=l.steps(P.shape),K=l.steps(P.shape.split("").reverse().join(""))):P.shape==="spline"?Z=K=function(_e){var Ye=_e[_e.length-1];return _e.length>1&&_e[0][0]===Ye[0]&&_e[0][1]===Ye[1]?l.smoothclosed(_e.slice(1),P.smoothing):l.smoothopen(_e,P.smoothing)}:Z=K=function(_e){return"M"+_e.join("L")},Q=function(_e){return K(_e.reverse())},ce=r(A,{xaxis:M,yaxis:S,trace:f,connectGaps:f.connectgaps,baseTolerance:Math.max(P.width||1,3)/4,shape:P.shape,backoff:P.backoff,simplify:P.simplify,fill:f.fill}),ne=f._polygons=new Array(ce.length),D=0;D=C[0]&&E.x<=C[1]&&E.y>=D[0]&&E.y<=D[1]}),S=Math.ceil(M.length/w),f=0;v.forEach(function(E,k){var O=E[0].trace;d.hasMarkers(O)&&O.marker.maxdisplayed>0&&k0){var g=r.c2l(s);r._lowerLogErrorBound||(r._lowerLogErrorBound=g),r._lowerErrorBound=Math.min(r._lowerLogErrorBound,g)}}else u[a]=[-o[0]*d,o[1]*d]}return u}function t(p){for(var l=0;l-1?-1:E.indexOf("right")>-1?1:0}function x(E){return E==null?0:E.indexOf("top")>-1?-1:E.indexOf("bottom")>-1?1:0}function C(E){var k=0,O=0,G=[k,O];if(Array.isArray(E))for(var z=0;z=0){var q=A(B.position,B.delaunayColor,B.delaunayAxis);q.opacity=E.opacity,this.delaunayMesh?this.delaunayMesh.update(q):(q.gl=k,this.delaunayMesh=y(q),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},g.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function P(E,k){var O=new b(E,k.uid);return O.update(k),O}R.exports=P},21428:function(R,F,e){var i=e(73972),m=e(71828),t=e(34098),y=e(49508),p=e(11058),l=e(82410),d=e(44542);R.exports=function(u,a,o,c){function s(D,L){return m.coerce(u,a,d,D,L)}var b=r(u,a,s,c);if(!b){a.visible=!1;return}s("text"),s("hovertext"),s("hovertemplate"),s("xhoverformat"),s("yhoverformat"),s("zhoverformat"),s("mode"),t.hasLines(a)&&(s("connectgaps"),p(u,a,o,c,s)),t.hasMarkers(a)&&y(u,a,o,c,s,{noSelect:!0,noAngle:!0}),t.hasText(a)&&(s("texttemplate"),l(u,a,c,s,{noSelect:!0}));var g=(a.line||{}).color,A=(a.marker||{}).color;s("surfaceaxis")>=0&&s("surfacecolor",g||A);for(var v=["x","y","z"],h=0;h<3;++h){var x="projection."+v[h];s(x+".show")&&(s(x+".opacity"),s(x+".scale"))}var C=i.getComponentMethod("errorbars","supplyDefaults");C(u,a,g||A||o,{axis:"z"}),C(u,a,g||A||o,{axis:"y",inherit:"z"}),C(u,a,g||A||o,{axis:"x",inherit:"z"})};function r(n,u,a,o){var c=0,s=a("x"),b=a("y"),g=a("z"),A=i.getComponentMethod("calendars","handleTraceDefaults");return A(n,u,["x","y","z"],o),s&&b&&g&&(c=Math.min(s.length,b.length,g.length),u._length=u._xlength=u._ylength=u._zlength=c),c}},13551:function(R,F,e){R.exports={plot:e(58925),attributes:e(44542),markerSymbols:e(87381),supplyDefaults:e(21428),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:e(36563),moduleType:"trace",name:"scatter3d",basePlotModule:e(58547),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},97001:function(R,F,e){var i=e(82196),m=e(9012),t=e(5386).f,y=e(5386).s,p=e(50693),l=e(1426).extendFlat,d=i.marker,r=i.line,n=d.line;R.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:l({},i.mode,{dflt:"markers"}),text:l({},i.text,{}),texttemplate:y({editType:"plot"},{keys:["a","b","text"]}),hovertext:l({},i.hovertext,{}),line:{color:r.color,width:r.width,dash:r.dash,backoff:r.backoff,shape:l({},r.shape,{values:["linear","spline"]}),smoothing:r.smoothing,editType:"calc"},connectgaps:i.connectgaps,fill:l({},i.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:i.fillcolor,marker:l({symbol:d.symbol,opacity:d.opacity,maxdisplayed:d.maxdisplayed,angle:d.angle,angleref:d.angleref,standoff:d.standoff,size:d.size,sizeref:d.sizeref,sizemin:d.sizemin,sizemode:d.sizemode,line:l({width:n.width,editType:"calc"},p("marker.line")),gradient:d.gradient,editType:"calc"},p("marker")),textfont:i.textfont,textposition:i.textposition,selected:i.selected,unselected:i.unselected,hoverinfo:l({},m.hoverinfo,{flags:["a","b","text","name"]}),hoveron:i.hoveron,hovertemplate:t()}},34618:function(R,F,e){var i=e(92770),m=e(36922),t=e(75225),y=e(66279),p=e(47761).calcMarkerSize,l=e(22882);R.exports=function(r,n){var u=n._carpetTrace=l(r,n);if(!(!u||!u.visible||u.visible==="legendonly")){var a;n.xaxis=u.xaxis,n.yaxis=u.yaxis;var o=n._length,c=new Array(o),s,b,g=!1;for(a=0;a0?w=D.labelprefix.replace(/ = $/,""):w=D._hovertitle,v.push(w+": "+L.toFixed(3)+D.labelsuffix)}if(!b.hovertemplate){var x=s.hi||b.hoverinfo,C=x.split("+");C.indexOf("all")!==-1&&(C=["a","b","text"]),C.indexOf("a")!==-1&&h(g.aaxis,s.a),C.indexOf("b")!==-1&&h(g.baxis,s.b),v.push("y: "+n.yLabel),C.indexOf("text")!==-1&&m(s,b,v),n.extraText=v.join("
")}return r}},46858:function(R,F,e){R.exports={attributes:e(97001),supplyDefaults:e(98965),colorbar:e(4898),formatLabels:e(48953),calc:e(34618),plot:e(1913),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(22931),selectPoints:e(98002),eventData:e(16165),moduleType:"trace",name:"scattercarpet",basePlotModule:e(93612),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},1913:function(R,F,e){var i=e(32663),m=e(89298),t=e(91424);R.exports=function(p,l,d,r){var n,u,a,o=d[0][0].carpet,c=m.getFromId(p,o.xaxis||"x"),s=m.getFromId(p,o.yaxis||"y"),b={xaxis:c,yaxis:s,plot:l.plot};for(n=0;n")}},17988:function(R,F,e){R.exports={attributes:e(19316),supplyDefaults:e(10659),colorbar:e(4898),formatLabels:e(82719),calc:e(84622),calcGeoJSON:e(89171).calcGeoJSON,plot:e(89171).plot,style:e(33095),styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(14977),eventData:e(84084),selectPoints:e(20548),moduleType:"trace",name:"scattergeo",basePlotModule:e(44622),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},89171:function(R,F,e){var i=e(39898),m=e(71828),t=e(90973).getTopojsonFeatures,y=e(18214),p=e(41327),l=e(71739).findExtremes,d=e(50606).BADNUM,r=e(47761).calcMarkerSize,n=e(34098),u=e(33095);function a(c,s,b){var g=s.layers.frontplot.select(".scatterlayer"),A=m.makeTraceGroups(g,b,"trace scattergeo");function v(h,x){h.lonlat[0]===d&&i.select(x).remove()}A.selectAll("*").remove(),A.each(function(h){var x=i.select(this),C=h[0].trace;if(n.hasLines(C)||C.fill!=="none"){var D=y.calcTraceToLineCoords(h),L=C.fill!=="none"?y.makePolygon(D):y.makeLine(D);x.selectAll("path.js-line").data([{geojson:L,trace:C}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}n.hasMarkers(C)&&x.selectAll("path.point").data(m.identity).enter().append("path").classed("point",!0).each(function(w){v(w,this)}),n.hasText(C)&&x.selectAll("g").data(m.identity).enter().append("g").append("text").each(function(w){v(w,this)}),u(c,h)})}function o(c,s){var b=c[0].trace,g=s[b.geo],A=g._subplot,v=b._length,h,x;if(Array.isArray(b.locations)){var C=b.locationmode,D=C==="geojson-id"?p.extractTraceFeature(c):t(b,A.topojson);for(h=0;h=s,S=w*2,f={},P,E=C.makeCalcdata(h,"x"),k=D.makeCalcdata(h,"y"),O=p(h,C,"x",E),G=p(h,D,"y",k),z=O.vals,U=G.vals;h._x=z,h._y=U,h.xperiodalignment&&(h._origX=E,h._xStarts=O.starts,h._xEnds=O.ends),h.yperiodalignment&&(h._origY=k,h._yStarts=G.starts,h._yEnds=G.ends);var H=new Array(S),B=new Array(w);for(P=0;P1&&m.extendFlat(L.line,a.linePositions(A,h,x)),L.errorX||L.errorY){var w=a.errorBarPositions(A,h,x,C,D);L.errorX&&m.extendFlat(L.errorX,w.x),L.errorY&&m.extendFlat(L.errorY,w.y)}return L.text&&(m.extendFlat(L.text,{positions:x},a.textPosition(A,h,L.text,L.marker)),m.extendFlat(L.textSel,{positions:x},a.textPosition(A,h,L.text,L.markerSel)),m.extendFlat(L.textUnsel,{positions:x},a.textPosition(A,h,L.text,L.markerUnsel))),L}},78232:function(R){var F=20;R.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:F,SYMBOL_STROKE:F/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},19635:function(R,F,e){var i=e(92770),m=e(82019),t=e(25075),y=e(73972),p=e(71828),l=e(91424),d=e(41675),r=e(81697).formatColor,n=e(34098),u=e(39984),a=e(68645),o=e(78232),c=e(37822).DESELECTDIM,s={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},b=e(23469).appendArrayPointValue;function g(O,G){var z,U={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},H=O._context.plotGlPixelRatio;if(G.visible!==!0)return U;if(n.hasText(G)&&(U.text=A(O,G),U.textSel=x(O,G,G.selected),U.textUnsel=x(O,G,G.unselected)),n.hasMarkers(G)&&(U.marker=v(O,G),U.markerSel=h(O,G,G.selected),U.markerUnsel=h(O,G,G.unselected),!G.unselected&&p.isArrayOrTypedArray(G.marker.opacity))){var B=G.marker.opacity;for(U.markerUnsel.opacity=new Array(B.length),z=0;zo.TOO_MANY_POINTS||n.hasMarkers(G)?"rect":"round";if(ie&&G.connectgaps){var he=B[0],$=B[1];for(W=0;W1?re[W]:re[0]:re,Z=Array.isArray(ie)?ie.length>1?ie[W]:ie[0]:ie,K=s[$],Q=s[Z],ae=le?le/.8+1:0,fe=-Q*ae-Q*.5;B.offset[W]=[K*ae/he,fe/he]}}return B}R.exports={style:g,markerStyle:v,markerSelection:h,linePositions:P,errorBarPositions:E,textPosition:k}},47148:function(R,F,e){var i=e(71828),m=e(73972),t=e(68645),y=e(42341),p=e(47581),l=e(34098),d=e(67513),r=e(73927),n=e(49508),u=e(11058),a=e(28908),o=e(82410);R.exports=function(s,b,g,A){function v(S,f){return i.coerce(s,b,y,S,f)}var h=s.marker?t.isOpenSymbol(s.marker.symbol):!1,x=l.isBubble(s),C=d(s,b,A,v);if(!C){b.visible=!1;return}r(s,b,A,v),v("xhoverformat"),v("yhoverformat");var D=C100},F.isDotSymbol=function(m){return typeof m=="string"?i.DOT_RE.test(m):m>200}},20794:function(R,F,e){var i=e(73972),m=e(71828),t=e(34603);function y(l,d,r,n){var u=l.cd,a=u[0].t,o=u[0].trace,c=l.xa,s=l.ya,b=a.x,g=a.y,A=c.c2p(d),v=s.c2p(r),h=l.distance,x;if(a.tree){var C=c.p2c(A-h),D=c.p2c(A+h),L=s.p2c(v-h),w=s.p2c(v+h);n==="x"?x=a.tree.range(Math.min(C,D),Math.min(s._rl[0],s._rl[1]),Math.max(C,D),Math.max(s._rl[0],s._rl[1])):x=a.tree.range(Math.min(C,D),Math.min(L,w),Math.max(C,D),Math.max(L,w))}else x=a.ids;var M,S,f,P,E,k,O,G,z,U=h;if(n==="x"){var H=!!o.xperiodalignment,B=!!o.yperiodalignment;for(E=0;E=Math.min(W,q)&&A<=Math.max(W,q)?0:1/0}if(k=Math.min(re,ie)&&v<=Math.max(re,ie)?0:1/0}z=Math.sqrt(k*k+O*O),S=x[E]}}}else for(E=x.length-1;E>-1;E--)M=x[E],f=b[M],P=g[M],k=c.c2p(f)-A,O=s.c2p(P)-v,G=Math.sqrt(k*k+O*O),Gh.glText.length){var f=M-h.glText.length;for(D=0;Dce&&(isNaN(ne[oe])||isNaN(ne[oe+1]));)oe-=2;te.positions=ne.slice(ce,oe+2)}return te}),h.line2d.update(h.lineOptions)),h.error2d){var k=(h.errorXOptions||[]).concat(h.errorYOptions||[]);h.error2d.update(k)}h.scatter2d&&h.scatter2d.update(h.markerOptions),h.fillOrder=p.repeat(null,M),h.fill2d&&(h.fillOptions=h.fillOptions.map(function(te,ne){var ce=A[ne];if(!(!te||!ce||!ce[0]||!ce[0].trace)){var oe=ce[0],de=oe.trace,we=oe.t,Se=h.lineOptions[ne],Te,Fe,Ie=[];de._ownfill&&Ie.push(ne),de._nexttrace&&Ie.push(ne+1),Ie.length&&(h.fillOrder[ne]=Ie);var Me=[],Ae=Se&&Se.positions||we.positions,De,ke;if(de.fill==="tozeroy"){for(De=0;DeDe&&isNaN(Ae[ke+1]);)ke-=2;Ae[De+1]!==0&&(Me=[Ae[De],0]),Me=Me.concat(Ae.slice(De,ke+2)),Ae[ke+1]!==0&&(Me=Me.concat([Ae[ke],0]))}else if(de.fill==="tozerox"){for(De=0;DeDe&&isNaN(Ae[ke]);)ke-=2;Ae[De]!==0&&(Me=[0,Ae[De+1]]),Me=Me.concat(Ae.slice(De,ke+2)),Ae[ke]!==0&&(Me=Me.concat([0,Ae[ke+1]]))}else if(de.fill==="toself"||de.fill==="tonext"){for(Me=[],Te=0,te.splitNull=!0,Fe=0;Fe-1;for(D=0;D=0?Math.floor((u+180)/360):Math.ceil((u-180)/360),D=C*360,L=u-D;function w(z){var U=z.lonlat;if(U[0]===p||h&&A.indexOf(z.i+1)===-1)return 1/0;var H=m.modHalf(U[0],360),B=U[1],W=g.project([H,B]),q=W.x-s.c2p([L,B]),re=W.y-b.c2p([H,a]),ie=Math.max(3,z.mrc||0);return Math.max(Math.sqrt(q*q+re*re)-ie,1-3/ie)}if(i.getClosest(o,w,n),n.index!==!1){var M=o[n.index],S=M.lonlat,f=[m.modHalf(S[0],360)+D,S[1]],P=s.c2p(f),E=b.c2p(f),k=M.mrc||1;n.x0=P-k,n.x1=P+k,n.y0=E-k,n.y1=E+k;var O={};O[c.subplot]={_subplot:g};var G=c._module.formatLabels(M,c,O);return n.lonLabel=G.lonLabel,n.latLabel=G.latLabel,n.color=t(c,M),n.extraText=r(c,M,o[0].t.labels),n.hovertemplate=c.hovertemplate,[n]}}function r(n,u,a){if(n.hovertemplate)return;var o=u.hi||n.hoverinfo,c=o.split("+"),s=c.indexOf("all")!==-1,b=c.indexOf("lon")!==-1,g=c.indexOf("lat")!==-1,A=u.lonlat,v=[];function h(x){return x+"\xB0"}return s||b&&g?v.push("("+h(A[1])+", "+h(A[0])+")"):b?v.push(a.lon+h(A[0])):g&&v.push(a.lat+h(A[1])),(s||c.indexOf("text")!==-1)&&y(u,n,v),v.join("
")}R.exports={hoverPoints:d,getExtraText:r}},20467:function(R,F,e){R.exports={attributes:e(99181),supplyDefaults:e(76645),colorbar:e(4898),formatLabels:e(15636),calc:e(84622),plot:e(86951),hoverPoints:e(28178).hoverPoints,eventData:e(53353),selectPoints:e(86387),styleOnSelect:function(i,m){if(m){var t=m[0].trace;t._glTrace.update(m)}},moduleType:"trace",name:"scattermapbox",basePlotModule:e(50101),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},86951:function(R,F,e){var i=e(71828),m=e(15790),t=e(77734).traceLayerPrefix,y={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function p(d,r,n,u){this.type="scattermapbox",this.subplot=d,this.uid=r,this.clusterEnabled=n,this.isHidden=u,this.sourceIds={fill:"source-"+r+"-fill",line:"source-"+r+"-line",circle:"source-"+r+"-circle",symbol:"source-"+r+"-symbol",cluster:"source-"+r+"-circle",clusterCount:"source-"+r+"-circle"},this.layerIds={fill:t+r+"-fill",line:t+r+"-line",circle:t+r+"-circle",symbol:t+r+"-symbol",cluster:t+r+"-cluster",clusterCount:t+r+"-cluster-count"},this.below=null}var l=p.prototype;l.addSource=function(d,r,n){var u={type:"geojson",data:r.geojson};n&&n.enabled&&i.extendFlat(u,{cluster:!0,clusterMaxZoom:n.maxzoom}),this.subplot.map.addSource(this.sourceIds[d],u)},l.setSourceData=function(d,r){this.subplot.map.getSource(this.sourceIds[d]).setData(r.geojson)},l.addLayer=function(d,r,n){var u={type:r.type,id:this.layerIds[d],source:this.sourceIds[d],layout:r.layout,paint:r.paint};r.filter&&(u.filter=r.filter),this.subplot.addLayer(u,n)},l.update=function(r){var n=r[0].trace,u=this.subplot,a=u.map,o=m(u.gd,r),c=u.belowLookup["trace-"+this.uid],s=!!(n.cluster&&n.cluster.enabled),b=!!this.clusterEnabled,g=this;function A(S){S||g.addSource("circle",o.circle,n.cluster);for(var f=y.cluster,P=0;P=0;P--){var E=f[P];a.removeLayer(g.layerIds[E])}S||a.removeSource(g.sourceIds.circle)}function h(S){for(var f=y.nonCluster,P=0;P=0;P--){var E=f[P];a.removeLayer(g.layerIds[E]),S||a.removeSource(g.sourceIds[E])}}function C(S){b?v(S):x(S)}function D(S){s?A(S):h(S)}function L(){for(var S=s?y.cluster:y.nonCluster,f=0;f=0;u--){var a=n[u];r.removeLayer(this.layerIds[a]),r.removeSource(this.sourceIds[a])}},R.exports=function(r,n){var u=n[0].trace,a=u.cluster&&u.cluster.enabled,o=u.visible!==!0,c=new p(r,u.uid,a,o),s=m(r.gd,n),b=c.below=r.belowLookup["trace-"+u.uid],g,A,v;if(a)for(c.addSource("circle",s.circle,u.cluster),g=0;g")}}R.exports={hoverPoints:m,makeHoverPointText:t}},91271:function(R,F,e){R.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:e(23580),categories:["polar","symbols","showLegend","scatter-like"],attributes:e(81245),supplyDefaults:e(22184).supplyDefaults,colorbar:e(4898),formatLabels:e(98608),calc:e(26442),plot:e(45162),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(59150).hoverPoints,selectPoints:e(98002),meta:{}}},45162:function(R,F,e){var i=e(32663),m=e(50606).BADNUM;R.exports=function(y,p,l){for(var d=p.layers.frontplot.select("g.scatterlayer"),r=p.xaxis,n=p.yaxis,u={xaxis:r,yaxis:n,plot:p.framework,layerClipId:p._hasClipOnAxisFalse?p.clipIds.forTraces:null},a=p.radialAxis,o=p.angularAxis,c=0;c=d&&(L.marker.cluster=h.tree),L.marker&&(L.markerSel.positions=L.markerUnsel.positions=L.marker.positions=f),L.line&&f.length>1&&l.extendFlat(L.line,p.linePositions(u,v,f)),L.text&&(l.extendFlat(L.text,{positions:f},p.textPosition(u,v,L.text,L.marker)),l.extendFlat(L.textSel,{positions:f},p.textPosition(u,v,L.text,L.markerSel)),l.extendFlat(L.textUnsel,{positions:f},p.textPosition(u,v,L.text,L.markerUnsel))),L.fill&&!b.fill2d&&(b.fill2d=!0),L.marker&&!b.scatter2d&&(b.scatter2d=!0),L.line&&!b.line2d&&(b.line2d=!0),L.text&&!b.glText&&(b.glText=!0),b.lineOptions.push(L.line),b.fillOptions.push(L.fill),b.markerOptions.push(L.marker),b.markerSelectedOptions.push(L.markerSel),b.markerUnselectedOptions.push(L.markerUnsel),b.textOptions.push(L.text),b.textSelectedOptions.push(L.textSel),b.textUnselectedOptions.push(L.textUnsel),b.selectBatch.push([]),b.unselectBatch.push([]),h.x=P,h.y=E,h.rawx=P,h.rawy=E,h.r=C,h.theta=D,h.positions=f,h._scene=b,h.index=b.count,b.count++}}),t(u,a,o)}},R.exports.reglPrecompiled=r},48300:function(R,F,e){var i=e(5386).f,m=e(5386).s,t=e(1426).extendFlat,y=e(82196),p=e(9012),l=y.line;R.exports={mode:y.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:y.text,texttemplate:m({editType:"plot"},{keys:["real","imag","text"]}),hovertext:y.hovertext,line:{color:l.color,width:l.width,dash:l.dash,backoff:l.backoff,shape:t({},l.shape,{values:["linear","spline"]}),smoothing:l.smoothing,editType:"calc"},connectgaps:y.connectgaps,marker:y.marker,cliponaxis:t({},y.cliponaxis,{dflt:!1}),textposition:y.textposition,textfont:y.textfont,fill:t({},y.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:y.fillcolor,hoverinfo:t({},p.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:y.hoveron,hovertemplate:i(),selected:y.selected,unselected:y.unselected}},30621:function(R,F,e){var i=e(92770),m=e(50606).BADNUM,t=e(36922),y=e(75225),p=e(66279),l=e(47761).calcMarkerSize;R.exports=function(r,n){for(var u=r._fullLayout,a=n.subplot,o=u[a].realaxis,c=u[a].imaginaryaxis,s=o.makeCalcdata(n,"real"),b=c.makeCalcdata(n,"imag"),g=n._length,A=new Array(g),v=0;v")}}R.exports={hoverPoints:m,makeHoverPointText:t}},85956:function(R,F,e){R.exports={moduleType:"trace",name:"scattersmith",basePlotModule:e(7504),categories:["smith","symbols","showLegend","scatter-like"],attributes:e(48300),supplyDefaults:e(65269),colorbar:e(4898),formatLabels:e(62047),calc:e(30621),plot:e(12480),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(11350).hoverPoints,selectPoints:e(98002),meta:{}}},12480:function(R,F,e){var i=e(32663),m=e(50606).BADNUM,t=e(23893),y=t.smith;R.exports=function(l,d,r){for(var n=d.layers.frontplot.select("g.scatterlayer"),u=d.xaxis,a=d.yaxis,o={xaxis:u,yaxis:a,plot:d.framework,layerClipId:d._hasClipOnAxisFalse?d.clipIds.forTraces:null},c=0;c"),r.hovertemplate=s.hovertemplate,d}},52979:function(R,F,e){R.exports={attributes:e(50413),supplyDefaults:e(46008),colorbar:e(4898),formatLabels:e(93645),calc:e(54337),plot:e(7507),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(47250),selectPoints:e(98002),eventData:e(4524),moduleType:"trace",name:"scatterternary",basePlotModule:e(61639),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},7507:function(R,F,e){var i=e(32663);R.exports=function(t,y,p){var l=y.plotContainer;l.select(".scatterlayer").selectAll("*").remove();for(var d=y.xaxis,r=y.yaxis,n={xaxis:d,yaxis:r,plot:l,layerClipId:y._hasClipOnAxisFalse?y.clipIdRelative:null},u=y.layers.frontplot.select("g.scatterlayer"),a=0;au,P;for(f?P=g.sizeAvg||Math.max(g.size,3):P=t(c,b),C=0;Cx&&g||h-1,z=y(g)||!!u.selectedpoints||G,U=!0;if(z){var H=u._length;if(u.selectedpoints){o.selectBatch=u.selectedpoints;var B=u.selectedpoints,W={};for(h=0;h1&&(S=r[a-1],P=n[a-1],k=u[a-1]),o=0;oS?"-":"+")+"x"),C=C.replace("y",(f>P?"-":"+")+"y"),C=C.replace("z",(E>k?"-":"+")+"z");var U=function(){a=0,O=[],G=[],z=[]};(!a||a2?g=s.slice(1,b-1):b===2?g=[(s[0]+s[1])/2]:g=s,g}function a(s){var b=s.length;return b===1?[.5,.5]:[s[1]-s[0],s[b-1]-s[b-2]]}function o(s,b){var g=s.fullSceneLayout,A=s.dataScale,v=b._len,h={};function x(he,$){var Z=g[$],K=A[d[$]];return t.simpleMap(he,function(Q){return Z.d2l(Q)*K})}if(h.vectors=l(x(b._u,"xaxis"),x(b._v,"yaxis"),x(b._w,"zaxis"),v),!v)return{positions:[],cells:[]};var C=x(b._Xs,"xaxis"),D=x(b._Ys,"yaxis"),L=x(b._Zs,"zaxis");h.meshgrid=[C,D,L],h.gridFill=b._gridFill;var w=b._slen;if(w)h.startingPositions=l(x(b._startsX,"xaxis"),x(b._startsY,"yaxis"),x(b._startsZ,"zaxis"));else{for(var M=D[0],S=u(C),f=u(L),P=new Array(S.length*f.length),E=0,k=0;k=0},P,E,k;A?(P=Math.min(g.length,h.length),E=function(Q){return S(g[Q])&&f(Q)},k=function(Q){return String(g[Q])}):(P=Math.min(v.length,h.length),E=function(Q){return S(v[Q])&&f(Q)},k=function(Q){return String(v[Q])}),C&&(P=Math.min(P,x.length));for(var O=0;O1){for(var W=t.randstr(),q=0;q"),name:U||$("name")?f.name:void 0,color:z("hoverlabel.bgcolor")||P.color,borderColor:z("hoverlabel.bordercolor"),fontFamily:z("hoverlabel.font.family"),fontSize:z("hoverlabel.font.size"),fontColor:z("hoverlabel.font.color"),nameLength:z("hoverlabel.namelength"),textAlign:z("hoverlabel.align"),hovertemplate:U,hovertemplateLabels:ie,eventData:W};x&&(ae.x0=q-M.rInscribed*M.rpx1,ae.x1=q+M.rInscribed*M.rpx1,ae.idealAlign=M.pxmid[0]<0?"left":"right"),C&&(ae.x=q,ae.idealAlign=q<0?"left":"right");var fe=[];y.loneHover(ae,{container:S._hoverlayer.node(),outerContainer:S._paper.node(),gd:s,inOut_bbox:fe}),W[0].bbox=fe[0],v._hasHoverLabel=!0}if(C){var te=o.select("path.surface");g.styleOne(te,M,f,{hovered:!0})}v._hasHoverEvent=!0,s.emit("plotly_hover",{points:W||[u(M,f,g.eventDataKeys)],event:i.event})}},L=function(M){var S=s._fullLayout,f=s._fullData[v.index],P=i.select(this).datum();if(v._hasHoverEvent&&(M.originalEvent=i.event,s.emit("plotly_unhover",{points:[u(P,f,g.eventDataKeys)],event:i.event}),v._hasHoverEvent=!1),v._hasHoverLabel&&(y.loneUnhover(S._hoverlayer.node()),v._hasHoverLabel=!1),C){var E=o.select("path.surface");g.styleOne(E,P,f,{hovered:!1})}},w=function(M){var S=s._fullLayout,f=s._fullData[v.index],P=x&&(d.isHierarchyRoot(M)||d.isLeaf(M)),E=d.getPtId(M),k=d.isEntry(M)?d.findEntryWithChild(h,E):d.findEntryWithLevel(h,E),O=d.getPtId(k),G={points:[u(M,f,g.eventDataKeys)],event:i.event};P||(G.nextLevel=O);var z=l.triggerHandler(s,"plotly_"+v.type+"click",G);if(z!==!1&&S.hovermode&&(s._hoverdata=[u(M,f,g.eventDataKeys)],y.click(s,i.event)),!P&&z!==!1&&!s._dragging&&!s._transitioning){m.call("_storeDirectGUIEdit",f,S._tracePreGUI[f.uid],{level:f.level});var U={data:[{level:O}],traces:[v.index]},H={frame:{redraw:!1,duration:g.transitionTime},transition:{duration:g.transitionTime,easing:g.transitionEasing},mode:"immediate",fromcurrent:!0};y.loneUnhover(S._hoverlayer.node()),m.call("animate",s,U,H)}};o.on("mouseover",D),o.on("mouseout",L),o.on("click",w)};function u(a,o,c){for(var s=a.data.data,b={curveNumber:o.index,pointNumber:s.i,data:o._input,fullData:o},g=0;g0)},F.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},F.isHeader=function(r,n){return!(F.isLeaf(r)||r.depth===n._maxDepth-1)};function d(r){return r.data.data.pid}F.getParent=function(r,n){return F.findEntryWithLevel(r,d(n))},F.listPath=function(r,n){var u=r.parent;if(!u)return[];var a=n?[u.data[n]]:[u];return F.listPath(u,n).concat(a)},F.getPath=function(r){return F.listPath(r,"label").join("/")+"/"},F.formatValue=y.formatPieValue,F.formatPercent=function(r,n){var u=i.formatPercent(r,0);return u==="0%"&&(u=y.formatPiePercent(r,n)),u}},87619:function(R,F,e){R.exports={moduleType:"trace",name:"sunburst",basePlotModule:e(66888),categories:[],animatable:!0,attributes:e(57564),layoutAttributes:e(2654),supplyDefaults:e(17094),supplyLayoutDefaults:e(57034),calc:e(52147).calc,crossTraceCalc:e(52147).crossTraceCalc,plot:e(24714).plot,style:e(29969).style,colorbar:e(4898),meta:{}}},2654:function(R){R.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},57034:function(R,F,e){var i=e(71828),m=e(2654);R.exports=function(y,p){function l(d,r){return i.coerce(y,p,m,d,r)}l("sunburstcolorway",p.colorway),l("extendsunburstcolors")}},24714:function(R,F,e){var i=e(39898),m=e(674),t=e(81684).sX,y=e(91424),p=e(71828),l=e(63893),d=e(72597),r=d.recordMinTextSize,n=d.clearMinTextSize,u=e(14575),a=e(53581).getRotationAngle,o=u.computeTransform,c=u.transformInsideText,s=e(29969).styleOne,b=e(16688).resizeText,g=e(83523),A=e(7055),v=e(2791);F.plot=function(w,M,S,f){var P=w._fullLayout,E=P._sunburstlayer,k,O,G=!S,z=!P.uniformtext.mode&&v.hasTransition(S);if(n("sunburst",P),k=E.selectAll("g.trace.sunburst").data(M,function(H){return H[0].trace.uid}),k.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),k.order(),z){f&&(O=f());var U=i.transition().duration(S.duration).ease(S.easing).each("end",function(){O&&O()}).each("interrupt",function(){O&&O()});U.each(function(){E.selectAll("g.trace").each(function(H){h(w,H,this,S)})})}else k.each(function(H){h(w,H,this,S)}),P.uniformtext.mode&&b(w,P._sunburstlayer.selectAll(".trace"),"sunburst");G&&k.exit().remove()};function h(w,M,S,f){var P=w._context.staticPlot,E=w._fullLayout,k=!E.uniformtext.mode&&v.hasTransition(f),O=i.select(S),G=O.selectAll("g.slice"),z=M[0],U=z.trace,H=z.hierarchy,B=v.findEntryWithLevel(H,U.level),W=v.getMaxDepth(U),q=E._size,re=U.domain,ie=q.w*(re.x[1]-re.x[0]),le=q.h*(re.y[1]-re.y[0]),he=.5*Math.min(ie,le),$=z.cx=q.l+q.w*(re.x[1]+re.x[0])/2,Z=z.cy=q.t+q.h*(1-re.y[0])-le/2;if(!B)return G.remove();var K=null,Q={};k&&G.each(function(Ye){Q[v.getPtId(Ye)]={rpx0:Ye.rpx0,rpx1:Ye.rpx1,x0:Ye.x0,x1:Ye.x1,transform:Ye.transform},!K&&v.isEntry(Ye)&&(K=Ye)});var ae=x(B).descendants(),fe=B.height+1,te=0,ne=W;z.hasMultipleRoots&&v.isHierarchyRoot(B)&&(ae=ae.slice(1),fe-=1,te=1,ne+=1),ae=ae.filter(function(Ye){return Ye.y1<=ne});var ce=a(U.rotation);ce&&ae.forEach(function(Ye){Ye.x0+=ce,Ye.x1+=ce});var oe=Math.min(fe,W),de=function(Ye){return(Ye-te)/oe*he},we=function(Ye,Pe){return[Ye*Math.cos(Pe),-Ye*Math.sin(Pe)]},Se=function(Ye){return p.pathAnnulus(Ye.rpx0,Ye.rpx1,Ye.x0,Ye.x1,$,Z)},Te=function(Ye){return $+D(Ye)[0]*(Ye.transform.rCenter||0)+(Ye.transform.x||0)},Fe=function(Ye){return Z+D(Ye)[1]*(Ye.transform.rCenter||0)+(Ye.transform.y||0)};G=G.data(ae,v.getPtId),G.enter().append("g").classed("slice",!0),k?G.exit().transition().each(function(){var Ye=i.select(this),Pe=Ye.select("path.surface");Pe.transition().attrTween("d",function(Ze){var Ke=De(Ze);return function(lt){return Se(Ke(lt))}});var Ve=Ye.select("g.slicetext");Ve.attr("opacity",0)}).remove():G.exit().remove(),G.order();var Ie=null;if(k&&K){var Me=v.getPtId(K);G.each(function(Ye){Ie===null&&v.getPtId(Ye)===Me&&(Ie=Ye.x1)})}var Ae=G;k&&(Ae=Ae.transition().each("end",function(){var Ye=i.select(this);v.setSliceCursor(Ye,w,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),Ae.each(function(Ye){var Pe=i.select(this),Ve=p.ensureSingle(Pe,"path","surface",function(Et){Et.style("pointer-events",P?"none":"all")});Ye.rpx0=de(Ye.y0),Ye.rpx1=de(Ye.y1),Ye.xmid=(Ye.x0+Ye.x1)/2,Ye.pxmid=we(Ye.rpx1,Ye.xmid),Ye.midangle=-(Ye.xmid-Math.PI/2),Ye.startangle=-(Ye.x0-Math.PI/2),Ye.stopangle=-(Ye.x1-Math.PI/2),Ye.halfangle=.5*Math.min(p.angleDelta(Ye.x0,Ye.x1)||Math.PI,Math.PI),Ye.ring=1-Ye.rpx0/Ye.rpx1,Ye.rInscribed=C(Ye),k?Ve.transition().attrTween("d",function(Et){var et=ke(Et);return function(Ue){return Se(et(Ue))}}):Ve.attr("d",Se),Pe.call(g,B,w,M,{eventDataKeys:A.eventDataKeys,transitionTime:A.CLICK_TRANSITION_TIME,transitionEasing:A.CLICK_TRANSITION_EASING}).call(v.setSliceCursor,w,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:w._transitioning}),Ve.call(s,Ye,U);var Ze=p.ensureSingle(Pe,"g","slicetext"),Ke=p.ensureSingle(Ze,"text","",function(Et){Et.attr("data-notex",1)}),lt=p.ensureUniformFontSize(w,v.determineTextFont(U,Ye,E.font));Ke.text(F.formatSliceLabel(Ye,B,U,M,E)).classed("slicetext",!0).attr("text-anchor","middle").call(y.font,lt).call(l.convertToTspans,w);var vt=y.bBox(Ke.node());Ye.transform=c(vt,Ye,z),Ye.transform.targetX=Te(Ye),Ye.transform.targetY=Fe(Ye);var mt=function(Et,et){var Ue=Et.transform;return o(Ue,et),Ue.fontSize=lt.size,r(U.type,Ue,E),p.getTextTransform(Ue)};k?Ke.transition().attrTween("transform",function(Et){var et=We(Et);return function(Ue){return mt(et(Ue),vt)}}):Ke.attr("transform",mt(Ye,vt))});function De(Ye){var Pe=v.getPtId(Ye),Ve=Q[Pe],Ze=Q[v.getPtId(B)],Ke;if(Ze){var lt=(Ye.x1>Ze.x1?2*Math.PI:0)+ce;Ke=Ye.rpx1Ie?2*Math.PI:0)+ce;Ve={x0:Ke,x1:Ke}}else Ve={rpx0:he,rpx1:he},p.extendFlat(Ve,_e(Ye));else Ve={rpx0:0,rpx1:0};else Ve={x0:ce,x1:ce};return t(Ve,Ze)}function We(Ye){var Pe=Q[v.getPtId(Ye)],Ve,Ze=Ye.transform;if(Pe)Ve=Pe;else if(Ve={rpx1:Ye.rpx1,transform:{textPosAngle:Ze.textPosAngle,scale:0,rotate:Ze.rotate,rCenter:Ze.rCenter,x:Ze.x,y:Ze.y}},K)if(Ye.parent)if(Ie){var Ke=Ye.x1>Ie?2*Math.PI:0;Ve.x0=Ve.x1=Ke}else p.extendFlat(Ve,_e(Ye));else Ve.x0=Ve.x1=ce;else Ve.x0=Ve.x1=ce;var lt=t(Ve.transform.textPosAngle,Ye.transform.textPosAngle),vt=t(Ve.rpx1,Ye.rpx1),mt=t(Ve.x0,Ye.x0),Et=t(Ve.x1,Ye.x1),et=t(Ve.transform.scale,Ze.scale),Ue=t(Ve.transform.rotate,Ze.rotate),Be=Ze.rCenter===0?3:Ve.transform.rCenter===0?1/3:1,rt=t(Ve.transform.rCenter,Ze.rCenter),ot=function(qe){return rt(Math.pow(qe,Be))};return function(qe){var Oe=vt(qe),Ce=mt(qe),pe=Et(qe),be=ot(qe),Re=we(Oe,(Ce+pe)/2),He=lt(qe),st={pxmid:Re,rpx1:Oe,transform:{textPosAngle:He,rCenter:be,x:Ze.x,y:Ze.y}};return r(U.type,Ze,E),{transform:{targetX:Te(st),targetY:Fe(st),scale:et(qe),rotate:Ue(qe),rCenter:be}}}}function _e(Ye){var Pe=Ye.parent,Ve=Q[v.getPtId(Pe)],Ze={};if(Ve){var Ke=Pe.children,lt=Ke.indexOf(Ye),vt=Ke.length,mt=t(Ve.x0,Ve.x1);Ze.x0=mt(lt/vt),Ze.x1=mt(lt/vt)}else Ze.x0=Ze.x1=0;return Ze}}function x(w){return m.partition().size([2*Math.PI,w.height+1])(w)}F.formatSliceLabel=function(w,M,S,f,P){var E=S.texttemplate,k=S.textinfo;if(!E&&(!k||k==="none"))return"";var O=P.separators,G=f[0],z=w.data.data,U=G.hierarchy,H=v.isHierarchyRoot(w),B=v.getParent(U,w),W=v.getValue(w);if(!E){var q=k.split("+"),re=function(te){return q.indexOf(te)!==-1},ie=[],le;if(re("label")&&z.label&&ie.push(z.label),z.hasOwnProperty("v")&&re("value")&&ie.push(v.formatValue(z.v,O)),!H){re("current path")&&ie.push(v.getPath(w.data));var he=0;re("percent parent")&&he++,re("percent entry")&&he++,re("percent root")&&he++;var $=he>1;if(he){var Z,K=function(te){le=v.formatPercent(Z,O),$&&(le+=" of "+te),ie.push(le)};re("percent parent")&&!H&&(Z=W/v.getValue(B),K("parent")),re("percent entry")&&(Z=W/v.getValue(M),K("entry")),re("percent root")&&(Z=W/v.getValue(U),K("root"))}}return re("text")&&(le=p.castOption(S,z.i,"text"),p.isValidTextValue(le)&&ie.push(le)),ie.join("
")}var Q=p.castOption(S,z.i,"texttemplate");if(!Q)return"";var ae={};z.label&&(ae.label=z.label),z.hasOwnProperty("v")&&(ae.value=z.v,ae.valueLabel=v.formatValue(z.v,O)),ae.currentPath=v.getPath(w.data),H||(ae.percentParent=W/v.getValue(B),ae.percentParentLabel=v.formatPercent(ae.percentParent,O),ae.parent=v.getPtLabel(B)),ae.percentEntry=W/v.getValue(M),ae.percentEntryLabel=v.formatPercent(ae.percentEntry,O),ae.entry=v.getPtLabel(M),ae.percentRoot=W/v.getValue(U),ae.percentRootLabel=v.formatPercent(ae.percentRoot,O),ae.root=v.getPtLabel(U),z.hasOwnProperty("color")&&(ae.color=z.color);var fe=p.castOption(S,z.i,"text");return(p.isValidTextValue(fe)||fe==="")&&(ae.text=fe),ae.customdata=p.castOption(S,z.i,"customdata"),p.texttemplateString(Q,ae,P._d3locale,ae,S._meta||{})};function C(w){return w.rpx0===0&&p.isFullCircle([w.x0,w.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(w.halfangle)),w.ring/2))}function D(w){return L(w.rpx1,w.transform.textPosAngle)}function L(w,M){return[w*Math.sin(M),-w*Math.cos(M)]}},29969:function(R,F,e){var i=e(39898),m=e(7901),t=e(71828),y=e(72597).resizeText;function p(d){var r=d._fullLayout._sunburstlayer.selectAll(".trace");y(d,r,"sunburst"),r.each(function(n){var u=i.select(this),a=n[0],o=a.trace;u.style("opacity",o.opacity),u.selectAll("path.surface").each(function(c){i.select(this).call(l,c,o)})})}function l(d,r,n){var u=r.data.data,a=!r.children,o=u.i,c=t.castOption(n,o,"marker.line.color")||m.defaultLine,s=t.castOption(n,o,"marker.line.width")||0;d.style("stroke-width",s).call(m.fill,u.color).call(m.stroke,c).style("opacity",a?n.leaf.opacity:null)}R.exports={style:p,styleOne:l}},54532:function(R,F,e){var i=e(7901),m=e(50693),t=e(12663).axisHoverFormat,y=e(5386).f,p=e(9012),l=e(1426).extendFlat,d=e(30962).overrideAll;function r(a){return{valType:"boolean",dflt:!1}}function n(a){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:r(),y:r(),z:r()},color:{valType:"color",dflt:i.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:i.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var u=R.exports=d(l({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:y(),xhoverformat:t("x"),yhoverformat:t("y"),zhoverformat:t("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},m("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:n(),y:n(),z:n()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:l({},m.zauto,{}),zmin:l({},m.zmin,{}),zmax:l({},m.zmax,{})},hoverinfo:l({},p.hoverinfo),showlegend:l({},p.showlegend,{dflt:!1})}),"calc","nested");u.x.editType=u.y.editType=u.z.editType="calc+clearAxisTypes",u.transforms=void 0},18396:function(R,F,e){var i=e(78803);R.exports=function(t,y){y.surfacecolor?i(t,y,{vals:y.surfacecolor,containerStr:"",cLetter:"c"}):i(t,y,{vals:y.z,containerStr:"",cLetter:"c"})}},43768:function(R,F,e){var i=e(9330).gl_surface3d,m=e(9330).ndarray,t=e(9330).ndarray_linear_interpolate.d2,y=e(824),p=e(43907),l=e(71828).isArrayOrTypedArray,d=e(81697).parseColorScale,r=e(78614),n=e(21081).extractOpts;function u(f,P,E){this.scene=f,this.uid=E,this.surface=P,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var a=u.prototype;a.getXat=function(f,P,E,k){var O=l(this.data.x)?l(this.data.x[0])?this.data.x[P][f]:this.data.x[f]:f;return E===void 0?O:k.d2l(O,0,E)},a.getYat=function(f,P,E,k){var O=l(this.data.y)?l(this.data.y[0])?this.data.y[P][f]:this.data.y[P]:P;return E===void 0?O:k.d2l(O,0,E)},a.getZat=function(f,P,E,k){var O=this.data.z[P][f];return O===null&&this.data.connectgaps&&this.data._interpolatedZ&&(O=this.data._interpolatedZ[P][f]),E===void 0?O:k.d2l(O,0,E)},a.handlePick=function(f){if(f.object===this.surface){var P=(f.data.index[0]-1)/this.dataScaleX-1,E=(f.data.index[1]-1)/this.dataScaleY-1,k=Math.max(Math.min(Math.round(P),this.data.z[0].length-1),0),O=Math.max(Math.min(Math.round(E),this.data._ylength-1),0);f.index=[k,O],f.traceCoordinate=[this.getXat(k,O),this.getYat(k,O),this.getZat(k,O)],f.dataCoordinate=[this.getXat(k,O,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(k,O,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(k,O,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var G=0;G<3;G++){var z=f.dataCoordinate[G];z!=null&&(f.dataCoordinate[G]*=this.scene.dataScale[G])}var U=this.data.hovertext||this.data.text;return Array.isArray(U)&&U[O]&&U[O][k]!==void 0?f.textLabel=U[O][k]:U?f.textLabel=U:f.textLabel="",f.data.dataCoordinate=f.dataCoordinate.slice(),this.surface.highlight(f.data),this.scene.glplot.spikes.position=f.dataCoordinate,!0}};function o(f){var P=f[0].rgb,E=f[f.length-1].rgb;return P[0]===E[0]&&P[1]===E[1]&&P[2]===E[2]&&P[3]===E[3]}var c=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function s(f,P){if(f0){E=c[k];break}return E}function A(f,P){if(!(f<1||P<1)){for(var E=b(f),k=b(P),O=1,G=0;GC;)k--,k/=g(k),k++,k1?O:1};function D(f,P,E){var k=E[8]+E[2]*P[0]+E[5]*P[1];return f[0]=(E[6]+E[0]*P[0]+E[3]*P[1])/k,f[1]=(E[7]+E[1]*P[0]+E[4]*P[1])/k,f}function L(f,P,E){return w(f,P,D,E),f}function w(f,P,E,k){for(var O=[0,0],G=f.shape[0],z=f.shape[1],U=0;U0&&this.contourStart[k]!==null&&this.contourEnd[k]!==null&&this.contourEnd[k]>this.contourStart[k]))for(P[k]=!0,O=this.contourStart[k];Ore&&(this.minValues[B]=re),this.maxValues[B]",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}},51018:function(R,F,e){var i=e(49850),m=e(1426).extendFlat,t=e(92770);R.exports=function(c,s){var b=l(s.cells.values),g=function(W){return W.slice(s.header.values.length,W.length)},A=l(s.header.values);A.length&&!A[0].length&&(A[0]=[""],A=l(A));var v=A.concat(g(b).map(function(){return d((A[0]||[""]).length)})),h=s.domain,x=Math.floor(c._fullLayout._size.w*(h.x[1]-h.x[0])),C=Math.floor(c._fullLayout._size.h*(h.y[1]-h.y[0])),D=s.header.values.length?v[0].map(function(){return s.header.height}):[i.emptyHeaderHeight],L=b.length?b[0].map(function(){return s.cells.height}):[],w=D.reduce(p,0),M=C-w,S=M+i.uplift,f=u(L,S),P=u(D,w),E=n(P,[]),k=n(f,E),O={},G=s._fullInput.columnorder.concat(g(b.map(function(W,q){return q}))),z=v.map(function(W,q){var re=Array.isArray(s.columnwidth)?s.columnwidth[Math.min(q,s.columnwidth.length-1)]:s.columnwidth;return t(re)?Number(re):1}),U=z.reduce(p,0);z=z.map(function(W){return W/U*x});var H=Math.max(y(s.header.line.width),y(s.cells.line.width)),B={key:s.uid+c._context.staticPlot,translateX:h.x[0]*c._fullLayout._size.w,translateY:c._fullLayout._size.h*(1-h.y[1]),size:c._fullLayout._size,width:x,maxLineWidth:H,height:C,columnOrder:G,groupHeight:C,rowBlocks:k,headerRowBlocks:E,scrollY:0,cells:m({},s.cells,{values:b}),headerCells:m({},s.header,{values:v}),gdColumns:v.map(function(W){return W[0]}),gdColumnsOriginalOrder:v.map(function(W){return W[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:v.map(function(W,q){var re=O[W];O[W]=(re||0)+1;var ie=W+"__"+O[W];return{key:ie,label:W,specIndex:q,xIndex:G[q],xScale:r,x:void 0,calcdata:void 0,columnWidth:z[q]}})};return B.columns.forEach(function(W){W.calcdata=B,W.x=r(W)}),B};function y(o){if(Array.isArray(o)){for(var c=0,s=0;s=c||C===o.length-1)&&(s[g]=v,v.key=x++,v.firstRowIndex=h,v.lastRowIndex=C,v=a(),g+=A,h=C+1,A=0);return s}function a(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}},56269:function(R,F,e){var i=e(1426).extendFlat;F.splitToPanels=function(t){var y=[0,0],p=i({},t,{key:"header",type:"header",page:0,prevPages:y,currentRepaint:[null,null],dragHandle:!0,values:t.calcdata.headerCells.values[t.specIndex],rowBlocks:t.calcdata.headerRowBlocks,calcdata:i({},t.calcdata,{cells:t.calcdata.headerCells})}),l=i({},t,{key:"cells1",type:"cells",page:0,prevPages:y,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),d=i({},t,{key:"cells2",type:"cells",page:1,prevPages:y,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks});return[l,d,p]},F.splitToCells=function(t){var y=m(t);return(t.values||[]).slice(y[0],y[1]).map(function(p,l){var d=typeof p=="string"&&p.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:l+d,key:y[0]+l,column:t,calcdata:t.calcdata,page:t.page,rowBlocks:t.rowBlocks,value:p}})};function m(t){var y=t.rowBlocks[t.page],p=y?y.rows[0].rowIndex:0,l=y?p+y.rows.length:0;return[p,l]}},39754:function(R,F,e){var i=e(71828),m=e(44464),t=e(27670).c;function y(p,l){for(var d=p.columnorder||[],r=p.header.values.length,n=d.slice(0,r),u=n.slice().sort(function(c,s){return c-s}),a=n.map(function(c){return u.indexOf(c)}),o=a.length;o/i),Ae=!Ie||Me;we.mayHaveMarkup=Ie&&Fe.match(/[<&>]/);var De=E(Fe);we.latex=De;var ke=De?"":G(we.calcdata.cells.prefix,Se,Te)||"",We=De?"":G(we.calcdata.cells.suffix,Se,Te)||"",_e=De?null:G(we.calcdata.cells.format,Se,Te)||null,Ye=ke+(_e?y(_e)(we.value):we.value)+We,Pe;we.wrappingNeeded=!we.wrapped&&!Ae&&!De&&(Pe=k(Ye)),we.cellHeightMayIncrease=Me||De||we.mayHaveMarkup||(Pe===void 0?k(Ye):Pe),we.needsConvertToTspans=we.mayHaveMarkup||we.wrappingNeeded||we.latex;var Ve;if(we.wrappingNeeded){var Ze=i.wrapSplitCharacter===" "?Ye.replace(/we&&de.push(Se),we+=Ie}return de}function q(ne,ce,oe){var de=A(ce)[0];if(de!==void 0){var we=de.rowBlocks,Se=de.calcdata,Te=K(we,we.length),Fe=de.calcdata.groupHeight-B(de),Ie=Se.scrollY=Math.max(0,Math.min(Te-Fe,Se.scrollY)),Me=W(we,Ie,Fe);Me.length===1&&(Me[0]===we.length-1?Me.unshift(Me[0]-1):Me.push(Me[0]+1)),Me[0]%2&&Me.reverse(),ce.each(function(Ae,De){Ae.page=Me[De],Ae.scrollY=Ie}),ce.attr("transform",function(Ae){var De=K(Ae.rowBlocks,Ae.page)-Ae.scrollY;return n(0,De)}),ne&&(ie(ne,oe,ce,Me,de.prevPages,de,0),ie(ne,oe,ce,Me,de.prevPages,de,1),v(oe,ne))}}function re(ne,ce,oe,de){return function(Se){var Te=Se.calcdata?Se.calcdata:Se,Fe=ce.filter(function(De){return Te.key===De.key}),Ie=oe||Te.scrollbarState.dragMultiplier,Me=Te.scrollY;Te.scrollY=de===void 0?Te.scrollY+Ie*m.event.dy:de;var Ae=Fe.selectAll("."+i.cn.yColumn).selectAll("."+i.cn.columnBlock).filter(U);return q(ne,Ae,Fe),Te.scrollY===Me}}function ie(ne,ce,oe,de,we,Se,Te){var Fe=de[Te]!==we[Te];Fe&&(clearTimeout(Se.currentRepaint[Te]),Se.currentRepaint[Te]=setTimeout(function(){var Ie=oe.filter(function(Me,Ae){return Ae===Te&&de[Ae]!==we[Ae]});h(ne,ce,Ie,oe),we[Te]=de[Te]}))}function le(ne,ce,oe,de){return function(){var Se=m.select(ce.parentNode);Se.each(function(Te){var Fe=Te.fragments;Se.selectAll("tspan.line").each(function(Ye,Pe){Fe[Pe].width=this.getComputedTextLength()});var Ie=Fe[Fe.length-1].width,Me=Fe.slice(0,-1),Ae=[],De,ke,We=0,_e=Te.column.columnWidth-2*i.cellPad;for(Te.value="";Me.length;)De=Me.shift(),ke=De.width+Ie,We+ke>_e&&(Te.value+=Ae.join(i.wrapSpacer)+i.lineBreaker,Ae=[],We=0),Ae.push(De.text),We+=ke;We&&(Te.value+=Ae.join(i.wrapSpacer)),Te.wrapped=!0}),Se.selectAll("tspan.line").remove(),P(Se.select("."+i.cn.cellText),oe,ne,de),m.select(ce.parentNode.parentNode).call(Z)}}function he(ne,ce,oe,de,we){return function(){if(!we.settledY){var Te=m.select(ce.parentNode),Fe=fe(we),Ie=we.key-Fe.firstRowIndex,Me=Fe.rows[Ie].rowHeight,Ae=we.cellHeightMayIncrease?ce.parentNode.getBoundingClientRect().height+2*i.cellPad:Me,De=Math.max(Ae,Me),ke=De-Fe.rows[Ie].rowHeight;ke&&(Fe.rows[Ie].rowHeight=De,ne.selectAll("."+i.cn.columnCell).call(Z),q(null,ne.filter(U),0),v(oe,de,!0)),Te.attr("transform",function(){var We=this,_e=We.parentNode,Ye=_e.getBoundingClientRect(),Pe=m.select(We.parentNode).select("."+i.cn.cellRect).node().getBoundingClientRect(),Ve=We.transform.baseVal.consolidate(),Ze=Pe.top-Ye.top+(Ve?Ve.matrix.f:i.cellPad);return n($(we,m.select(We.parentNode).select("."+i.cn.cellTextHolder).node().getBoundingClientRect().width),Ze)}),we.settledY=!0}}}function $(ne,ce){switch(ne.align){case"left":return i.cellPad;case"right":return ne.column.columnWidth-(ce||0)-i.cellPad;case"center":return(ne.column.columnWidth-(ce||0))/2;default:return i.cellPad}}function Z(ne){ne.attr("transform",function(ce){var oe=ce.rowBlocks[0].auxiliaryBlocks.reduce(function(Te,Fe){return Te+Q(Fe,1/0)},0),de=fe(ce),we=Q(de,ce.key),Se=we+oe;return n(0,Se)}).selectAll("."+i.cn.cellRect).attr("height",function(ce){return te(fe(ce),ce.key).rowHeight})}function K(ne,ce){for(var oe=0,de=ce-1;de>=0;de--)oe+=ae(ne[de]);return oe}function Q(ne,ce){for(var oe=0,de=0;de","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:r({},p.textfont,{}),editType:"calc"},text:p.text,textinfo:l.textinfo,texttemplate:m({editType:"plot"},{keys:d.eventDataKeys.concat(["label","value"])}),hovertext:p.hovertext,hoverinfo:l.hoverinfo,hovertemplate:i({},{keys:d.eventDataKeys}),textfont:p.textfont,insidetextfont:p.insidetextfont,outsidetextfont:r({},p.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:p.sort,root:l.root,domain:y({name:"treemap",trace:!0,editType:"calc"})}},78018:function(R,F,e){var i=e(74875);F.name="treemap",F.plot=function(m,t,y,p){i.plotBasePlot(F.name,m,t,y,p)},F.clean=function(m,t,y,p){i.cleanBasePlot(F.name,m,t,y,p)}},65039:function(R,F,e){var i=e(52147);F.y=function(m,t){return i.calc(m,t)},F.T=function(m){return i._runCrossTraceCalc("treemap",m)}},43473:function(R){R.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},91174:function(R,F,e){var i=e(71828),m=e(45802),t=e(7901),y=e(27670).c,p=e(90769).handleText,l=e(97313).TEXTPAD,d=e(21081),r=d.hasColorscale,n=d.handleDefaults;R.exports=function(a,o,c,s){function b(P,E){return i.coerce(a,o,m,P,E)}var g=b("labels"),A=b("parents");if(!g||!g.length||!A||!A.length){o.visible=!1;return}var v=b("values");v&&v.length?b("branchvalues"):b("count"),b("level"),b("maxdepth");var h=b("tiling.packing");h==="squarify"&&b("tiling.squarifyratio"),b("tiling.flip"),b("tiling.pad");var x=b("text");b("texttemplate"),o.texttemplate||b("textinfo",Array.isArray(x)?"text+label":"label"),b("hovertext"),b("hovertemplate");var C=b("pathbar.visible"),D="auto";p(a,o,s,b,D,{hasPathbar:C,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),b("textposition");var L=o.textposition.indexOf("bottom")!==-1,w=b("marker.line.width");w&&b("marker.line.color",s.paper_bgcolor);var M=b("marker.colors"),S=o._hasColorscale=r(a,"marker","colors")||(a.marker||{}).coloraxis;S?n(a,o,s,b,{prefix:"marker.",cLetter:"c"}):b("marker.depthfade",!(M||[]).length);var f=o.textfont.size*2;b("marker.pad.t",L?f/4:f),b("marker.pad.l",f/4),b("marker.pad.r",f/4),b("marker.pad.b",L?f:f/4),b("marker.cornerradius"),o._hovered={marker:{line:{width:2,color:t.contrast(s.paper_bgcolor)}}},C&&(b("pathbar.thickness",o.pathbar.textfont.size+2*l),b("pathbar.side"),b("pathbar.edgeshape")),b("sort"),b("root.color"),y(o,s,b),o._length=null}},80694:function(R,F,e){var i=e(39898),m=e(2791),t=e(72597),y=t.clearMinTextSize,p=e(16688).resizeText,l=e(46650);R.exports=function(r,n,u,a,o){var c=o.type,s=o.drawDescendants,b=r._fullLayout,g=b["_"+c+"layer"],A,v,h=!u;if(y(c,b),A=g.selectAll("g.trace."+c).data(n,function(C){return C[0].trace.uid}),A.enter().append("g").classed("trace",!0).classed(c,!0),A.order(),!b.uniformtext.mode&&m.hasTransition(u)){a&&(v=a());var x=i.transition().duration(u.duration).ease(u.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()});x.each(function(){g.selectAll("g.trace").each(function(C){l(r,C,this,u,s)})})}else A.each(function(C){l(r,C,this,u,s)}),b.uniformtext.mode&&p(r,g.selectAll(".trace"),c);h&&A.exit().remove()}},66209:function(R,F,e){var i=e(39898),m=e(71828),t=e(91424),y=e(63893),p=e(37210),l=e(96362).styleOne,d=e(43473),r=e(2791),n=e(83523),u=!0;R.exports=function(o,c,s,b,g){var A=g.barDifY,v=g.width,h=g.height,x=g.viewX,C=g.viewY,D=g.pathSlice,L=g.toMoveInsideSlice,w=g.strTransform,M=g.hasTransition,S=g.handleSlicesExit,f=g.makeUpdateSliceInterpolator,P=g.makeUpdateTextInterpolator,E={},k=o._context.staticPlot,O=o._fullLayout,G=c[0],z=G.trace,U=G.hierarchy,H=v/z._entryDepth,B=r.listPath(s.data,"id"),W=p(U.copy(),[v,h],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();W=W.filter(function(re){var ie=B.indexOf(re.data.id);return ie===-1?!1:(re.x0=H*ie,re.x1=H*(ie+1),re.y0=A,re.y1=A+h,re.onPathbar=!0,!0)}),W.reverse(),b=b.data(W,r.getPtId),b.enter().append("g").classed("pathbar",!0),S(b,u,E,[v,h],D),b.order();var q=b;M&&(q=q.transition().each("end",function(){var re=i.select(this);r.setSliceCursor(re,o,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),q.each(function(re){re._x0=x(re.x0),re._x1=x(re.x1),re._y0=C(re.y0),re._y1=C(re.y1),re._hoverX=x(re.x1-Math.min(v,h)/2),re._hoverY=C(re.y1-h/2);var ie=i.select(this),le=m.ensureSingle(ie,"path","surface",function(K){K.style("pointer-events",k?"none":"all")});M?le.transition().attrTween("d",function(K){var Q=f(K,u,E,[v,h]);return function(ae){return D(Q(ae))}}):le.attr("d",D),ie.call(n,s,o,c,{styleOne:l,eventDataKeys:d.eventDataKeys,transitionTime:d.CLICK_TRANSITION_TIME,transitionEasing:d.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,o,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:o._transitioning}),le.call(l,re,z,{hovered:!1}),re._text=(r.getPtLabel(re)||"").split("
").join(" ")||"";var he=m.ensureSingle(ie,"g","slicetext"),$=m.ensureSingle(he,"text","",function(K){K.attr("data-notex",1)}),Z=m.ensureUniformFontSize(o,r.determineTextFont(z,re,O.font,{onPathbar:!0}));$.text(re._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(t.font,Z).call(y.convertToTspans,o),re.textBB=t.bBox($.node()),re.transform=L(re,{fontSize:Z.size,onPathbar:!0}),re.transform.fontSize=Z.size,M?$.transition().attrTween("transform",function(K){var Q=P(K,u,E,[v,h]);return function(ae){return w(Q(ae))}}):$.attr("transform",w(re))})}},52583:function(R,F,e){var i=e(39898),m=e(71828),t=e(91424),y=e(63893),p=e(37210),l=e(96362).styleOne,d=e(43473),r=e(2791),n=e(83523),u=e(24714).formatSliceLabel,a=!1;R.exports=function(c,s,b,g,A){var v=A.width,h=A.height,x=A.viewX,C=A.viewY,D=A.pathSlice,L=A.toMoveInsideSlice,w=A.strTransform,M=A.hasTransition,S=A.handleSlicesExit,f=A.makeUpdateSliceInterpolator,P=A.makeUpdateTextInterpolator,E=A.prevEntry,k={},O=c._context.staticPlot,G=c._fullLayout,z=s[0],U=z.trace,H=U.textposition.indexOf("left")!==-1,B=U.textposition.indexOf("right")!==-1,W=U.textposition.indexOf("bottom")!==-1,q=!W&&!U.marker.pad.t||W&&!U.marker.pad.b,re=p(b,[v,h],{packing:U.tiling.packing,squarifyratio:U.tiling.squarifyratio,flipX:U.tiling.flip.indexOf("x")>-1,flipY:U.tiling.flip.indexOf("y")>-1,pad:{inner:U.tiling.pad,top:U.marker.pad.t,left:U.marker.pad.l,right:U.marker.pad.r,bottom:U.marker.pad.b}}),ie=re.descendants(),le=1/0,he=-1/0;ie.forEach(function(ae){var fe=ae.depth;fe>=U._maxDepth?(ae.x0=ae.x1=(ae.x0+ae.x1)/2,ae.y0=ae.y1=(ae.y0+ae.y1)/2):(le=Math.min(le,fe),he=Math.max(he,fe))}),g=g.data(ie,r.getPtId),U._maxVisibleLayers=isFinite(he)?he-le+1:0,g.enter().append("g").classed("slice",!0),S(g,a,k,[v,h],D),g.order();var $=null;if(M&&E){var Z=r.getPtId(E);g.each(function(ae){$===null&&r.getPtId(ae)===Z&&($={x0:ae.x0,x1:ae.x1,y0:ae.y0,y1:ae.y1})})}var K=function(){return $||{x0:0,x1:v,y0:0,y1:h}},Q=g;return M&&(Q=Q.transition().each("end",function(){var ae=i.select(this);r.setSliceCursor(ae,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),Q.each(function(ae){var fe=r.isHeader(ae,U);ae._x0=x(ae.x0),ae._x1=x(ae.x1),ae._y0=C(ae.y0),ae._y1=C(ae.y1),ae._hoverX=x(ae.x1-U.marker.pad.r),ae._hoverY=C(W?ae.y1-U.marker.pad.b/2:ae.y0+U.marker.pad.t/2);var te=i.select(this),ne=m.ensureSingle(te,"path","surface",function(we){we.style("pointer-events",O?"none":"all")});M?ne.transition().attrTween("d",function(we){var Se=f(we,a,K(),[v,h]);return function(Te){return D(Se(Te))}}):ne.attr("d",D),te.call(n,b,c,s,{styleOne:l,eventDataKeys:d.eventDataKeys,transitionTime:d.CLICK_TRANSITION_TIME,transitionEasing:d.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,c,{isTransitioning:c._transitioning}),ne.call(l,ae,U,{hovered:!1}),ae.x0===ae.x1||ae.y0===ae.y1?ae._text="":fe?ae._text=q?"":r.getPtLabel(ae)||"":ae._text=u(ae,b,U,s,G)||"";var ce=m.ensureSingle(te,"g","slicetext"),oe=m.ensureSingle(ce,"text","",function(we){we.attr("data-notex",1)}),de=m.ensureUniformFontSize(c,r.determineTextFont(U,ae,G.font));oe.text(ae._text||" ").classed("slicetext",!0).attr("text-anchor",B?"end":H||fe?"start":"middle").call(t.font,de).call(y.convertToTspans,c),ae.textBB=t.bBox(oe.node()),ae.transform=L(ae,{fontSize:de.size,isHeader:fe}),ae.transform.fontSize=de.size,M?oe.transition().attrTween("transform",function(we){var Se=P(we,a,K(),[v,h]);return function(Te){return w(Se(Te))}}):oe.attr("transform",w(ae))}),$}},14102:function(R){R.exports=function F(e,i,m){var t;m.swapXY&&(t=e.x0,e.x0=e.y0,e.y0=t,t=e.x1,e.x1=e.y1,e.y1=t),m.flipX&&(t=e.x0,e.x0=i[0]-e.x1,e.x1=i[0]-t),m.flipY&&(t=e.y0,e.y0=i[1]-e.y1,e.y1=i[1]-t);var y=e.children;if(y)for(var p=0;p-1?B+re:-(q+re):0,le={x0:W,x1:W,y0:ie,y1:ie+q},he=function(Be,rt,ot){var qe=C.tiling.pad,Oe=function(Re){return Re-qe<=rt.x0},Ce=function(Re){return Re+qe>=rt.x1},pe=function(Re){return Re-qe<=rt.y0},be=function(Re){return Re+qe>=rt.y1};return Be.x0===rt.x0&&Be.x1===rt.x1&&Be.y0===rt.y0&&Be.y1===rt.y1?{x0:Be.x0,x1:Be.x1,y0:Be.y0,y1:Be.y1}:{x0:Oe(Be.x0-qe)?0:Ce(Be.x0-qe)?ot[0]:Be.x0,x1:Oe(Be.x1+qe)?0:Ce(Be.x1+qe)?ot[0]:Be.x1,y0:pe(Be.y0-qe)?0:be(Be.y0-qe)?ot[1]:Be.y0,y1:pe(Be.y1+qe)?0:be(Be.y1+qe)?ot[1]:Be.y1}},$=null,Z={},K={},Q=null,ae=function(Be,rt){return rt?Z[o(Be)]:K[o(Be)]},fe=function(Be,rt,ot,qe){if(rt)return Z[o(w)]||le;var Oe=K[C.level]||ot;return G(Be)?he(Be,Oe,qe):{}};x.hasMultipleRoots&&E&&O++,C._maxDepth=O,C._backgroundColor=h.paper_bgcolor,C._entryDepth=M.data.depth,C._atRootLevel=E;var te=-H/2+z.l+z.w*(U.x[1]+U.x[0])/2,ne=-B/2+z.t+z.h*(1-(U.y[1]+U.y[0])/2),ce=function(Be){return te+Be},oe=function(Be){return ne+Be},de=oe(0),we=ce(0),Se=function(Be){return we+Be},Te=function(Be){return de+Be};function Fe(Be,rt){return Be+","+rt}var Ie=Se(0),Me=function(Be){Be.x=Math.max(Ie,Be.x)},Ae=C.pathbar.edgeshape,De=function(Be){var rt=Se(Math.max(Math.min(Be.x0,Be.x0),0)),ot=Se(Math.min(Math.max(Be.x1,Be.x1),W)),qe=Te(Be.y0),Oe=Te(Be.y1),Ce=q/2,pe={},be={};pe.x=rt,be.x=ot,pe.y=be.y=(qe+Oe)/2;var Re={x:rt,y:qe},He={x:ot,y:qe},st={x:ot,y:Oe},ct={x:rt,y:Oe};return Ae===">"?(Re.x-=Ce,He.x-=Ce,st.x-=Ce,ct.x-=Ce):Ae==="/"?(st.x-=Ce,ct.x-=Ce,pe.x-=Ce/2,be.x-=Ce/2):Ae==="\\"?(Re.x-=Ce,He.x-=Ce,pe.x-=Ce/2,be.x-=Ce/2):Ae==="<"&&(pe.x-=Ce,be.x-=Ce),Me(Re),Me(ct),Me(pe),Me(He),Me(st),Me(be),"M"+Fe(Re.x,Re.y)+"L"+Fe(He.x,He.y)+"L"+Fe(be.x,be.y)+"L"+Fe(st.x,st.y)+"L"+Fe(ct.x,ct.y)+"L"+Fe(pe.x,pe.y)+"Z"},ke=C[L?"tiling":"marker"].pad,We=function(Be){return C.textposition.indexOf(Be)!==-1},_e=We("top"),Ye=We("left"),Pe=We("right"),Ve=We("bottom"),Ze=function(Be){var rt=ce(Be.x0),ot=ce(Be.x1),qe=oe(Be.y0),Oe=oe(Be.y1),Ce=ot-rt,pe=Oe-qe;if(!Ce||!pe)return"";var be=C.marker.cornerradius||0,Re=Math.min(be,Ce/2,pe/2);Re&&Be.data&&Be.data.data&&Be.data.data.label&&(_e&&(Re=Math.min(Re,ke.t)),Ye&&(Re=Math.min(Re,ke.l)),Pe&&(Re=Math.min(Re,ke.r)),Ve&&(Re=Math.min(Re,ke.b)));var He=function(st,ct){return Re?"a"+Fe(Re,Re)+" 0 0 1 "+Fe(st,ct):""};return"M"+Fe(rt,qe+Re)+He(Re,-Re)+"L"+Fe(ot-Re,qe)+He(Re,Re)+"L"+Fe(ot,Oe-Re)+He(-Re,Re)+"L"+Fe(rt+Re,Oe)+He(-Re,-Re)+"Z"},Ke=function(Be,rt){var ot=Be.x0,qe=Be.x1,Oe=Be.y0,Ce=Be.y1,pe=Be.textBB,be=_e||rt.isHeader&&!Ve,Re=be?"start":Ve?"end":"middle",He=We("right"),st=We("left")||rt.onPathbar,ct=st?-1:He?1:0;if(rt.isHeader){if(ot+=(L?ke:ke.l)-p,qe-=(L?ke:ke.r)-p,ot>=qe){var bt=(ot+qe)/2;ot=bt,qe=bt}var Lt;Ve?(Lt=Ce-(L?ke:ke.b),Oe0)for(var w=0;w0){var D=d.xa,L=d.ya,w,M,S,f,P;s.orientation==="h"?(P=r,w="y",S=L,M="x",f=D):(P=n,w="x",S=D,M="y",f=L);var E=c[d.index];if(P>=E.span[0]&&P<=E.span[1]){var k=m.extendFlat({},d),O=f.c2p(P,!0),G=p.getKdeValue(E,s,P),z=p.getPositionOnKdePath(E,s,O),U=S._offset,H=S._length;k[w+"0"]=z[0],k[w+"1"]=z[1],k[M+"0"]=k[M+"1"]=O,k[M+"Label"]=M+": "+t.hoverLabelText(f,P,s[M+"hoverformat"])+", "+c[0].t.labels.kde+" "+G.toFixed(3);for(var B=0,W=0;W")),c.color=l(b,C),[c]};function l(d,r){var n=d[r.dir].marker,u=n.color,a=n.line.color,o=n.line.width;if(m(u))return u;if(m(a)&&o)return a}},19990:function(R,F,e){R.exports={attributes:e(43037),layoutAttributes:e(13494),supplyDefaults:e(83266).supplyDefaults,crossTraceDefaults:e(83266).crossTraceDefaults,supplyLayoutDefaults:e(5176),calc:e(52752),crossTraceCalc:e(70766),plot:e(30436),style:e(55750).style,hoverPoints:e(61326),eventData:e(58593),selectPoints:e(81974),moduleType:"trace",name:"waterfall",basePlotModule:e(93612),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},13494:function(R){R.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},5176:function(R,F,e){var i=e(71828),m=e(13494);R.exports=function(t,y,p){var l=!1;function d(u,a){return i.coerce(t,y,m,u,a)}for(var r=0;r0&&(h?P+="M"+S[0]+","+f[1]+"V"+f[0]:P+="M"+S[1]+","+f[0]+"H"+S[0]),x!=="between"&&(L.isSum||w path").each(function(g){if(!g.isBlank){var A=b[g.dir].marker;i.select(this).call(t.fill,A.color).call(t.stroke,A.line.color).call(m.dashLine,A.line.dash,A.line.width).style("opacity",b.selectedpoints&&!g.selected?y:1)}}),d(s,b,n),s.selectAll(".lines").each(function(){var g=b.connector.line;m.lineGroupStyle(i.select(this).selectAll("path"),g.width,g.color,g.dash)})})}R.exports={style:r}},82887:function(R,F,e){var i=e(89298),m=e(71828),t=e(86281),y=e(79344).p,p=e(50606).BADNUM;F.moduleType="transform",F.name="aggregate";var l=F.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},d=l.aggregations;F.supplyDefaults=function(c,s){var b={},g;function A(E,k){return m.coerce(c,b,l,E,k)}var v=A("enabled");if(!v)return b;var h=t.findArrayAttributes(s),x={};for(g=0;gC&&(C=M,D=w)}}return C?A(D):p};case"rms":return function(v,h){for(var x=0,C=0,D=0;D":return function(x){return v(x)>h};case">=":return function(x){return v(x)>=h};case"[]":return function(x){var C=v(x);return C>=h[0]&&C<=h[1]};case"()":return function(x){var C=v(x);return C>h[0]&&C=h[0]&&Ch[0]&&C<=h[1]};case"][":return function(x){var C=v(x);return C<=h[0]||C>=h[1]};case")(":return function(x){var C=v(x);return Ch[1]};case"](":return function(x){var C=v(x);return C<=h[0]||C>h[1]};case")[":return function(x){var C=v(x);return C=h[1]};case"{}":return function(x){return h.indexOf(v(x))!==-1};case"}{":return function(x){return h.indexOf(v(x))===-1}}}},43102:function(R,F,e){var i=e(71828),m=e(86281),t=e(74875),y=e(79344).p;F.moduleType="transform",F.name="groupby",F.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"data_array",dflt:[],editType:"calc"},nameformat:{valType:"string",editType:"calc"},styles:{_isLinkedToArray:"style",target:{valType:"string",editType:"calc"},value:{valType:"any",dflt:{},editType:"calc",_compareAsJSON:!0},editType:"calc"},editType:"calc"},F.supplyDefaults=function(l,d,r){var n,u={};function a(A,v){return i.coerce(l,u,F.attributes,A,v)}var o=a("enabled");if(!o)return u;a("groups"),a("nameformat",r._dataLength>1?"%{group} (%{trace})":"%{group}");var c=l.styles,s=u.styles=[];if(c)for(n=0;n +* @license MIT +*/function n(Ce,pe){if(!(Ce instanceof pe))throw new TypeError("Cannot call a class as a function")}function u(Ce,pe){for(var be=0;be"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function v(Ce){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(be){return be.__proto__||Object.getPrototypeOf(be)},v(Ce)}function h(Ce){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(pe){return typeof pe}:function(pe){return pe&&typeof Symbol=="function"&&pe.constructor===Symbol&&pe!==Symbol.prototype?"symbol":typeof pe},h(Ce)}var x=r(3910),C=r(3187),D=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;d.lW=S,d.h2=50;var L=2147483647;S.TYPED_ARRAY_SUPPORT=w(),!S.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function w(){try{var Ce=new Uint8Array(1),pe={foo:function(){return 42}};return Object.setPrototypeOf(pe,Uint8Array.prototype),Object.setPrototypeOf(Ce,pe),Ce.foo()===42}catch{return!1}}Object.defineProperty(S.prototype,"parent",{enumerable:!0,get:function(){if(!!S.isBuffer(this))return this.buffer}}),Object.defineProperty(S.prototype,"offset",{enumerable:!0,get:function(){if(!!S.isBuffer(this))return this.byteOffset}});function M(Ce){if(Ce>L)throw new RangeError('The value "'+Ce+'" is invalid for option "size"');var pe=new Uint8Array(Ce);return Object.setPrototypeOf(pe,S.prototype),pe}function S(Ce,pe,be){if(typeof Ce=="number"){if(typeof pe=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return k(Ce)}return f(Ce,pe,be)}S.poolSize=8192;function f(Ce,pe,be){if(typeof Ce=="string")return O(Ce,pe);if(ArrayBuffer.isView(Ce))return z(Ce);if(Ce==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+h(Ce));if(Be(Ce,ArrayBuffer)||Ce&&Be(Ce.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Be(Ce,SharedArrayBuffer)||Ce&&Be(Ce.buffer,SharedArrayBuffer)))return U(Ce,pe,be);if(typeof Ce=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Re=Ce.valueOf&&Ce.valueOf();if(Re!=null&&Re!==Ce)return S.from(Re,pe,be);var He=H(Ce);if(He)return He;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Ce[Symbol.toPrimitive]=="function")return S.from(Ce[Symbol.toPrimitive]("string"),pe,be);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+h(Ce))}S.from=function(Ce,pe,be){return f(Ce,pe,be)},Object.setPrototypeOf(S.prototype,Uint8Array.prototype),Object.setPrototypeOf(S,Uint8Array);function P(Ce){if(typeof Ce!="number")throw new TypeError('"size" argument must be of type number');if(Ce<0)throw new RangeError('The value "'+Ce+'" is invalid for option "size"')}function E(Ce,pe,be){return P(Ce),Ce<=0?M(Ce):pe!==void 0?typeof be=="string"?M(Ce).fill(pe,be):M(Ce).fill(pe):M(Ce)}S.alloc=function(Ce,pe,be){return E(Ce,pe,be)};function k(Ce){return P(Ce),M(Ce<0?0:B(Ce)|0)}S.allocUnsafe=function(Ce){return k(Ce)},S.allocUnsafeSlow=function(Ce){return k(Ce)};function O(Ce,pe){if((typeof pe!="string"||pe==="")&&(pe="utf8"),!S.isEncoding(pe))throw new TypeError("Unknown encoding: "+pe);var be=W(Ce,pe)|0,Re=M(be),He=Re.write(Ce,pe);return He!==be&&(Re=Re.slice(0,He)),Re}function G(Ce){for(var pe=Ce.length<0?0:B(Ce.length)|0,be=M(pe),Re=0;Re=L)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+L.toString(16)+" bytes");return Ce|0}S.isBuffer=function(pe){return pe!=null&&pe._isBuffer===!0&&pe!==S.prototype},S.compare=function(pe,be){if(Be(pe,Uint8Array)&&(pe=S.from(pe,pe.offset,pe.byteLength)),Be(be,Uint8Array)&&(be=S.from(be,be.offset,be.byteLength)),!S.isBuffer(pe)||!S.isBuffer(be))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(pe===be)return 0;for(var Re=pe.length,He=be.length,st=0,ct=Math.min(Re,He);stHe.length?(S.isBuffer(ct)||(ct=S.from(ct)),ct.copy(He,st)):Uint8Array.prototype.set.call(He,ct,st);else if(S.isBuffer(ct))ct.copy(He,st);else throw new TypeError('"list" argument must be an Array of Buffers');st+=ct.length}return He};function W(Ce,pe){if(S.isBuffer(Ce))return Ce.length;if(ArrayBuffer.isView(Ce)||Be(Ce,ArrayBuffer))return Ce.byteLength;if(typeof Ce!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+h(Ce));var be=Ce.length,Re=arguments.length>2&&arguments[2]===!0;if(!Re&&be===0)return 0;for(var He=!1;;)switch(pe){case"ascii":case"latin1":case"binary":return be;case"utf8":case"utf-8":return vt(Ce).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return be*2;case"hex":return be>>>1;case"base64":return et(Ce).length;default:if(He)return Re?-1:vt(Ce).length;pe=(""+pe).toLowerCase(),He=!0}}S.byteLength=W;function q(Ce,pe,be){var Re=!1;if((pe===void 0||pe<0)&&(pe=0),pe>this.length||((be===void 0||be>this.length)&&(be=this.length),be<=0)||(be>>>=0,pe>>>=0,be<=pe))return"";for(Ce||(Ce="utf8");;)switch(Ce){case"hex":return de(this,pe,be);case"utf8":case"utf-8":return fe(this,pe,be);case"ascii":return ce(this,pe,be);case"latin1":case"binary":return oe(this,pe,be);case"base64":return ae(this,pe,be);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return we(this,pe,be);default:if(Re)throw new TypeError("Unknown encoding: "+Ce);Ce=(Ce+"").toLowerCase(),Re=!0}}S.prototype._isBuffer=!0;function re(Ce,pe,be){var Re=Ce[pe];Ce[pe]=Ce[be],Ce[be]=Re}S.prototype.swap16=function(){var pe=this.length;if(pe%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var be=0;bebe&&(pe+=" ... "),""},D&&(S.prototype[D]=S.prototype.inspect),S.prototype.compare=function(pe,be,Re,He,st){if(Be(pe,Uint8Array)&&(pe=S.from(pe,pe.offset,pe.byteLength)),!S.isBuffer(pe))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+h(pe));if(be===void 0&&(be=0),Re===void 0&&(Re=pe?pe.length:0),He===void 0&&(He=0),st===void 0&&(st=this.length),be<0||Re>pe.length||He<0||st>this.length)throw new RangeError("out of range index");if(He>=st&&be>=Re)return 0;if(He>=st)return-1;if(be>=Re)return 1;if(be>>>=0,Re>>>=0,He>>>=0,st>>>=0,this===pe)return 0;for(var ct=st-He,bt=Re-be,Lt=Math.min(ct,bt),Ut=this.slice(He,st),Gt=pe.slice(be,Re),Ft=0;Ft2147483647?be=2147483647:be<-2147483648&&(be=-2147483648),be=+be,rt(be)&&(be=He?0:Ce.length-1),be<0&&(be=Ce.length+be),be>=Ce.length){if(He)return-1;be=Ce.length-1}else if(be<0)if(He)be=0;else return-1;if(typeof pe=="string"&&(pe=S.from(pe,Re)),S.isBuffer(pe))return pe.length===0?-1:le(Ce,pe,be,Re,He);if(typeof pe=="number")return pe=pe&255,typeof Uint8Array.prototype.indexOf=="function"?He?Uint8Array.prototype.indexOf.call(Ce,pe,be):Uint8Array.prototype.lastIndexOf.call(Ce,pe,be):le(Ce,[pe],be,Re,He);throw new TypeError("val must be string, number or Buffer")}function le(Ce,pe,be,Re,He){var st=1,ct=Ce.length,bt=pe.length;if(Re!==void 0&&(Re=String(Re).toLowerCase(),Re==="ucs2"||Re==="ucs-2"||Re==="utf16le"||Re==="utf-16le")){if(Ce.length<2||pe.length<2)return-1;st=2,ct/=2,bt/=2,be/=2}function Lt(lr,Or){return st===1?lr[Or]:lr.readUInt16BE(Or*st)}var Ut;if(He){var Gt=-1;for(Ut=be;Utct&&(be=ct-bt),Ut=be;Ut>=0;Ut--){for(var Ft=!0,tr=0;trHe&&(Re=He)):Re=He;var st=pe.length;Re>st/2&&(Re=st/2);var ct;for(ct=0;ct>>0,isFinite(Re)?(Re=Re>>>0,He===void 0&&(He="utf8")):(He=Re,Re=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var st=this.length-be;if((Re===void 0||Re>st)&&(Re=st),pe.length>0&&(Re<0||be<0)||be>this.length)throw new RangeError("Attempt to write outside buffer bounds");He||(He="utf8");for(var ct=!1;;)switch(He){case"hex":return he(this,pe,be,Re);case"utf8":case"utf-8":return $(this,pe,be,Re);case"ascii":case"latin1":case"binary":return Z(this,pe,be,Re);case"base64":return K(this,pe,be,Re);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,pe,be,Re);default:if(ct)throw new TypeError("Unknown encoding: "+He);He=(""+He).toLowerCase(),ct=!0}},S.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ae(Ce,pe,be){return pe===0&&be===Ce.length?x.fromByteArray(Ce):x.fromByteArray(Ce.slice(pe,be))}function fe(Ce,pe,be){be=Math.min(Ce.length,be);for(var Re=[],He=pe;He239?4:st>223?3:st>191?2:1;if(He+bt<=be){var Lt=void 0,Ut=void 0,Gt=void 0,Ft=void 0;switch(bt){case 1:st<128&&(ct=st);break;case 2:Lt=Ce[He+1],(Lt&192)===128&&(Ft=(st&31)<<6|Lt&63,Ft>127&&(ct=Ft));break;case 3:Lt=Ce[He+1],Ut=Ce[He+2],(Lt&192)===128&&(Ut&192)===128&&(Ft=(st&15)<<12|(Lt&63)<<6|Ut&63,Ft>2047&&(Ft<55296||Ft>57343)&&(ct=Ft));break;case 4:Lt=Ce[He+1],Ut=Ce[He+2],Gt=Ce[He+3],(Lt&192)===128&&(Ut&192)===128&&(Gt&192)===128&&(Ft=(st&15)<<18|(Lt&63)<<12|(Ut&63)<<6|Gt&63,Ft>65535&&Ft<1114112&&(ct=Ft))}}ct===null?(ct=65533,bt=1):ct>65535&&(ct-=65536,Re.push(ct>>>10&1023|55296),ct=56320|ct&1023),Re.push(ct),He+=bt}return ne(Re)}var te=4096;function ne(Ce){var pe=Ce.length;if(pe<=te)return String.fromCharCode.apply(String,Ce);for(var be="",Re=0;ReRe)&&(be=Re);for(var He="",st=pe;stRe&&(pe=Re),be<0?(be+=Re,be<0&&(be=0)):be>Re&&(be=Re),bebe)throw new RangeError("Trying to access beyond buffer length")}S.prototype.readUintLE=S.prototype.readUIntLE=function(pe,be,Re){pe=pe>>>0,be=be>>>0,Re||Se(pe,be,this.length);for(var He=this[pe],st=1,ct=0;++ct>>0,be=be>>>0,Re||Se(pe,be,this.length);for(var He=this[pe+--be],st=1;be>0&&(st*=256);)He+=this[pe+--be]*st;return He},S.prototype.readUint8=S.prototype.readUInt8=function(pe,be){return pe=pe>>>0,be||Se(pe,1,this.length),this[pe]},S.prototype.readUint16LE=S.prototype.readUInt16LE=function(pe,be){return pe=pe>>>0,be||Se(pe,2,this.length),this[pe]|this[pe+1]<<8},S.prototype.readUint16BE=S.prototype.readUInt16BE=function(pe,be){return pe=pe>>>0,be||Se(pe,2,this.length),this[pe]<<8|this[pe+1]},S.prototype.readUint32LE=S.prototype.readUInt32LE=function(pe,be){return pe=pe>>>0,be||Se(pe,4,this.length),(this[pe]|this[pe+1]<<8|this[pe+2]<<16)+this[pe+3]*16777216},S.prototype.readUint32BE=S.prototype.readUInt32BE=function(pe,be){return pe=pe>>>0,be||Se(pe,4,this.length),this[pe]*16777216+(this[pe+1]<<16|this[pe+2]<<8|this[pe+3])},S.prototype.readBigUInt64LE=qe(function(pe){pe=pe>>>0,Ve(pe,"offset");var be=this[pe],Re=this[pe+7];(be===void 0||Re===void 0)&&Ze(pe,this.length-8);var He=be+this[++pe]*Math.pow(2,8)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,24),st=this[++pe]+this[++pe]*Math.pow(2,8)+this[++pe]*Math.pow(2,16)+Re*Math.pow(2,24);return BigInt(He)+(BigInt(st)<>>0,Ve(pe,"offset");var be=this[pe],Re=this[pe+7];(be===void 0||Re===void 0)&&Ze(pe,this.length-8);var He=be*Math.pow(2,24)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,8)+this[++pe],st=this[++pe]*Math.pow(2,24)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,8)+Re;return(BigInt(He)<>>0,be=be>>>0,Re||Se(pe,be,this.length);for(var He=this[pe],st=1,ct=0;++ct=st&&(He-=Math.pow(2,8*be)),He},S.prototype.readIntBE=function(pe,be,Re){pe=pe>>>0,be=be>>>0,Re||Se(pe,be,this.length);for(var He=be,st=1,ct=this[pe+--He];He>0&&(st*=256);)ct+=this[pe+--He]*st;return st*=128,ct>=st&&(ct-=Math.pow(2,8*be)),ct},S.prototype.readInt8=function(pe,be){return pe=pe>>>0,be||Se(pe,1,this.length),this[pe]&128?(255-this[pe]+1)*-1:this[pe]},S.prototype.readInt16LE=function(pe,be){pe=pe>>>0,be||Se(pe,2,this.length);var Re=this[pe]|this[pe+1]<<8;return Re&32768?Re|4294901760:Re},S.prototype.readInt16BE=function(pe,be){pe=pe>>>0,be||Se(pe,2,this.length);var Re=this[pe+1]|this[pe]<<8;return Re&32768?Re|4294901760:Re},S.prototype.readInt32LE=function(pe,be){return pe=pe>>>0,be||Se(pe,4,this.length),this[pe]|this[pe+1]<<8|this[pe+2]<<16|this[pe+3]<<24},S.prototype.readInt32BE=function(pe,be){return pe=pe>>>0,be||Se(pe,4,this.length),this[pe]<<24|this[pe+1]<<16|this[pe+2]<<8|this[pe+3]},S.prototype.readBigInt64LE=qe(function(pe){pe=pe>>>0,Ve(pe,"offset");var be=this[pe],Re=this[pe+7];(be===void 0||Re===void 0)&&Ze(pe,this.length-8);var He=this[pe+4]+this[pe+5]*Math.pow(2,8)+this[pe+6]*Math.pow(2,16)+(Re<<24);return(BigInt(He)<>>0,Ve(pe,"offset");var be=this[pe],Re=this[pe+7];(be===void 0||Re===void 0)&&Ze(pe,this.length-8);var He=(be<<24)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,8)+this[++pe];return(BigInt(He)<>>0,be||Se(pe,4,this.length),C.read(this,pe,!0,23,4)},S.prototype.readFloatBE=function(pe,be){return pe=pe>>>0,be||Se(pe,4,this.length),C.read(this,pe,!1,23,4)},S.prototype.readDoubleLE=function(pe,be){return pe=pe>>>0,be||Se(pe,8,this.length),C.read(this,pe,!0,52,8)},S.prototype.readDoubleBE=function(pe,be){return pe=pe>>>0,be||Se(pe,8,this.length),C.read(this,pe,!1,52,8)};function Te(Ce,pe,be,Re,He,st){if(!S.isBuffer(Ce))throw new TypeError('"buffer" argument must be a Buffer instance');if(pe>He||peCe.length)throw new RangeError("Index out of range")}S.prototype.writeUintLE=S.prototype.writeUIntLE=function(pe,be,Re,He){if(pe=+pe,be=be>>>0,Re=Re>>>0,!He){var st=Math.pow(2,8*Re)-1;Te(this,pe,be,Re,st,0)}var ct=1,bt=0;for(this[be]=pe&255;++bt>>0,Re=Re>>>0,!He){var st=Math.pow(2,8*Re)-1;Te(this,pe,be,Re,st,0)}var ct=Re-1,bt=1;for(this[be+ct]=pe&255;--ct>=0&&(bt*=256);)this[be+ct]=pe/bt&255;return be+Re},S.prototype.writeUint8=S.prototype.writeUInt8=function(pe,be,Re){return pe=+pe,be=be>>>0,Re||Te(this,pe,be,1,255,0),this[be]=pe&255,be+1},S.prototype.writeUint16LE=S.prototype.writeUInt16LE=function(pe,be,Re){return pe=+pe,be=be>>>0,Re||Te(this,pe,be,2,65535,0),this[be]=pe&255,this[be+1]=pe>>>8,be+2},S.prototype.writeUint16BE=S.prototype.writeUInt16BE=function(pe,be,Re){return pe=+pe,be=be>>>0,Re||Te(this,pe,be,2,65535,0),this[be]=pe>>>8,this[be+1]=pe&255,be+2},S.prototype.writeUint32LE=S.prototype.writeUInt32LE=function(pe,be,Re){return pe=+pe,be=be>>>0,Re||Te(this,pe,be,4,4294967295,0),this[be+3]=pe>>>24,this[be+2]=pe>>>16,this[be+1]=pe>>>8,this[be]=pe&255,be+4},S.prototype.writeUint32BE=S.prototype.writeUInt32BE=function(pe,be,Re){return pe=+pe,be=be>>>0,Re||Te(this,pe,be,4,4294967295,0),this[be]=pe>>>24,this[be+1]=pe>>>16,this[be+2]=pe>>>8,this[be+3]=pe&255,be+4};function Fe(Ce,pe,be,Re,He){Pe(pe,Re,He,Ce,be,7);var st=Number(pe&BigInt(4294967295));Ce[be++]=st,st=st>>8,Ce[be++]=st,st=st>>8,Ce[be++]=st,st=st>>8,Ce[be++]=st;var ct=Number(pe>>BigInt(32)&BigInt(4294967295));return Ce[be++]=ct,ct=ct>>8,Ce[be++]=ct,ct=ct>>8,Ce[be++]=ct,ct=ct>>8,Ce[be++]=ct,be}function Ie(Ce,pe,be,Re,He){Pe(pe,Re,He,Ce,be,7);var st=Number(pe&BigInt(4294967295));Ce[be+7]=st,st=st>>8,Ce[be+6]=st,st=st>>8,Ce[be+5]=st,st=st>>8,Ce[be+4]=st;var ct=Number(pe>>BigInt(32)&BigInt(4294967295));return Ce[be+3]=ct,ct=ct>>8,Ce[be+2]=ct,ct=ct>>8,Ce[be+1]=ct,ct=ct>>8,Ce[be]=ct,be+8}S.prototype.writeBigUInt64LE=qe(function(pe){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Fe(this,pe,be,BigInt(0),BigInt("0xffffffffffffffff"))}),S.prototype.writeBigUInt64BE=qe(function(pe){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Ie(this,pe,be,BigInt(0),BigInt("0xffffffffffffffff"))}),S.prototype.writeIntLE=function(pe,be,Re,He){if(pe=+pe,be=be>>>0,!He){var st=Math.pow(2,8*Re-1);Te(this,pe,be,Re,st-1,-st)}var ct=0,bt=1,Lt=0;for(this[be]=pe&255;++ct>0)-Lt&255;return be+Re},S.prototype.writeIntBE=function(pe,be,Re,He){if(pe=+pe,be=be>>>0,!He){var st=Math.pow(2,8*Re-1);Te(this,pe,be,Re,st-1,-st)}var ct=Re-1,bt=1,Lt=0;for(this[be+ct]=pe&255;--ct>=0&&(bt*=256);)pe<0&&Lt===0&&this[be+ct+1]!==0&&(Lt=1),this[be+ct]=(pe/bt>>0)-Lt&255;return be+Re},S.prototype.writeInt8=function(pe,be,Re){return pe=+pe,be=be>>>0,Re||Te(this,pe,be,1,127,-128),pe<0&&(pe=255+pe+1),this[be]=pe&255,be+1},S.prototype.writeInt16LE=function(pe,be,Re){return pe=+pe,be=be>>>0,Re||Te(this,pe,be,2,32767,-32768),this[be]=pe&255,this[be+1]=pe>>>8,be+2},S.prototype.writeInt16BE=function(pe,be,Re){return pe=+pe,be=be>>>0,Re||Te(this,pe,be,2,32767,-32768),this[be]=pe>>>8,this[be+1]=pe&255,be+2},S.prototype.writeInt32LE=function(pe,be,Re){return pe=+pe,be=be>>>0,Re||Te(this,pe,be,4,2147483647,-2147483648),this[be]=pe&255,this[be+1]=pe>>>8,this[be+2]=pe>>>16,this[be+3]=pe>>>24,be+4},S.prototype.writeInt32BE=function(pe,be,Re){return pe=+pe,be=be>>>0,Re||Te(this,pe,be,4,2147483647,-2147483648),pe<0&&(pe=4294967295+pe+1),this[be]=pe>>>24,this[be+1]=pe>>>16,this[be+2]=pe>>>8,this[be+3]=pe&255,be+4},S.prototype.writeBigInt64LE=qe(function(pe){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Fe(this,pe,be,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),S.prototype.writeBigInt64BE=qe(function(pe){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Ie(this,pe,be,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Me(Ce,pe,be,Re,He,st){if(be+Re>Ce.length)throw new RangeError("Index out of range");if(be<0)throw new RangeError("Index out of range")}function Ae(Ce,pe,be,Re,He){return pe=+pe,be=be>>>0,He||Me(Ce,pe,be,4),C.write(Ce,pe,be,Re,23,4),be+4}S.prototype.writeFloatLE=function(pe,be,Re){return Ae(this,pe,be,!0,Re)},S.prototype.writeFloatBE=function(pe,be,Re){return Ae(this,pe,be,!1,Re)};function De(Ce,pe,be,Re,He){return pe=+pe,be=be>>>0,He||Me(Ce,pe,be,8),C.write(Ce,pe,be,Re,52,8),be+8}S.prototype.writeDoubleLE=function(pe,be,Re){return De(this,pe,be,!0,Re)},S.prototype.writeDoubleBE=function(pe,be,Re){return De(this,pe,be,!1,Re)},S.prototype.copy=function(pe,be,Re,He){if(!S.isBuffer(pe))throw new TypeError("argument should be a Buffer");if(Re||(Re=0),!He&&He!==0&&(He=this.length),be>=pe.length&&(be=pe.length),be||(be=0),He>0&&He=this.length)throw new RangeError("Index out of range");if(He<0)throw new RangeError("sourceEnd out of bounds");He>this.length&&(He=this.length),pe.length-be>>0,Re=Re===void 0?this.length:Re>>>0,pe||(pe=0);var ct;if(typeof pe=="number")for(ct=be;ctMath.pow(2,32)?He=_e(String(be)):typeof be=="bigint"&&(He=String(be),(be>Math.pow(BigInt(2),BigInt(32))||be<-Math.pow(BigInt(2),BigInt(32)))&&(He=_e(He)),He+="n"),Re+=" It must be ".concat(pe,". Received ").concat(He),Re},RangeError);function _e(Ce){for(var pe="",be=Ce.length,Re=Ce[0]==="-"?1:0;be>=Re+4;be-=3)pe="_".concat(Ce.slice(be-3,be)).concat(pe);return"".concat(Ce.slice(0,be)).concat(pe)}function Ye(Ce,pe,be){Ve(pe,"offset"),(Ce[pe]===void 0||Ce[pe+be]===void 0)&&Ze(pe,Ce.length-(be+1))}function Pe(Ce,pe,be,Re,He,st){if(Ce>be||Ce3?pe===0||pe===BigInt(0)?bt=">= 0".concat(ct," and < 2").concat(ct," ** ").concat((st+1)*8).concat(ct):bt=">= -(2".concat(ct," ** ").concat((st+1)*8-1).concat(ct,") and < 2 ** ")+"".concat((st+1)*8-1).concat(ct):bt=">= ".concat(pe).concat(ct," and <= ").concat(be).concat(ct),new ke.ERR_OUT_OF_RANGE("value",bt,Ce)}Ye(Re,He,st)}function Ve(Ce,pe){if(typeof Ce!="number")throw new ke.ERR_INVALID_ARG_TYPE(pe,"number",Ce)}function Ze(Ce,pe,be){throw Math.floor(Ce)!==Ce?(Ve(Ce,be),new ke.ERR_OUT_OF_RANGE(be||"offset","an integer",Ce)):pe<0?new ke.ERR_BUFFER_OUT_OF_BOUNDS:new ke.ERR_OUT_OF_RANGE(be||"offset",">= ".concat(be?1:0," and <= ").concat(pe),Ce)}var Ke=/[^+/0-9A-Za-z-_]/g;function lt(Ce){if(Ce=Ce.split("=")[0],Ce=Ce.trim().replace(Ke,""),Ce.length<2)return"";for(;Ce.length%4!==0;)Ce=Ce+"=";return Ce}function vt(Ce,pe){pe=pe||1/0;for(var be,Re=Ce.length,He=null,st=[],ct=0;ct55295&&be<57344){if(!He){if(be>56319){(pe-=3)>-1&&st.push(239,191,189);continue}else if(ct+1===Re){(pe-=3)>-1&&st.push(239,191,189);continue}He=be;continue}if(be<56320){(pe-=3)>-1&&st.push(239,191,189),He=be;continue}be=(He-55296<<10|be-56320)+65536}else He&&(pe-=3)>-1&&st.push(239,191,189);if(He=null,be<128){if((pe-=1)<0)break;st.push(be)}else if(be<2048){if((pe-=2)<0)break;st.push(be>>6|192,be&63|128)}else if(be<65536){if((pe-=3)<0)break;st.push(be>>12|224,be>>6&63|128,be&63|128)}else if(be<1114112){if((pe-=4)<0)break;st.push(be>>18|240,be>>12&63|128,be>>6&63|128,be&63|128)}else throw new Error("Invalid code point")}return st}function mt(Ce){for(var pe=[],be=0;be>8,He=be%256,st.push(He),st.push(Re);return st}function et(Ce){return x.toByteArray(lt(Ce))}function Ue(Ce,pe,be,Re){var He;for(He=0;He=pe.length||He>=Ce.length);++He)pe[He+be]=Ce[He];return He}function Be(Ce,pe){return Ce instanceof pe||Ce!=null&&Ce.constructor!=null&&Ce.constructor.name!=null&&Ce.constructor.name===pe.name}function rt(Ce){return Ce!==Ce}var ot=function(){for(var Ce="0123456789abcdef",pe=new Array(256),be=0;be<16;++be)for(var Re=be*16,He=0;He<16;++He)pe[Re+He]=Ce[be]+Ce[He];return pe}();function qe(Ce){return typeof BigInt>"u"?Oe:Ce}function Oe(){throw new Error("BigInt not supported")}},2321:function(l){l.exports=u,l.exports.isMobile=u,l.exports.default=u;var d=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function u(a){a||(a={});var o=a.ua;if(!o&&typeof navigator<"u"&&(o=navigator.userAgent),o&&o.headers&&typeof o.headers["user-agent"]=="string"&&(o=o.headers["user-agent"]),typeof o!="string")return!1;var c=d.test(o)&&!r.test(o)||!!a.tablet&&n.test(o);return!c&&a.tablet&&a.featureDetect&&navigator&&navigator.maxTouchPoints>1&&o.indexOf("Macintosh")!==-1&&o.indexOf("Safari")!==-1&&(c=!0),c}},3910:function(l,d){d.byteLength=b,d.toByteArray=A,d.fromByteArray=x;for(var r=[],n=[],u=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,c=a.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var L=C.indexOf("=");L===-1&&(L=D);var w=L===D?0:4-L%4;return[L,w]}function b(C){var D=s(C),L=D[0],w=D[1];return(L+w)*3/4-w}function g(C,D,L){return(D+L)*3/4-L}function A(C){var D,L=s(C),w=L[0],M=L[1],S=new u(g(C,w,M)),f=0,P=M>0?w-4:w,E;for(E=0;E>16&255,S[f++]=D>>8&255,S[f++]=D&255;return M===2&&(D=n[C.charCodeAt(E)]<<2|n[C.charCodeAt(E+1)]>>4,S[f++]=D&255),M===1&&(D=n[C.charCodeAt(E)]<<10|n[C.charCodeAt(E+1)]<<4|n[C.charCodeAt(E+2)]>>2,S[f++]=D>>8&255,S[f++]=D&255),S}function v(C){return r[C>>18&63]+r[C>>12&63]+r[C>>6&63]+r[C&63]}function h(C,D,L){for(var w,M=[],S=D;SP?P:f+S));return w===1?(D=C[L-1],M.push(r[D>>2]+r[D<<4&63]+"==")):w===2&&(D=(C[L-2]<<8)+C[L-1],M.push(r[D>>10]+r[D>>4&63]+r[D<<2&63]+"=")),M.join("")}},3187:function(l,d){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */d.read=function(r,n,u,a,o){var c,s,b=o*8-a-1,g=(1<>1,v=-7,h=u?o-1:0,x=u?-1:1,C=r[n+h];for(h+=x,c=C&(1<<-v)-1,C>>=-v,v+=b;v>0;c=c*256+r[n+h],h+=x,v-=8);for(s=c&(1<<-v)-1,c>>=-v,v+=a;v>0;s=s*256+r[n+h],h+=x,v-=8);if(c===0)c=1-A;else{if(c===g)return s?NaN:(C?-1:1)*(1/0);s=s+Math.pow(2,a),c=c-A}return(C?-1:1)*s*Math.pow(2,c-a)},d.write=function(r,n,u,a,o,c){var s,b,g,A=c*8-o-1,v=(1<>1,x=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=a?0:c-1,D=a?1:-1,L=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(b=isNaN(n)?1:0,s=v):(s=Math.floor(Math.log(n)/Math.LN2),n*(g=Math.pow(2,-s))<1&&(s--,g*=2),s+h>=1?n+=x/g:n+=x*Math.pow(2,1-h),n*g>=2&&(s++,g/=2),s+h>=v?(b=0,s=v):s+h>=1?(b=(n*g-1)*Math.pow(2,o),s=s+h):(b=n*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;r[u+C]=b&255,C+=D,b/=256,o-=8);for(s=s<0;r[u+C]=s&255,C+=D,s/=256,A-=8);r[u+C-D]|=L*128}},1152:function(l,d,r){l.exports=s;var n=r(3440),u=r(7774),a=r(9298);function o(b,g){this._controllerNames=Object.keys(b),this._controllerList=this._controllerNames.map(function(A){return b[A]}),this._mode=g,this._active=b[g],this._active||(this._mode="turntable",this._active=b.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var c=o.prototype;c.flush=function(b){for(var g=this._controllerList,A=0;A"u"?r(5346):WeakMap,u=r(5827),a=r(2944),o=new n;function c(s){var b=o.get(s),g=b&&(b._triangleBuffer.handle||b._triangleBuffer.buffer);if(!g||!s.isBuffer(g)){var A=u(s,new Float32Array([-1,-1,-1,4,4,-1]));b=a(s,[{buffer:A,type:s.FLOAT,size:2}]),b._triangleBuffer=A,o.set(s,b)}b.bind(),s.drawArrays(s.TRIANGLES,0,3),b.unbind()}l.exports=c},8008:function(l,d,r){var n=r(4930);l.exports=u;function u(a,o,c){o=typeof o=="number"?o:1,c=c||": ";var s=a.split(/\r?\n/),b=String(s.length+o-1).length;return s.map(function(g,A){var v=A+o,h=String(v).length,x=n(v,b-h);return x+c+g}).join(` +`)}},2153:function(l,d,r){l.exports=a;var n=r(417);function u(o,c){for(var s=new Array(c+1),b=0;b0?h=h.ushln(v):v<0&&(x=x.ushln(-v)),c(h,x)}},234:function(l,d,r){var n=r(3218);l.exports=u;function u(a){return Array.isArray(a)&&a.length===2&&n(a[0])&&n(a[1])}},4275:function(l,d,r){var n=r(1928);l.exports=u;function u(a){return a.cmp(new n(0))}},9958:function(l,d,r){var n=r(4275);l.exports=u;function u(a){var o=a.length,c=a.words,s=0;if(o===1)s=c[0];else if(o===2)s=c[0]+c[1]*67108864;else for(var b=0;b20?52:s+32}},3218:function(l,d,r){r(1928),l.exports=n;function n(u){return u&&typeof u=="object"&&Boolean(u.words)}},5514:function(l,d,r){var n=r(1928),u=r(8362);l.exports=a;function a(o){var c=u.exponent(o);return c<52?new n(o):new n(o*Math.pow(2,52-c)).ushln(c-52)}},8524:function(l,d,r){var n=r(5514),u=r(4275);l.exports=a;function a(o,c){var s=u(o),b=u(c);if(s===0)return[n(0),n(1)];if(b===0)return[n(0),n(0)];b<0&&(o=o.neg(),c=c.neg());var g=o.gcd(c);return g.cmpn(1)?[o.div(g),c.div(g)]:[o,c]}},2813:function(l,d,r){var n=r(1928);l.exports=u;function u(a){return new n(a)}},3962:function(l,d,r){var n=r(8524);l.exports=u;function u(a,o){return n(a[0].mul(o[0]),a[1].mul(o[1]))}},4951:function(l,d,r){var n=r(4275);l.exports=u;function u(a){return n(a[0])*n(a[1])}},4354:function(l,d,r){var n=r(8524);l.exports=u;function u(a,o){return n(a[0].mul(o[1]).sub(a[1].mul(o[0])),a[1].mul(o[1]))}},7999:function(l,d,r){var n=r(9958),u=r(1112);l.exports=a;function a(o){var c=o[0],s=o[1];if(c.cmpn(0)===0)return 0;var b=c.abs().divmod(s.abs()),g=b.div,A=n(g),v=b.mod,h=c.negative!==s.negative?-1:1;if(v.cmpn(0)===0)return h*A;if(A){var x=u(A)+4,C=n(v.ushln(x).divRound(s));return h*(A+C*Math.pow(2,-x))}else{var D=s.bitLength()-v.bitLength()+53,C=n(v.ushln(D).divRound(s));return D<1023?h*C*Math.pow(2,-D):(C*=Math.pow(2,-1023),h*C*Math.pow(2,1023-D))}}},5070:function(l){function d(c,s,b,g,A){for(var v=A+1;g<=A;){var h=g+A>>>1,x=c[h],C=b!==void 0?b(x,s):x-s;C>=0?(v=h,A=h-1):g=h+1}return v}function r(c,s,b,g,A){for(var v=A+1;g<=A;){var h=g+A>>>1,x=c[h],C=b!==void 0?b(x,s):x-s;C>0?(v=h,A=h-1):g=h+1}return v}function n(c,s,b,g,A){for(var v=g-1;g<=A;){var h=g+A>>>1,x=c[h],C=b!==void 0?b(x,s):x-s;C<0?(v=h,g=h+1):A=h-1}return v}function u(c,s,b,g,A){for(var v=g-1;g<=A;){var h=g+A>>>1,x=c[h],C=b!==void 0?b(x,s):x-s;C<=0?(v=h,g=h+1):A=h-1}return v}function a(c,s,b,g,A){for(;g<=A;){var v=g+A>>>1,h=c[v],x=b!==void 0?b(h,s):h-s;if(x===0)return v;x<=0?g=v+1:A=v-1}return-1}function o(c,s,b,g,A,v){return typeof b=="function"?v(c,s,b,g===void 0?0:g|0,A===void 0?c.length-1:A|0):v(c,s,void 0,b===void 0?0:b|0,g===void 0?c.length-1:g|0)}l.exports={ge:function(c,s,b,g,A){return o(c,s,b,g,A,d)},gt:function(c,s,b,g,A){return o(c,s,b,g,A,r)},lt:function(c,s,b,g,A){return o(c,s,b,g,A,n)},le:function(c,s,b,g,A){return o(c,s,b,g,A,u)},eq:function(c,s,b,g,A){return o(c,s,b,g,A,a)}}},2288:function(l,d){var r=32;d.INT_BITS=r,d.INT_MAX=2147483647,d.INT_MIN=-1<0)-(a<0)},d.abs=function(a){var o=a>>r-1;return(a^o)-o},d.min=function(a,o){return o^(a^o)&-(a65535)<<4,a>>>=o,c=(a>255)<<3,a>>>=c,o|=c,c=(a>15)<<2,a>>>=c,o|=c,c=(a>3)<<1,a>>>=c,o|=c,o|a>>1},d.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0},d.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function n(a){var o=32;return a&=-a,a&&o--,a&65535&&(o-=16),a&16711935&&(o-=8),a&252645135&&(o-=4),a&858993459&&(o-=2),a&1431655765&&(o-=1),o}d.countTrailingZeros=n,d.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},d.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},d.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var u=new Array(256);(function(a){for(var o=0;o<256;++o){var c=o,s=o,b=7;for(c>>>=1;c;c>>>=1)s<<=1,s|=c&1,--b;a[o]=s<>>8&255]<<16|u[a>>>16&255]<<8|u[a>>>24&255]},d.interleave2=function(a,o){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,a|o<<1},d.deinterleave2=function(a,o){return a=a>>>o&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},d.interleave3=function(a,o,c){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,a|=o<<1,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,a|c<<2},d.deinterleave3=function(a,o){return a=a>>>o&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},d.nextCombination=function(a){var o=a|a-1;return o+1|(~o&-~o)-1>>>n(a)+1}},1928:function(l,d,r){l=r.nmd(l),function(n,u){function a(H,B){if(!H)throw new Error(B||"Assertion failed")}function o(H,B){H.super_=B;var W=function(){};W.prototype=B.prototype,H.prototype=new W,H.prototype.constructor=H}function c(H,B,W){if(c.isBN(H))return H;this.negative=0,this.words=null,this.length=0,this.red=null,H!==null&&((B==="le"||B==="be")&&(W=B,B=10),this._init(H||0,B||10,W||"be"))}typeof n=="object"?n.exports=c:u.BN=c,c.BN=c,c.wordSize=26;var s;try{typeof window<"u"&&typeof window.Buffer<"u"?s=window.Buffer:s=r(6601).Buffer}catch{}c.isBN=function(B){return B instanceof c?!0:B!==null&&typeof B=="object"&&B.constructor.wordSize===c.wordSize&&Array.isArray(B.words)},c.max=function(B,W){return B.cmp(W)>0?B:W},c.min=function(B,W){return B.cmp(W)<0?B:W},c.prototype._init=function(B,W,q){if(typeof B=="number")return this._initNumber(B,W,q);if(typeof B=="object")return this._initArray(B,W,q);W==="hex"&&(W=16),a(W===(W|0)&&W>=2&&W<=36),B=B.toString().replace(/\s+/g,"");var re=0;B[0]==="-"&&(re++,this.negative=1),re=0;re-=3)le=B[re]|B[re-1]<<8|B[re-2]<<16,this.words[ie]|=le<>>26-he&67108863,he+=24,he>=26&&(he-=26,ie++);else if(q==="le")for(re=0,ie=0;re>>26-he&67108863,he+=24,he>=26&&(he-=26,ie++);return this.strip()};function b(H,B){var W=H.charCodeAt(B);return W>=65&&W<=70?W-55:W>=97&&W<=102?W-87:W-48&15}function g(H,B,W){var q=b(H,W);return W-1>=B&&(q|=b(H,W-1)<<4),q}c.prototype._parseHex=function(B,W,q){this.length=Math.ceil((B.length-W)/6),this.words=new Array(this.length);for(var re=0;re=W;re-=2)he=g(B,W,re)<=18?(ie-=18,le+=1,this.words[le]|=he>>>26):ie+=8;else{var $=B.length-W;for(re=$%2===0?W+1:W;re=18?(ie-=18,le+=1,this.words[le]|=he>>>26):ie+=8}this.strip()};function A(H,B,W,q){for(var re=0,ie=Math.min(H.length,W),le=B;le=49?re+=he-49+10:he>=17?re+=he-17+10:re+=he}return re}c.prototype._parseBase=function(B,W,q){this.words=[0],this.length=1;for(var re=0,ie=1;ie<=67108863;ie*=W)re++;re--,ie=ie/W|0;for(var le=B.length-q,he=le%re,$=Math.min(le,le-he)+q,Z=0,K=q;K<$;K+=re)Z=A(B,K,K+re,W),this.imuln(ie),this.words[0]+Z<67108864?this.words[0]+=Z:this._iaddn(Z);if(he!==0){var Q=1;for(Z=A(B,K,B.length,W),K=0;K1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},c.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},c.prototype.inspect=function(){return(this.red?""};var v=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],x=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];c.prototype.toString=function(B,W){B=B||10,W=W|0||1;var q;if(B===16||B==="hex"){q="";for(var re=0,ie=0,le=0;le>>24-re&16777215,ie!==0||le!==this.length-1?q=v[6-$.length]+$+q:q=$+q,re+=2,re>=26&&(re-=26,le--)}for(ie!==0&&(q=ie.toString(16)+q);q.length%W!==0;)q="0"+q;return this.negative!==0&&(q="-"+q),q}if(B===(B|0)&&B>=2&&B<=36){var Z=h[B],K=x[B];q="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var ae=Q.modn(K).toString(B);Q=Q.idivn(K),Q.isZero()?q=ae+q:q=v[Z-ae.length]+ae+q}for(this.isZero()&&(q="0"+q);q.length%W!==0;)q="0"+q;return this.negative!==0&&(q="-"+q),q}a(!1,"Base should be between 2 and 36")},c.prototype.toNumber=function(){var B=this.words[0];return this.length===2?B+=this.words[1]*67108864:this.length===3&&this.words[2]===1?B+=4503599627370496+this.words[1]*67108864:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-B:B},c.prototype.toJSON=function(){return this.toString(16)},c.prototype.toBuffer=function(B,W){return a(typeof s<"u"),this.toArrayLike(s,B,W)},c.prototype.toArray=function(B,W){return this.toArrayLike(Array,B,W)},c.prototype.toArrayLike=function(B,W,q){var re=this.byteLength(),ie=q||Math.max(1,re);a(re<=ie,"byte array longer than desired length"),a(ie>0,"Requested array length <= 0"),this.strip();var le=W==="le",he=new B(ie),$,Z,K=this.clone();if(le){for(Z=0;!K.isZero();Z++)$=K.andln(255),K.iushrn(8),he[Z]=$;for(;Z=4096&&(q+=13,W>>>=13),W>=64&&(q+=7,W>>>=7),W>=8&&(q+=4,W>>>=4),W>=2&&(q+=2,W>>>=2),q+W},c.prototype._zeroBits=function(B){if(B===0)return 26;var W=B,q=0;return(W&8191)===0&&(q+=13,W>>>=13),(W&127)===0&&(q+=7,W>>>=7),(W&15)===0&&(q+=4,W>>>=4),(W&3)===0&&(q+=2,W>>>=2),(W&1)===0&&q++,q},c.prototype.bitLength=function(){var B=this.words[this.length-1],W=this._countBits(B);return(this.length-1)*26+W};function C(H){for(var B=new Array(H.bitLength()),W=0;W>>re}return B}c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var B=0,W=0;WB.length?this.clone().ior(B):B.clone().ior(this)},c.prototype.uor=function(B){return this.length>B.length?this.clone().iuor(B):B.clone().iuor(this)},c.prototype.iuand=function(B){var W;this.length>B.length?W=B:W=this;for(var q=0;qB.length?this.clone().iand(B):B.clone().iand(this)},c.prototype.uand=function(B){return this.length>B.length?this.clone().iuand(B):B.clone().iuand(this)},c.prototype.iuxor=function(B){var W,q;this.length>B.length?(W=this,q=B):(W=B,q=this);for(var re=0;reB.length?this.clone().ixor(B):B.clone().ixor(this)},c.prototype.uxor=function(B){return this.length>B.length?this.clone().iuxor(B):B.clone().iuxor(this)},c.prototype.inotn=function(B){a(typeof B=="number"&&B>=0);var W=Math.ceil(B/26)|0,q=B%26;this._expand(W),q>0&&W--;for(var re=0;re0&&(this.words[re]=~this.words[re]&67108863>>26-q),this.strip()},c.prototype.notn=function(B){return this.clone().inotn(B)},c.prototype.setn=function(B,W){a(typeof B=="number"&&B>=0);var q=B/26|0,re=B%26;return this._expand(q+1),W?this.words[q]=this.words[q]|1<B.length?(q=this,re=B):(q=B,re=this);for(var ie=0,le=0;le>>26;for(;ie!==0&&le>>26;if(this.length=q.length,ie!==0)this.words[this.length]=ie,this.length++;else if(q!==this)for(;leB.length?this.clone().iadd(B):B.clone().iadd(this)},c.prototype.isub=function(B){if(B.negative!==0){B.negative=0;var W=this.iadd(B);return B.negative=1,W._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(B),this.negative=1,this._normSign();var q=this.cmp(B);if(q===0)return this.negative=0,this.length=1,this.words[0]=0,this;var re,ie;q>0?(re=this,ie=B):(re=B,ie=this);for(var le=0,he=0;he>26,this.words[he]=W&67108863;for(;le!==0&&he>26,this.words[he]=W&67108863;if(le===0&&he>>26,Q=$&67108863,ae=Math.min(Z,B.length-1),fe=Math.max(0,Z-H.length+1);fe<=ae;fe++){var te=Z-fe|0;re=H.words[te]|0,ie=B.words[fe]|0,le=re*ie+Q,K+=le/67108864|0,Q=le&67108863}W.words[Z]=Q|0,$=K|0}return $!==0?W.words[Z]=$|0:W.length--,W.strip()}var L=function(B,W,q){var re=B.words,ie=W.words,le=q.words,he=0,$,Z,K,Q=re[0]|0,ae=Q&8191,fe=Q>>>13,te=re[1]|0,ne=te&8191,ce=te>>>13,oe=re[2]|0,de=oe&8191,we=oe>>>13,Se=re[3]|0,Te=Se&8191,Fe=Se>>>13,Ie=re[4]|0,Me=Ie&8191,Ae=Ie>>>13,De=re[5]|0,ke=De&8191,We=De>>>13,_e=re[6]|0,Ye=_e&8191,Pe=_e>>>13,Ve=re[7]|0,Ze=Ve&8191,Ke=Ve>>>13,lt=re[8]|0,vt=lt&8191,mt=lt>>>13,Et=re[9]|0,et=Et&8191,Ue=Et>>>13,Be=ie[0]|0,rt=Be&8191,ot=Be>>>13,qe=ie[1]|0,Oe=qe&8191,Ce=qe>>>13,pe=ie[2]|0,be=pe&8191,Re=pe>>>13,He=ie[3]|0,st=He&8191,ct=He>>>13,bt=ie[4]|0,Lt=bt&8191,Ut=bt>>>13,Gt=ie[5]|0,Ft=Gt&8191,tr=Gt>>>13,lr=ie[6]|0,Or=lr&8191,xt=lr>>>13,jt=ie[7]|0,Yt=jt&8191,br=jt>>>13,dr=ie[8]|0,ht=dr&8191,ut=dr>>>13,wt=ie[9]|0,St=wt&8191,Dt=wt>>>13;q.negative=B.negative^W.negative,q.length=19,$=Math.imul(ae,rt),Z=Math.imul(ae,ot),Z=Z+Math.imul(fe,rt)|0,K=Math.imul(fe,ot);var Mt=(he+$|0)+((Z&8191)<<13)|0;he=(K+(Z>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,$=Math.imul(ne,rt),Z=Math.imul(ne,ot),Z=Z+Math.imul(ce,rt)|0,K=Math.imul(ce,ot),$=$+Math.imul(ae,Oe)|0,Z=Z+Math.imul(ae,Ce)|0,Z=Z+Math.imul(fe,Oe)|0,K=K+Math.imul(fe,Ce)|0;var zt=(he+$|0)+((Z&8191)<<13)|0;he=(K+(Z>>>13)|0)+(zt>>>26)|0,zt&=67108863,$=Math.imul(de,rt),Z=Math.imul(de,ot),Z=Z+Math.imul(we,rt)|0,K=Math.imul(we,ot),$=$+Math.imul(ne,Oe)|0,Z=Z+Math.imul(ne,Ce)|0,Z=Z+Math.imul(ce,Oe)|0,K=K+Math.imul(ce,Ce)|0,$=$+Math.imul(ae,be)|0,Z=Z+Math.imul(ae,Re)|0,Z=Z+Math.imul(fe,be)|0,K=K+Math.imul(fe,Re)|0;var Vt=(he+$|0)+((Z&8191)<<13)|0;he=(K+(Z>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,$=Math.imul(Te,rt),Z=Math.imul(Te,ot),Z=Z+Math.imul(Fe,rt)|0,K=Math.imul(Fe,ot),$=$+Math.imul(de,Oe)|0,Z=Z+Math.imul(de,Ce)|0,Z=Z+Math.imul(we,Oe)|0,K=K+Math.imul(we,Ce)|0,$=$+Math.imul(ne,be)|0,Z=Z+Math.imul(ne,Re)|0,Z=Z+Math.imul(ce,be)|0,K=K+Math.imul(ce,Re)|0,$=$+Math.imul(ae,st)|0,Z=Z+Math.imul(ae,ct)|0,Z=Z+Math.imul(fe,st)|0,K=K+Math.imul(fe,ct)|0;var Kt=(he+$|0)+((Z&8191)<<13)|0;he=(K+(Z>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,$=Math.imul(Me,rt),Z=Math.imul(Me,ot),Z=Z+Math.imul(Ae,rt)|0,K=Math.imul(Ae,ot),$=$+Math.imul(Te,Oe)|0,Z=Z+Math.imul(Te,Ce)|0,Z=Z+Math.imul(Fe,Oe)|0,K=K+Math.imul(Fe,Ce)|0,$=$+Math.imul(de,be)|0,Z=Z+Math.imul(de,Re)|0,Z=Z+Math.imul(we,be)|0,K=K+Math.imul(we,Re)|0,$=$+Math.imul(ne,st)|0,Z=Z+Math.imul(ne,ct)|0,Z=Z+Math.imul(ce,st)|0,K=K+Math.imul(ce,ct)|0,$=$+Math.imul(ae,Lt)|0,Z=Z+Math.imul(ae,Ut)|0,Z=Z+Math.imul(fe,Lt)|0,K=K+Math.imul(fe,Ut)|0;var $t=(he+$|0)+((Z&8191)<<13)|0;he=(K+(Z>>>13)|0)+($t>>>26)|0,$t&=67108863,$=Math.imul(ke,rt),Z=Math.imul(ke,ot),Z=Z+Math.imul(We,rt)|0,K=Math.imul(We,ot),$=$+Math.imul(Me,Oe)|0,Z=Z+Math.imul(Me,Ce)|0,Z=Z+Math.imul(Ae,Oe)|0,K=K+Math.imul(Ae,Ce)|0,$=$+Math.imul(Te,be)|0,Z=Z+Math.imul(Te,Re)|0,Z=Z+Math.imul(Fe,be)|0,K=K+Math.imul(Fe,Re)|0,$=$+Math.imul(de,st)|0,Z=Z+Math.imul(de,ct)|0,Z=Z+Math.imul(we,st)|0,K=K+Math.imul(we,ct)|0,$=$+Math.imul(ne,Lt)|0,Z=Z+Math.imul(ne,Ut)|0,Z=Z+Math.imul(ce,Lt)|0,K=K+Math.imul(ce,Ut)|0,$=$+Math.imul(ae,Ft)|0,Z=Z+Math.imul(ae,tr)|0,Z=Z+Math.imul(fe,Ft)|0,K=K+Math.imul(fe,tr)|0;var ir=(he+$|0)+((Z&8191)<<13)|0;he=(K+(Z>>>13)|0)+(ir>>>26)|0,ir&=67108863,$=Math.imul(Ye,rt),Z=Math.imul(Ye,ot),Z=Z+Math.imul(Pe,rt)|0,K=Math.imul(Pe,ot),$=$+Math.imul(ke,Oe)|0,Z=Z+Math.imul(ke,Ce)|0,Z=Z+Math.imul(We,Oe)|0,K=K+Math.imul(We,Ce)|0,$=$+Math.imul(Me,be)|0,Z=Z+Math.imul(Me,Re)|0,Z=Z+Math.imul(Ae,be)|0,K=K+Math.imul(Ae,Re)|0,$=$+Math.imul(Te,st)|0,Z=Z+Math.imul(Te,ct)|0,Z=Z+Math.imul(Fe,st)|0,K=K+Math.imul(Fe,ct)|0,$=$+Math.imul(de,Lt)|0,Z=Z+Math.imul(de,Ut)|0,Z=Z+Math.imul(we,Lt)|0,K=K+Math.imul(we,Ut)|0,$=$+Math.imul(ne,Ft)|0,Z=Z+Math.imul(ne,tr)|0,Z=Z+Math.imul(ce,Ft)|0,K=K+Math.imul(ce,tr)|0,$=$+Math.imul(ae,Or)|0,Z=Z+Math.imul(ae,xt)|0,Z=Z+Math.imul(fe,Or)|0,K=K+Math.imul(fe,xt)|0;var Mr=(he+$|0)+((Z&8191)<<13)|0;he=(K+(Z>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,$=Math.imul(Ze,rt),Z=Math.imul(Ze,ot),Z=Z+Math.imul(Ke,rt)|0,K=Math.imul(Ke,ot),$=$+Math.imul(Ye,Oe)|0,Z=Z+Math.imul(Ye,Ce)|0,Z=Z+Math.imul(Pe,Oe)|0,K=K+Math.imul(Pe,Ce)|0,$=$+Math.imul(ke,be)|0,Z=Z+Math.imul(ke,Re)|0,Z=Z+Math.imul(We,be)|0,K=K+Math.imul(We,Re)|0,$=$+Math.imul(Me,st)|0,Z=Z+Math.imul(Me,ct)|0,Z=Z+Math.imul(Ae,st)|0,K=K+Math.imul(Ae,ct)|0,$=$+Math.imul(Te,Lt)|0,Z=Z+Math.imul(Te,Ut)|0,Z=Z+Math.imul(Fe,Lt)|0,K=K+Math.imul(Fe,Ut)|0,$=$+Math.imul(de,Ft)|0,Z=Z+Math.imul(de,tr)|0,Z=Z+Math.imul(we,Ft)|0,K=K+Math.imul(we,tr)|0,$=$+Math.imul(ne,Or)|0,Z=Z+Math.imul(ne,xt)|0,Z=Z+Math.imul(ce,Or)|0,K=K+Math.imul(ce,xt)|0,$=$+Math.imul(ae,Yt)|0,Z=Z+Math.imul(ae,br)|0,Z=Z+Math.imul(fe,Yt)|0,K=K+Math.imul(fe,br)|0;var Xe=(he+$|0)+((Z&8191)<<13)|0;he=(K+(Z>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,$=Math.imul(vt,rt),Z=Math.imul(vt,ot),Z=Z+Math.imul(mt,rt)|0,K=Math.imul(mt,ot),$=$+Math.imul(Ze,Oe)|0,Z=Z+Math.imul(Ze,Ce)|0,Z=Z+Math.imul(Ke,Oe)|0,K=K+Math.imul(Ke,Ce)|0,$=$+Math.imul(Ye,be)|0,Z=Z+Math.imul(Ye,Re)|0,Z=Z+Math.imul(Pe,be)|0,K=K+Math.imul(Pe,Re)|0,$=$+Math.imul(ke,st)|0,Z=Z+Math.imul(ke,ct)|0,Z=Z+Math.imul(We,st)|0,K=K+Math.imul(We,ct)|0,$=$+Math.imul(Me,Lt)|0,Z=Z+Math.imul(Me,Ut)|0,Z=Z+Math.imul(Ae,Lt)|0,K=K+Math.imul(Ae,Ut)|0,$=$+Math.imul(Te,Ft)|0,Z=Z+Math.imul(Te,tr)|0,Z=Z+Math.imul(Fe,Ft)|0,K=K+Math.imul(Fe,tr)|0,$=$+Math.imul(de,Or)|0,Z=Z+Math.imul(de,xt)|0,Z=Z+Math.imul(we,Or)|0,K=K+Math.imul(we,xt)|0,$=$+Math.imul(ne,Yt)|0,Z=Z+Math.imul(ne,br)|0,Z=Z+Math.imul(ce,Yt)|0,K=K+Math.imul(ce,br)|0,$=$+Math.imul(ae,ht)|0,Z=Z+Math.imul(ae,ut)|0,Z=Z+Math.imul(fe,ht)|0,K=K+Math.imul(fe,ut)|0;var je=(he+$|0)+((Z&8191)<<13)|0;he=(K+(Z>>>13)|0)+(je>>>26)|0,je&=67108863,$=Math.imul(et,rt),Z=Math.imul(et,ot),Z=Z+Math.imul(Ue,rt)|0,K=Math.imul(Ue,ot),$=$+Math.imul(vt,Oe)|0,Z=Z+Math.imul(vt,Ce)|0,Z=Z+Math.imul(mt,Oe)|0,K=K+Math.imul(mt,Ce)|0,$=$+Math.imul(Ze,be)|0,Z=Z+Math.imul(Ze,Re)|0,Z=Z+Math.imul(Ke,be)|0,K=K+Math.imul(Ke,Re)|0,$=$+Math.imul(Ye,st)|0,Z=Z+Math.imul(Ye,ct)|0,Z=Z+Math.imul(Pe,st)|0,K=K+Math.imul(Pe,ct)|0,$=$+Math.imul(ke,Lt)|0,Z=Z+Math.imul(ke,Ut)|0,Z=Z+Math.imul(We,Lt)|0,K=K+Math.imul(We,Ut)|0,$=$+Math.imul(Me,Ft)|0,Z=Z+Math.imul(Me,tr)|0,Z=Z+Math.imul(Ae,Ft)|0,K=K+Math.imul(Ae,tr)|0,$=$+Math.imul(Te,Or)|0,Z=Z+Math.imul(Te,xt)|0,Z=Z+Math.imul(Fe,Or)|0,K=K+Math.imul(Fe,xt)|0,$=$+Math.imul(de,Yt)|0,Z=Z+Math.imul(de,br)|0,Z=Z+Math.imul(we,Yt)|0,K=K+Math.imul(we,br)|0,$=$+Math.imul(ne,ht)|0,Z=Z+Math.imul(ne,ut)|0,Z=Z+Math.imul(ce,ht)|0,K=K+Math.imul(ce,ut)|0,$=$+Math.imul(ae,St)|0,Z=Z+Math.imul(ae,Dt)|0,Z=Z+Math.imul(fe,St)|0,K=K+Math.imul(fe,Dt)|0;var It=(he+$|0)+((Z&8191)<<13)|0;he=(K+(Z>>>13)|0)+(It>>>26)|0,It&=67108863,$=Math.imul(et,Oe),Z=Math.imul(et,Ce),Z=Z+Math.imul(Ue,Oe)|0,K=Math.imul(Ue,Ce),$=$+Math.imul(vt,be)|0,Z=Z+Math.imul(vt,Re)|0,Z=Z+Math.imul(mt,be)|0,K=K+Math.imul(mt,Re)|0,$=$+Math.imul(Ze,st)|0,Z=Z+Math.imul(Ze,ct)|0,Z=Z+Math.imul(Ke,st)|0,K=K+Math.imul(Ke,ct)|0,$=$+Math.imul(Ye,Lt)|0,Z=Z+Math.imul(Ye,Ut)|0,Z=Z+Math.imul(Pe,Lt)|0,K=K+Math.imul(Pe,Ut)|0,$=$+Math.imul(ke,Ft)|0,Z=Z+Math.imul(ke,tr)|0,Z=Z+Math.imul(We,Ft)|0,K=K+Math.imul(We,tr)|0,$=$+Math.imul(Me,Or)|0,Z=Z+Math.imul(Me,xt)|0,Z=Z+Math.imul(Ae,Or)|0,K=K+Math.imul(Ae,xt)|0,$=$+Math.imul(Te,Yt)|0,Z=Z+Math.imul(Te,br)|0,Z=Z+Math.imul(Fe,Yt)|0,K=K+Math.imul(Fe,br)|0,$=$+Math.imul(de,ht)|0,Z=Z+Math.imul(de,ut)|0,Z=Z+Math.imul(we,ht)|0,K=K+Math.imul(we,ut)|0,$=$+Math.imul(ne,St)|0,Z=Z+Math.imul(ne,Dt)|0,Z=Z+Math.imul(ce,St)|0,K=K+Math.imul(ce,Dt)|0;var _t=(he+$|0)+((Z&8191)<<13)|0;he=(K+(Z>>>13)|0)+(_t>>>26)|0,_t&=67108863,$=Math.imul(et,be),Z=Math.imul(et,Re),Z=Z+Math.imul(Ue,be)|0,K=Math.imul(Ue,Re),$=$+Math.imul(vt,st)|0,Z=Z+Math.imul(vt,ct)|0,Z=Z+Math.imul(mt,st)|0,K=K+Math.imul(mt,ct)|0,$=$+Math.imul(Ze,Lt)|0,Z=Z+Math.imul(Ze,Ut)|0,Z=Z+Math.imul(Ke,Lt)|0,K=K+Math.imul(Ke,Ut)|0,$=$+Math.imul(Ye,Ft)|0,Z=Z+Math.imul(Ye,tr)|0,Z=Z+Math.imul(Pe,Ft)|0,K=K+Math.imul(Pe,tr)|0,$=$+Math.imul(ke,Or)|0,Z=Z+Math.imul(ke,xt)|0,Z=Z+Math.imul(We,Or)|0,K=K+Math.imul(We,xt)|0,$=$+Math.imul(Me,Yt)|0,Z=Z+Math.imul(Me,br)|0,Z=Z+Math.imul(Ae,Yt)|0,K=K+Math.imul(Ae,br)|0,$=$+Math.imul(Te,ht)|0,Z=Z+Math.imul(Te,ut)|0,Z=Z+Math.imul(Fe,ht)|0,K=K+Math.imul(Fe,ut)|0,$=$+Math.imul(de,St)|0,Z=Z+Math.imul(de,Dt)|0,Z=Z+Math.imul(we,St)|0,K=K+Math.imul(we,Dt)|0;var Zt=(he+$|0)+((Z&8191)<<13)|0;he=(K+(Z>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,$=Math.imul(et,st),Z=Math.imul(et,ct),Z=Z+Math.imul(Ue,st)|0,K=Math.imul(Ue,ct),$=$+Math.imul(vt,Lt)|0,Z=Z+Math.imul(vt,Ut)|0,Z=Z+Math.imul(mt,Lt)|0,K=K+Math.imul(mt,Ut)|0,$=$+Math.imul(Ze,Ft)|0,Z=Z+Math.imul(Ze,tr)|0,Z=Z+Math.imul(Ke,Ft)|0,K=K+Math.imul(Ke,tr)|0,$=$+Math.imul(Ye,Or)|0,Z=Z+Math.imul(Ye,xt)|0,Z=Z+Math.imul(Pe,Or)|0,K=K+Math.imul(Pe,xt)|0,$=$+Math.imul(ke,Yt)|0,Z=Z+Math.imul(ke,br)|0,Z=Z+Math.imul(We,Yt)|0,K=K+Math.imul(We,br)|0,$=$+Math.imul(Me,ht)|0,Z=Z+Math.imul(Me,ut)|0,Z=Z+Math.imul(Ae,ht)|0,K=K+Math.imul(Ae,ut)|0,$=$+Math.imul(Te,St)|0,Z=Z+Math.imul(Te,Dt)|0,Z=Z+Math.imul(Fe,St)|0,K=K+Math.imul(Fe,Dt)|0;var rr=(he+$|0)+((Z&8191)<<13)|0;he=(K+(Z>>>13)|0)+(rr>>>26)|0,rr&=67108863,$=Math.imul(et,Lt),Z=Math.imul(et,Ut),Z=Z+Math.imul(Ue,Lt)|0,K=Math.imul(Ue,Ut),$=$+Math.imul(vt,Ft)|0,Z=Z+Math.imul(vt,tr)|0,Z=Z+Math.imul(mt,Ft)|0,K=K+Math.imul(mt,tr)|0,$=$+Math.imul(Ze,Or)|0,Z=Z+Math.imul(Ze,xt)|0,Z=Z+Math.imul(Ke,Or)|0,K=K+Math.imul(Ke,xt)|0,$=$+Math.imul(Ye,Yt)|0,Z=Z+Math.imul(Ye,br)|0,Z=Z+Math.imul(Pe,Yt)|0,K=K+Math.imul(Pe,br)|0,$=$+Math.imul(ke,ht)|0,Z=Z+Math.imul(ke,ut)|0,Z=Z+Math.imul(We,ht)|0,K=K+Math.imul(We,ut)|0,$=$+Math.imul(Me,St)|0,Z=Z+Math.imul(Me,Dt)|0,Z=Z+Math.imul(Ae,St)|0,K=K+Math.imul(Ae,Dt)|0;var sr=(he+$|0)+((Z&8191)<<13)|0;he=(K+(Z>>>13)|0)+(sr>>>26)|0,sr&=67108863,$=Math.imul(et,Ft),Z=Math.imul(et,tr),Z=Z+Math.imul(Ue,Ft)|0,K=Math.imul(Ue,tr),$=$+Math.imul(vt,Or)|0,Z=Z+Math.imul(vt,xt)|0,Z=Z+Math.imul(mt,Or)|0,K=K+Math.imul(mt,xt)|0,$=$+Math.imul(Ze,Yt)|0,Z=Z+Math.imul(Ze,br)|0,Z=Z+Math.imul(Ke,Yt)|0,K=K+Math.imul(Ke,br)|0,$=$+Math.imul(Ye,ht)|0,Z=Z+Math.imul(Ye,ut)|0,Z=Z+Math.imul(Pe,ht)|0,K=K+Math.imul(Pe,ut)|0,$=$+Math.imul(ke,St)|0,Z=Z+Math.imul(ke,Dt)|0,Z=Z+Math.imul(We,St)|0,K=K+Math.imul(We,Dt)|0;var nr=(he+$|0)+((Z&8191)<<13)|0;he=(K+(Z>>>13)|0)+(nr>>>26)|0,nr&=67108863,$=Math.imul(et,Or),Z=Math.imul(et,xt),Z=Z+Math.imul(Ue,Or)|0,K=Math.imul(Ue,xt),$=$+Math.imul(vt,Yt)|0,Z=Z+Math.imul(vt,br)|0,Z=Z+Math.imul(mt,Yt)|0,K=K+Math.imul(mt,br)|0,$=$+Math.imul(Ze,ht)|0,Z=Z+Math.imul(Ze,ut)|0,Z=Z+Math.imul(Ke,ht)|0,K=K+Math.imul(Ke,ut)|0,$=$+Math.imul(Ye,St)|0,Z=Z+Math.imul(Ye,Dt)|0,Z=Z+Math.imul(Pe,St)|0,K=K+Math.imul(Pe,Dt)|0;var Bt=(he+$|0)+((Z&8191)<<13)|0;he=(K+(Z>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,$=Math.imul(et,Yt),Z=Math.imul(et,br),Z=Z+Math.imul(Ue,Yt)|0,K=Math.imul(Ue,br),$=$+Math.imul(vt,ht)|0,Z=Z+Math.imul(vt,ut)|0,Z=Z+Math.imul(mt,ht)|0,K=K+Math.imul(mt,ut)|0,$=$+Math.imul(Ze,St)|0,Z=Z+Math.imul(Ze,Dt)|0,Z=Z+Math.imul(Ke,St)|0,K=K+Math.imul(Ke,Dt)|0;var hr=(he+$|0)+((Z&8191)<<13)|0;he=(K+(Z>>>13)|0)+(hr>>>26)|0,hr&=67108863,$=Math.imul(et,ht),Z=Math.imul(et,ut),Z=Z+Math.imul(Ue,ht)|0,K=Math.imul(Ue,ut),$=$+Math.imul(vt,St)|0,Z=Z+Math.imul(vt,Dt)|0,Z=Z+Math.imul(mt,St)|0,K=K+Math.imul(mt,Dt)|0;var pr=(he+$|0)+((Z&8191)<<13)|0;he=(K+(Z>>>13)|0)+(pr>>>26)|0,pr&=67108863,$=Math.imul(et,St),Z=Math.imul(et,Dt),Z=Z+Math.imul(Ue,St)|0,K=Math.imul(Ue,Dt);var wr=(he+$|0)+((Z&8191)<<13)|0;return he=(K+(Z>>>13)|0)+(wr>>>26)|0,wr&=67108863,le[0]=Mt,le[1]=zt,le[2]=Vt,le[3]=Kt,le[4]=$t,le[5]=ir,le[6]=Mr,le[7]=Xe,le[8]=je,le[9]=It,le[10]=_t,le[11]=Zt,le[12]=rr,le[13]=sr,le[14]=nr,le[15]=Bt,le[16]=hr,le[17]=pr,le[18]=wr,he!==0&&(le[19]=he,q.length++),q};Math.imul||(L=D);function w(H,B,W){W.negative=B.negative^H.negative,W.length=H.length+B.length;for(var q=0,re=0,ie=0;ie>>26)|0,re+=le>>>26,le&=67108863}W.words[ie]=he,q=le,le=re}return q!==0?W.words[ie]=q:W.length--,W.strip()}function M(H,B,W){var q=new S;return q.mulp(H,B,W)}c.prototype.mulTo=function(B,W){var q,re=this.length+B.length;return this.length===10&&B.length===10?q=L(this,B,W):re<63?q=D(this,B,W):re<1024?q=w(this,B,W):q=M(this,B,W),q};function S(H,B){this.x=H,this.y=B}S.prototype.makeRBT=function(B){for(var W=new Array(B),q=c.prototype._countBits(B)-1,re=0;re>=1;return re},S.prototype.permute=function(B,W,q,re,ie,le){for(var he=0;he>>1)ie++;return 1<>>13,q[2*le+1]=ie&8191,ie=ie>>>13;for(le=2*W;le>=26,W+=re/67108864|0,W+=ie>>>26,this.words[q]=ie&67108863}return W!==0&&(this.words[q]=W,this.length++),this},c.prototype.muln=function(B){return this.clone().imuln(B)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(B){var W=C(B);if(W.length===0)return new c(1);for(var q=this,re=0;re=0);var W=B%26,q=(B-W)/26,re=67108863>>>26-W<<26-W,ie;if(W!==0){var le=0;for(ie=0;ie>>26-W}le&&(this.words[ie]=le,this.length++)}if(q!==0){for(ie=this.length-1;ie>=0;ie--)this.words[ie+q]=this.words[ie];for(ie=0;ie=0);var re;W?re=(W-W%26)/26:re=0;var ie=B%26,le=Math.min((B-ie)/26,this.length),he=67108863^67108863>>>ie<le)for(this.length-=le,Z=0;Z=0&&(K!==0||Z>=re);Z--){var Q=this.words[Z]|0;this.words[Z]=K<<26-ie|Q>>>ie,K=Q&he}return $&&K!==0&&($.words[$.length++]=K),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(B,W,q){return a(this.negative===0),this.iushrn(B,W,q)},c.prototype.shln=function(B){return this.clone().ishln(B)},c.prototype.ushln=function(B){return this.clone().iushln(B)},c.prototype.shrn=function(B){return this.clone().ishrn(B)},c.prototype.ushrn=function(B){return this.clone().iushrn(B)},c.prototype.testn=function(B){a(typeof B=="number"&&B>=0);var W=B%26,q=(B-W)/26,re=1<=0);var W=B%26,q=(B-W)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=q)return this;if(W!==0&&q++,this.length=Math.min(q,this.length),W!==0){var re=67108863^67108863>>>W<=67108864;W++)this.words[W]-=67108864,W===this.length-1?this.words[W+1]=1:this.words[W+1]++;return this.length=Math.max(this.length,W+1),this},c.prototype.isubn=function(B){if(a(typeof B=="number"),a(B<67108864),B<0)return this.iaddn(-B);if(this.negative!==0)return this.negative=0,this.iaddn(B),this.negative=1,this;if(this.words[0]-=B,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var W=0;W>26)-($/67108864|0),this.words[ie+q]=le&67108863}for(;ie>26,this.words[ie+q]=le&67108863;if(he===0)return this.strip();for(a(he===-1),he=0,ie=0;ie>26,this.words[ie]=le&67108863;return this.negative=1,this.strip()},c.prototype._wordDiv=function(B,W){var q=this.length-B.length,re=this.clone(),ie=B,le=ie.words[ie.length-1]|0,he=this._countBits(le);q=26-he,q!==0&&(ie=ie.ushln(q),re.iushln(q),le=ie.words[ie.length-1]|0);var $=re.length-ie.length,Z;if(W!=="mod"){Z=new c(null),Z.length=$+1,Z.words=new Array(Z.length);for(var K=0;K=0;ae--){var fe=(re.words[ie.length+ae]|0)*67108864+(re.words[ie.length+ae-1]|0);for(fe=Math.min(fe/le|0,67108863),re._ishlnsubmul(ie,fe,ae);re.negative!==0;)fe--,re.negative=0,re._ishlnsubmul(ie,1,ae),re.isZero()||(re.negative^=1);Z&&(Z.words[ae]=fe)}return Z&&Z.strip(),re.strip(),W!=="div"&&q!==0&&re.iushrn(q),{div:Z||null,mod:re}},c.prototype.divmod=function(B,W,q){if(a(!B.isZero()),this.isZero())return{div:new c(0),mod:new c(0)};var re,ie,le;return this.negative!==0&&B.negative===0?(le=this.neg().divmod(B,W),W!=="mod"&&(re=le.div.neg()),W!=="div"&&(ie=le.mod.neg(),q&&ie.negative!==0&&ie.iadd(B)),{div:re,mod:ie}):this.negative===0&&B.negative!==0?(le=this.divmod(B.neg(),W),W!=="mod"&&(re=le.div.neg()),{div:re,mod:le.mod}):(this.negative&B.negative)!==0?(le=this.neg().divmod(B.neg(),W),W!=="div"&&(ie=le.mod.neg(),q&&ie.negative!==0&&ie.isub(B)),{div:le.div,mod:ie}):B.length>this.length||this.cmp(B)<0?{div:new c(0),mod:this}:B.length===1?W==="div"?{div:this.divn(B.words[0]),mod:null}:W==="mod"?{div:null,mod:new c(this.modn(B.words[0]))}:{div:this.divn(B.words[0]),mod:new c(this.modn(B.words[0]))}:this._wordDiv(B,W)},c.prototype.div=function(B){return this.divmod(B,"div",!1).div},c.prototype.mod=function(B){return this.divmod(B,"mod",!1).mod},c.prototype.umod=function(B){return this.divmod(B,"mod",!0).mod},c.prototype.divRound=function(B){var W=this.divmod(B);if(W.mod.isZero())return W.div;var q=W.div.negative!==0?W.mod.isub(B):W.mod,re=B.ushrn(1),ie=B.andln(1),le=q.cmp(re);return le<0||ie===1&&le===0?W.div:W.div.negative!==0?W.div.isubn(1):W.div.iaddn(1)},c.prototype.modn=function(B){a(B<=67108863);for(var W=(1<<26)%B,q=0,re=this.length-1;re>=0;re--)q=(W*q+(this.words[re]|0))%B;return q},c.prototype.idivn=function(B){a(B<=67108863);for(var W=0,q=this.length-1;q>=0;q--){var re=(this.words[q]|0)+W*67108864;this.words[q]=re/B|0,W=re%B}return this.strip()},c.prototype.divn=function(B){return this.clone().idivn(B)},c.prototype.egcd=function(B){a(B.negative===0),a(!B.isZero());var W=this,q=B.clone();W.negative!==0?W=W.umod(B):W=W.clone();for(var re=new c(1),ie=new c(0),le=new c(0),he=new c(1),$=0;W.isEven()&&q.isEven();)W.iushrn(1),q.iushrn(1),++$;for(var Z=q.clone(),K=W.clone();!W.isZero();){for(var Q=0,ae=1;(W.words[0]&ae)===0&&Q<26;++Q,ae<<=1);if(Q>0)for(W.iushrn(Q);Q-- >0;)(re.isOdd()||ie.isOdd())&&(re.iadd(Z),ie.isub(K)),re.iushrn(1),ie.iushrn(1);for(var fe=0,te=1;(q.words[0]&te)===0&&fe<26;++fe,te<<=1);if(fe>0)for(q.iushrn(fe);fe-- >0;)(le.isOdd()||he.isOdd())&&(le.iadd(Z),he.isub(K)),le.iushrn(1),he.iushrn(1);W.cmp(q)>=0?(W.isub(q),re.isub(le),ie.isub(he)):(q.isub(W),le.isub(re),he.isub(ie))}return{a:le,b:he,gcd:q.iushln($)}},c.prototype._invmp=function(B){a(B.negative===0),a(!B.isZero());var W=this,q=B.clone();W.negative!==0?W=W.umod(B):W=W.clone();for(var re=new c(1),ie=new c(0),le=q.clone();W.cmpn(1)>0&&q.cmpn(1)>0;){for(var he=0,$=1;(W.words[0]&$)===0&&he<26;++he,$<<=1);if(he>0)for(W.iushrn(he);he-- >0;)re.isOdd()&&re.iadd(le),re.iushrn(1);for(var Z=0,K=1;(q.words[0]&K)===0&&Z<26;++Z,K<<=1);if(Z>0)for(q.iushrn(Z);Z-- >0;)ie.isOdd()&&ie.iadd(le),ie.iushrn(1);W.cmp(q)>=0?(W.isub(q),re.isub(ie)):(q.isub(W),ie.isub(re))}var Q;return W.cmpn(1)===0?Q=re:Q=ie,Q.cmpn(0)<0&&Q.iadd(B),Q},c.prototype.gcd=function(B){if(this.isZero())return B.abs();if(B.isZero())return this.abs();var W=this.clone(),q=B.clone();W.negative=0,q.negative=0;for(var re=0;W.isEven()&&q.isEven();re++)W.iushrn(1),q.iushrn(1);do{for(;W.isEven();)W.iushrn(1);for(;q.isEven();)q.iushrn(1);var ie=W.cmp(q);if(ie<0){var le=W;W=q,q=le}else if(ie===0||q.cmpn(1)===0)break;W.isub(q)}while(!0);return q.iushln(re)},c.prototype.invm=function(B){return this.egcd(B).a.umod(B)},c.prototype.isEven=function(){return(this.words[0]&1)===0},c.prototype.isOdd=function(){return(this.words[0]&1)===1},c.prototype.andln=function(B){return this.words[0]&B},c.prototype.bincn=function(B){a(typeof B=="number");var W=B%26,q=(B-W)/26,re=1<>>26,he&=67108863,this.words[le]=he}return ie!==0&&(this.words[le]=ie,this.length++),this},c.prototype.isZero=function(){return this.length===1&&this.words[0]===0},c.prototype.cmpn=function(B){var W=B<0;if(this.negative!==0&&!W)return-1;if(this.negative===0&&W)return 1;this.strip();var q;if(this.length>1)q=1;else{W&&(B=-B),a(B<=67108863,"Number is too big");var re=this.words[0]|0;q=re===B?0:reB.length)return 1;if(this.length=0;q--){var re=this.words[q]|0,ie=B.words[q]|0;if(re!==ie){reie&&(W=1);break}}return W},c.prototype.gtn=function(B){return this.cmpn(B)===1},c.prototype.gt=function(B){return this.cmp(B)===1},c.prototype.gten=function(B){return this.cmpn(B)>=0},c.prototype.gte=function(B){return this.cmp(B)>=0},c.prototype.ltn=function(B){return this.cmpn(B)===-1},c.prototype.lt=function(B){return this.cmp(B)===-1},c.prototype.lten=function(B){return this.cmpn(B)<=0},c.prototype.lte=function(B){return this.cmp(B)<=0},c.prototype.eqn=function(B){return this.cmpn(B)===0},c.prototype.eq=function(B){return this.cmp(B)===0},c.red=function(B){return new z(B)},c.prototype.toRed=function(B){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),B.convertTo(this)._forceRed(B)},c.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(B){return this.red=B,this},c.prototype.forceRed=function(B){return a(!this.red,"Already a number in reduction context"),this._forceRed(B)},c.prototype.redAdd=function(B){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,B)},c.prototype.redIAdd=function(B){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,B)},c.prototype.redSub=function(B){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,B)},c.prototype.redISub=function(B){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,B)},c.prototype.redShl=function(B){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,B)},c.prototype.redMul=function(B){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,B),this.red.mul(this,B)},c.prototype.redIMul=function(B){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,B),this.red.imul(this,B)},c.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(B){return a(this.red&&!B.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,B)};var f={k256:null,p224:null,p192:null,p25519:null};function P(H,B){this.name=H,this.p=new c(B,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}P.prototype._tmp=function(){var B=new c(null);return B.words=new Array(Math.ceil(this.n/13)),B},P.prototype.ireduce=function(B){var W=B,q;do this.split(W,this.tmp),W=this.imulK(W),W=W.iadd(this.tmp),q=W.bitLength();while(q>this.n);var re=q0?W.isub(this.p):W.strip!==void 0?W.strip():W._strip(),W},P.prototype.split=function(B,W){B.iushrn(this.n,0,W)},P.prototype.imulK=function(B){return B.imul(this.k)};function E(){P.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(E,P),E.prototype.split=function(B,W){for(var q=4194303,re=Math.min(B.length,9),ie=0;ie>>22,le=he}le>>>=22,B.words[ie-10]=le,le===0&&B.length>10?B.length-=10:B.length-=9},E.prototype.imulK=function(B){B.words[B.length]=0,B.words[B.length+1]=0,B.length+=2;for(var W=0,q=0;q>>=26,B.words[q]=ie,W=re}return W!==0&&(B.words[B.length++]=W),B},c._prime=function(B){if(f[B])return f[B];var W;if(B==="k256")W=new E;else if(B==="p224")W=new k;else if(B==="p192")W=new O;else if(B==="p25519")W=new G;else throw new Error("Unknown prime "+B);return f[B]=W,W};function z(H){if(typeof H=="string"){var B=c._prime(H);this.m=B.p,this.prime=B}else a(H.gtn(1),"modulus must be greater than 1"),this.m=H,this.prime=null}z.prototype._verify1=function(B){a(B.negative===0,"red works only with positives"),a(B.red,"red works only with red numbers")},z.prototype._verify2=function(B,W){a((B.negative|W.negative)===0,"red works only with positives"),a(B.red&&B.red===W.red,"red works only with red numbers")},z.prototype.imod=function(B){return this.prime?this.prime.ireduce(B)._forceRed(this):B.umod(this.m)._forceRed(this)},z.prototype.neg=function(B){return B.isZero()?B.clone():this.m.sub(B)._forceRed(this)},z.prototype.add=function(B,W){this._verify2(B,W);var q=B.add(W);return q.cmp(this.m)>=0&&q.isub(this.m),q._forceRed(this)},z.prototype.iadd=function(B,W){this._verify2(B,W);var q=B.iadd(W);return q.cmp(this.m)>=0&&q.isub(this.m),q},z.prototype.sub=function(B,W){this._verify2(B,W);var q=B.sub(W);return q.cmpn(0)<0&&q.iadd(this.m),q._forceRed(this)},z.prototype.isub=function(B,W){this._verify2(B,W);var q=B.isub(W);return q.cmpn(0)<0&&q.iadd(this.m),q},z.prototype.shl=function(B,W){return this._verify1(B),this.imod(B.ushln(W))},z.prototype.imul=function(B,W){return this._verify2(B,W),this.imod(B.imul(W))},z.prototype.mul=function(B,W){return this._verify2(B,W),this.imod(B.mul(W))},z.prototype.isqr=function(B){return this.imul(B,B.clone())},z.prototype.sqr=function(B){return this.mul(B,B)},z.prototype.sqrt=function(B){if(B.isZero())return B.clone();var W=this.m.andln(3);if(a(W%2===1),W===3){var q=this.m.add(new c(1)).iushrn(2);return this.pow(B,q)}for(var re=this.m.subn(1),ie=0;!re.isZero()&&re.andln(1)===0;)ie++,re.iushrn(1);a(!re.isZero());var le=new c(1).toRed(this),he=le.redNeg(),$=this.m.subn(1).iushrn(1),Z=this.m.bitLength();for(Z=new c(2*Z*Z).toRed(this);this.pow(Z,$).cmp(he)!==0;)Z.redIAdd(he);for(var K=this.pow(Z,re),Q=this.pow(B,re.addn(1).iushrn(1)),ae=this.pow(B,re),fe=ie;ae.cmp(le)!==0;){for(var te=ae,ne=0;te.cmp(le)!==0;ne++)te=te.redSqr();a(ne=0;ie--){for(var K=W.words[ie],Q=Z-1;Q>=0;Q--){var ae=K>>Q&1;if(le!==re[0]&&(le=this.sqr(le)),ae===0&&he===0){$=0;continue}he<<=1,he|=ae,$++,!($!==q&&(ie!==0||Q!==0))&&(le=this.mul(le,re[he]),$=0,he=0)}Z=26}return le},z.prototype.convertTo=function(B){var W=B.umod(this.m);return W===B?W.clone():W},z.prototype.convertFrom=function(B){var W=B.clone();return W.red=null,W},c.mont=function(B){return new U(B)};function U(H){z.call(this,H),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}o(U,z),U.prototype.convertTo=function(B){return this.imod(B.ushln(this.shift))},U.prototype.convertFrom=function(B){var W=this.imod(B.mul(this.rinv));return W.red=null,W},U.prototype.imul=function(B,W){if(B.isZero()||W.isZero())return B.words[0]=0,B.length=1,B;var q=B.imul(W),re=q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ie=q.isub(re).iushrn(this.shift),le=ie;return ie.cmp(this.m)>=0?le=ie.isub(this.m):ie.cmpn(0)<0&&(le=ie.iadd(this.m)),le._forceRed(this)},U.prototype.mul=function(B,W){if(B.isZero()||W.isZero())return new c(0)._forceRed(this);var q=B.mul(W),re=q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ie=q.isub(re).iushrn(this.shift),le=ie;return ie.cmp(this.m)>=0?le=ie.isub(this.m):ie.cmpn(0)<0&&(le=ie.iadd(this.m)),le._forceRed(this)},U.prototype.invm=function(B){var W=this.imod(B._invmp(this.m).mul(this.r2));return W._forceRed(this)}}(l,this)},2692:function(l){l.exports=d;function d(r){var n,u,a,o=r.length,c=0;for(n=0;n>>1;if(!(S<=0)){var f,P=n.mallocDouble(2*S*w),E=n.mallocInt32(w);if(w=c(x,S,P,E),w>0){if(S===1&&L)u.init(w),f=u.sweepComplete(S,D,0,w,P,E,0,w,P,E);else{var k=n.mallocDouble(2*S*M),O=n.mallocInt32(M);M=c(C,S,k,O),M>0&&(u.init(w+M),S===1?f=u.sweepBipartite(S,D,0,w,P,E,0,M,k,O):f=a(S,D,L,w,P,E,M,k,O),n.free(k),n.free(O))}n.free(P),n.free(E)}return f}}}var b;function g(x,C){b.push([x,C])}function A(x){return b=[],s(x,x,g,!0),b}function v(x,C){return b=[],s(x,C,g,!1),b}function h(x,C,D){switch(arguments.length){case 1:return A(x);case 2:return typeof C=="function"?s(x,x,C,!0):v(x,C);case 3:return s(x,C,D,!1);default:throw new Error("box-intersect: Invalid arguments")}}},7333:function(l,d){function r(){function a(s,b,g,A,v,h,x,C,D,L,w){for(var M=2*s,S=A,f=M*A;SD-C?a(s,b,g,A,v,h,x,C,D,L,w):o(s,b,g,A,v,h,x,C,D,L,w)}return c}function n(){function a(g,A,v,h,x,C,D,L,w,M,S){for(var f=2*g,P=h,E=f*h;PM-w?h?a(g,A,v,x,C,D,L,w,M,S,f):o(g,A,v,x,C,D,L,w,M,S,f):h?c(g,A,v,x,C,D,L,w,M,S,f):s(g,A,v,x,C,D,L,w,M,S,f)}return b}function u(a){return a?r():n()}d.partial=u(!1),d.full=u(!0)},2337:function(l,d,r){l.exports=H;var n=r(5306),u=r(2288),a=r(7333),o=a.partial,c=a.full,s=r(1390),b=r(2464),g=r(122),A=128,v=1<<22,h=1<<22,x=g("!(lo>=p0)&&!(p1>=hi)"),C=g("lo===p0"),D=g("lo0;){K-=1;var fe=K*S,te=E[fe],ne=E[fe+1],ce=E[fe+2],oe=E[fe+3],de=E[fe+4],we=E[fe+5],Se=K*f,Te=k[Se],Fe=k[Se+1],Ie=we&1,Me=!!(we&16),Ae=ie,De=le,ke=$,We=Z;if(Ie&&(Ae=$,De=Z,ke=ie,We=le),!(we&2&&(ce=D(B,te,ne,ce,Ae,De,Fe),ne>=ce))&&!(we&4&&(ne=L(B,te,ne,ce,Ae,De,Te),ne>=ce))){var _e=ce-ne,Ye=de-oe;if(Me){if(B*_e*(_e+Ye)g&&v[M+b]>L;--w,M-=x){for(var S=M,f=M+x,P=0;P>>1,L=2*s,w=D,M=v[L*D+b];x=k?(w=E,M=k):P>=G?(w=f,M=P):(w=O,M=G):k>=G?(w=E,M=k):G>=P?(w=f,M=P):(w=O,M=G);for(var H=L*(C-1),B=L*w,z=0;z=p0)&&!(p1>=hi)":b};function r(g){return d[g]}function n(g,A,v,h,x,C,D){for(var L=2*g,w=L*v,M=w,S=v,f=A,P=g+A,E=v;h>E;++E,w+=L){var k=x[w+f];if(k===D)if(S===E)S+=1,M+=L;else{for(var O=0;L>O;++O){var G=x[w+O];x[w+O]=x[M],x[M++]=G}var z=C[E];C[E]=C[S],C[S++]=z}}return S}function u(g,A,v,h,x,C,D){for(var L=2*g,w=L*v,M=w,S=v,f=A,P=g+A,E=v;h>E;++E,w+=L){var k=x[w+f];if(kO;++O){var G=x[w+O];x[w+O]=x[M],x[M++]=G}var z=C[E];C[E]=C[S],C[S++]=z}}return S}function a(g,A,v,h,x,C,D){for(var L=2*g,w=L*v,M=w,S=v,f=A,P=g+A,E=v;h>E;++E,w+=L){var k=x[w+P];if(k<=D)if(S===E)S+=1,M+=L;else{for(var O=0;L>O;++O){var G=x[w+O];x[w+O]=x[M],x[M++]=G}var z=C[E];C[E]=C[S],C[S++]=z}}return S}function o(g,A,v,h,x,C,D){for(var L=2*g,w=L*v,M=w,S=v,f=A,P=g+A,E=v;h>E;++E,w+=L){var k=x[w+P];if(k<=D)if(S===E)S+=1,M+=L;else{for(var O=0;L>O;++O){var G=x[w+O];x[w+O]=x[M],x[M++]=G}var z=C[E];C[E]=C[S],C[S++]=z}}return S}function c(g,A,v,h,x,C,D){for(var L=2*g,w=L*v,M=w,S=v,f=A,P=g+A,E=v;h>E;++E,w+=L){var k=x[w+f],O=x[w+P];if(k<=D&&D<=O)if(S===E)S+=1,M+=L;else{for(var G=0;L>G;++G){var z=x[w+G];x[w+G]=x[M],x[M++]=z}var U=C[E];C[E]=C[S],C[S++]=U}}return S}function s(g,A,v,h,x,C,D){for(var L=2*g,w=L*v,M=w,S=v,f=A,P=g+A,E=v;h>E;++E,w+=L){var k=x[w+f],O=x[w+P];if(kG;++G){var z=x[w+G];x[w+G]=x[M],x[M++]=z}var U=C[E];C[E]=C[S],C[S++]=U}}return S}function b(g,A,v,h,x,C,D,L){for(var w=2*g,M=w*v,S=M,f=v,P=A,E=g+A,k=v;h>k;++k,M+=w){var O=x[M+P],G=x[M+E];if(!(O>=D)&&!(L>=G))if(f===k)f+=1,S+=w;else{for(var z=0;w>z;++z){var U=x[M+z];x[M+z]=x[S],x[S++]=U}var H=C[k];C[k]=C[f],C[f++]=H}}return f}},309:function(l){l.exports=r;var d=32;function r(A,v){v<=4*d?n(0,v-1,A):g(0,v-1,A)}function n(A,v,h){for(var x=2*(A+1),C=A+1;C<=v;++C){for(var D=h[x++],L=h[x++],w=C,M=x-2;w-- >A;){var S=h[M-2],f=h[M-1];if(Sh[v+1]:!0}function b(A,v,h,x){A*=2;var C=x[A];return C>1,w=L-x,M=L+x,S=C,f=w,P=L,E=M,k=D,O=A+1,G=v-1,z=0;s(S,f,h)&&(z=S,S=f,f=z),s(E,k,h)&&(z=E,E=k,k=z),s(S,P,h)&&(z=S,S=P,P=z),s(f,P,h)&&(z=f,f=P,P=z),s(S,E,h)&&(z=S,S=E,E=z),s(P,E,h)&&(z=P,P=E,E=z),s(f,k,h)&&(z=f,f=k,k=z),s(f,P,h)&&(z=f,f=P,P=z),s(E,k,h)&&(z=E,E=k,k=z);for(var U=h[2*f],H=h[2*f+1],B=h[2*E],W=h[2*E+1],q=2*S,re=2*P,ie=2*k,le=2*C,he=2*L,$=2*D,Z=0;Z<2;++Z){var K=h[q+Z],Q=h[re+Z],ae=h[ie+Z];h[le+Z]=K,h[he+Z]=Q,h[$+Z]=ae}a(w,A,h),a(M,v,h);for(var fe=O;fe<=G;++fe)if(b(fe,U,H,h))fe!==O&&u(fe,O,h),++O;else if(!b(fe,B,W,h))for(;;)if(b(G,B,W,h)){b(G,U,H,h)?(o(fe,O,G,h),++O,--G):(u(fe,G,h),--G);break}else{if(--G>>1;a(x,Q);for(var ae=0,fe=0,he=0;he=o)te=te-o|0,D(g,A,fe--,te);else if(te>=0)D(s,b,ae--,te);else if(te<=-o){te=-te-o|0;for(var ne=0;ne>>1;a(x,Q);for(var ae=0,fe=0,te=0,he=0;he>1===x[2*he+3]>>1&&(ce=2,he+=1),ne<0){for(var oe=-(ne>>1)-1,de=0;de>1)-1;ce===0?D(s,b,ae--,oe):ce===1?D(g,A,fe--,oe):ce===2&&D(v,h,te--,oe)}}}function S(P,E,k,O,G,z,U,H,B,W,q,re){var ie=0,le=2*P,he=E,$=E+P,Z=1,K=1;O?K=o:Z=o;for(var Q=G;Q>>1;a(x,ne);for(var ce=0,Q=0;Q=o?(de=!O,ae-=o):(de=!!O,ae-=1),de)L(s,b,ce++,ae);else{var we=re[ae],Se=le*ae,Te=q[Se+E+1],Fe=q[Se+E+1+P];e:for(var Ie=0;Ie>>1;a(x,ae);for(var fe=0,$=0;$=o)s[fe++]=Z-o;else{Z-=1;var ne=q[Z],ce=ie*Z,oe=W[ce+E+1],de=W[ce+E+1+P];e:for(var we=0;we=0;--we)if(s[we]===Z){for(var Ie=we+1;Ie0;){for(var x=s.pop(),A=s.pop(),C=-1,D=-1,v=g[A],w=1;w=0||(c.flip(A,x),u(o,c,s,C,A,D),u(o,c,s,A,D,C),u(o,c,s,D,x,C),u(o,c,s,x,C,D))}}},7098:function(l,d,r){var n=r(5070);l.exports=b;function u(g,A,v,h,x,C,D){this.cells=g,this.neighbor=A,this.flags=h,this.constraint=v,this.active=x,this.next=C,this.boundary=D}var a=u.prototype;function o(g,A){return g[0]-A[0]||g[1]-A[1]||g[2]-A[2]}a.locate=function(){var g=[0,0,0];return function(A,v,h){var x=A,C=v,D=h;return v0||D.length>0;){for(;C.length>0;){var f=C.pop();if(L[f]!==-x){L[f]=x,w[f];for(var P=0;P<3;++P){var E=S[3*f+P];E>=0&&L[E]===0&&(M[3*f+P]?D.push(E):(C.push(E),L[E]=x))}}}var k=D;D=C,C=k,D.length=0,x=-x}var O=s(w,L,A);return v?O.concat(h.boundary):O}},9971:function(l,d,r){var n=r(5070),u=r(417)[3],a=0,o=1,c=2;l.exports=D;function s(L,w,M,S,f){this.a=L,this.b=w,this.idx=M,this.lowerIds=S,this.upperIds=f}function b(L,w,M,S){this.a=L,this.b=w,this.type=M,this.idx=S}function g(L,w){var M=L.a[0]-w.a[0]||L.a[1]-w.a[1]||L.type-w.type;return M||L.type!==a&&(M=u(L.a,L.b,w.b),M)?M:L.idx-w.idx}function A(L,w){return u(L.a,L.b,w)}function v(L,w,M,S,f){for(var P=n.lt(w,S,A),E=n.gt(w,S,A),k=P;k1&&u(M[G[U-2]],M[G[U-1]],S)>0;)L.push([G[U-1],G[U-2],f]),U-=1;G.length=U,G.push(f);for(var z=O.upperIds,U=z.length;U>1&&u(M[z[U-2]],M[z[U-1]],S)<0;)L.push([z[U-2],z[U-1],f]),U-=1;z.length=U,z.push(f)}}function h(L,w){var M;return L.a[0]O[0]&&f.push(new b(O,k,c,P),new b(k,O,o,P))}f.sort(g);for(var G=f[0].a[0]-(1+Math.abs(f[0].a[0]))*Math.pow(2,-52),z=[new s([G,1],[G,0],-1,[],[])],U=[],P=0,H=f.length;P=0}}(),a.removeTriangle=function(s,b,g){var A=this.stars;o(A[s],b,g),o(A[b],g,s),o(A[g],s,b)},a.addTriangle=function(s,b,g){var A=this.stars;A[s].push(b,g),A[b].push(g,s),A[g].push(s,b)},a.opposite=function(s,b){for(var g=this.stars[b],A=1,v=g.length;A=0;--B){var K=U[B];W=K[0];var Q=G[W],ae=Q[0],fe=Q[1],te=O[ae],ne=O[fe];if((te[0]-ne[0]||te[1]-ne[1])<0){var ce=ae;ae=fe,fe=ce}Q[0]=ae;var oe=Q[1]=K[1],de;for(H&&(de=Q[2]);B>0&&U[B-1][0]===W;){var K=U[--B],we=K[1];H?G.push([oe,we,de]):G.push([oe,we]),oe=we}H?G.push([oe,fe,de]):G.push([oe,fe])}return q}function w(O,G,z){for(var U=G.length,H=new n(U),B=[],W=0;WG[2]?1:0)}function f(O,G,z){if(O.length!==0){if(G)for(var U=0;U0||W.length>0}function k(O,G,z){var U;if(z){U=G;for(var H=new Array(G.length),B=0;BL+1)throw new Error(C+" map requires nshades to be at least size "+x.length);Array.isArray(b.alpha)?b.alpha.length!==2?w=[1,1]:w=b.alpha.slice():typeof b.alpha=="number"?w=[b.alpha,b.alpha]:w=[1,1],g=x.map(function(k){return Math.round(k.index*L)}),w[0]=Math.min(Math.max(w[0],0),1),w[1]=Math.min(Math.max(w[1],0),1);var S=x.map(function(k,O){var G=x[O].index,z=x[O].rgb.slice();return z.length===4&&z[3]>=0&&z[3]<=1||(z[3]=w[0]+(w[1]-w[0])*G),z}),f=[];for(M=0;M=0}function b(g,A,v,h){var x=n(A,v,h);if(x===0){var C=u(n(g,A,v)),D=u(n(g,A,h));if(C===D){if(C===0){var L=s(g,A,v),w=s(g,A,h);return L===w?0:L?1:-1}return 0}else{if(D===0)return C>0||s(g,A,h)?-1:1;if(C===0)return D>0||s(g,A,v)?1:-1}return u(D-C)}var M=n(g,A,v);if(M>0)return x>0&&n(g,A,h)>0?1:-1;if(M<0)return x>0||n(g,A,h)>0?1:-1;var S=n(g,A,h);return S>0||s(g,A,v)?1:-1}},7538:function(l){l.exports=function(r){return r<0?-1:r>0?1:0}},9209:function(l){l.exports=n;var d=Math.min;function r(u,a){return u-a}function n(u,a){var o=u.length,c=u.length-a.length;if(c)return c;switch(o){case 0:return 0;case 1:return u[0]-a[0];case 2:return u[0]+u[1]-a[0]-a[1]||d(u[0],u[1])-d(a[0],a[1]);case 3:var s=u[0]+u[1],b=a[0]+a[1];if(c=s+u[2]-(b+a[2]),c)return c;var g=d(u[0],u[1]),A=d(a[0],a[1]);return d(g,u[2])-d(A,a[2])||d(g+u[2],s)-d(A+a[2],b);case 4:var v=u[0],h=u[1],x=u[2],C=u[3],D=a[0],L=a[1],w=a[2],M=a[3];return v+h+x+C-(D+L+w+M)||d(v,h,x,C)-d(D,L,w,M,D)||d(v+h,v+x,v+C,h+x,h+C,x+C)-d(D+L,D+w,D+M,L+w,L+M,w+M)||d(v+h+x,v+h+C,v+x+C,h+x+C)-d(D+L+w,D+L+M,D+w+M,L+w+M);default:for(var S=u.slice().sort(r),f=a.slice().sort(r),P=0;Pr[u][0]&&(u=a);return nu?[[u],[n]]:[[n]]}},8722:function(l,d,r){l.exports=u;var n=r(3266);function u(a){var o=n(a),c=o.length;if(c<=2)return[];for(var s=new Array(c),b=o[c-1],g=0;g=b[D]&&(C+=1);h[x]=C}}return s}function c(s,b){try{return n(s,!0)}catch{var g=u(s);if(g.length<=b)return[];var A=a(s,g),v=n(A,!0);return o(v,g)}}},9680:function(l){function d(n,u,a,o,c,s){var b=6*c*c-6*c,g=3*c*c-4*c+1,A=-6*c*c+6*c,v=3*c*c-2*c;if(n.length){s||(s=new Array(n.length));for(var h=n.length-1;h>=0;--h)s[h]=b*n[h]+g*u[h]+A*a[h]+v*o[h];return s}return b*n+g*u+A*a[h]+v*o}function r(n,u,a,o,c,s){var b=c-1,g=c*c,A=b*b,v=(1+2*c)*A,h=c*A,x=g*(3-2*c),C=g*b;if(n.length){s||(s=new Array(n.length));for(var D=n.length-1;D>=0;--D)s[D]=v*n[D]+h*u[D]+x*a[D]+C*o[D];return s}return v*n+h*u+x*a+C*o}l.exports=r,l.exports.derivative=d},4419:function(l,d,r){var n=r(2183),u=r(1215);l.exports=s;function a(b,g){this.point=b,this.index=g}function o(b,g){for(var A=b.point,v=g.point,h=A.length,x=0;x=2)return!1;z[H]=B}return!0}):G=G.filter(function(z){for(var U=0;U<=v;++U){var H=P[z[U]];if(H<0)return!1;z[U]=H}return!0}),v&1)for(var C=0;C>>31},l.exports.exponent=function(x){var C=l.exports.hi(x);return(C<<1>>>21)-1023},l.exports.fraction=function(x){var C=l.exports.lo(x),D=l.exports.hi(x),L=D&(1<<20)-1;return D&2146435072&&(L+=1048576),[C,L]},l.exports.denormalized=function(x){var C=l.exports.hi(x);return!(C&2146435072)}},3094:function(l){function d(u,a,o){var c=u[o]|0;if(c<=0)return[];var s=new Array(c),b;if(o===u.length-1)for(b=0;b"u"&&(a=0),typeof u){case"number":if(u>0)return r(u|0,a);break;case"object":if(typeof u.length=="number")return d(u,a,0);break}return[]}l.exports=n},8348:function(l,d,r){l.exports=u;var n=r(1215);function u(a,o){var c=a.length;if(typeof o!="number"){o=0;for(var s=0;s=v-1)for(var M=C.length-1,f=g-A[v-1],S=0;S=v-1){var w=C.length-1;g-A[v-1];for(var M=0;M=0;--v)if(g[--A])return!1;return!0},c.jump=function(g){var A=this.lastT(),v=this.dimension;if(!(g0;--S)h.push(a(L[S-1],w[S-1],arguments[S])),x.push(0)}},c.push=function(g){var A=this.lastT(),v=this.dimension;if(!(g1e-6?1/D:0;this._time.push(g);for(var f=v;f>0;--f){var P=a(w[f-1],M[f-1],arguments[f]);h.push(P),x.push((P-h[C++])*S)}}},c.set=function(g){var A=this.dimension;if(!(g0;--L)v.push(a(C[L-1],D[L-1],arguments[L])),h.push(0)}},c.move=function(g){var A=this.lastT(),v=this.dimension;if(!(g<=A||arguments.length!==v+1)){var h=this._state,x=this._velocity,C=h.length-this.dimension,D=this.bounds,L=D[0],w=D[1],M=g-A,S=M>1e-6?1/M:0;this._time.push(g);for(var f=v;f>0;--f){var P=arguments[f];h.push(a(L[f-1],w[f-1],h[C++]+P)),x.push(P*S)}}},c.idle=function(g){var A=this.lastT();if(!(g=0;--S)h.push(a(L[S],w[S],h[C]+M*x[C])),x.push(0),C+=1}};function s(g){for(var A=new Array(g),v=0;v=0;--O){var f=P[O];E[O]<=0?P[O]=new n(f._color,f.key,f.value,P[O+1],f.right,f._count+1):P[O]=new n(f._color,f.key,f.value,f.left,P[O+1],f._count+1)}for(var O=P.length-1;O>1;--O){var G=P[O-1],f=P[O];if(G._color===r||f._color===r)break;var z=P[O-2];if(z.left===G)if(G.left===f){var U=z.right;if(U&&U._color===d)G._color=r,z.right=a(r,U),z._color=d,O-=1;else{if(z._color=d,z.left=G.right,G._color=r,G.right=z,P[O-2]=G,P[O-1]=f,o(z),o(G),O>=3){var H=P[O-3];H.left===z?H.left=G:H.right=G}break}}else{var U=z.right;if(U&&U._color===d)G._color=r,z.right=a(r,U),z._color=d,O-=1;else{if(G.right=f.left,z._color=d,z.left=f.right,f._color=r,f.left=G,f.right=z,P[O-2]=f,P[O-1]=G,o(z),o(G),o(f),O>=3){var H=P[O-3];H.left===z?H.left=f:H.right=f}break}}else if(G.right===f){var U=z.left;if(U&&U._color===d)G._color=r,z.left=a(r,U),z._color=d,O-=1;else{if(z._color=d,z.right=G.left,G._color=r,G.left=z,P[O-2]=G,P[O-1]=f,o(z),o(G),O>=3){var H=P[O-3];H.right===z?H.right=G:H.left=G}break}}else{var U=z.left;if(U&&U._color===d)G._color=r,z.left=a(r,U),z._color=d,O-=1;else{if(G.left=f.right,z._color=d,z.right=f.left,f._color=r,f.right=G,f.left=z,P[O-2]=f,P[O-1]=G,o(z),o(G),o(f),O>=3){var H=P[O-3];H.right===z?H.right=f:H.left=f}break}}}return P[0]._color=r,new c(S,P[0])};function b(w,M){if(M.left){var S=b(w,M.left);if(S)return S}var S=w(M.key,M.value);if(S)return S;if(M.right)return b(w,M.right)}function g(w,M,S,f){var P=M(w,f.key);if(P<=0){if(f.left){var E=g(w,M,S,f.left);if(E)return E}var E=S(f.key,f.value);if(E)return E}if(f.right)return g(w,M,S,f.right)}function A(w,M,S,f,P){var E=S(w,P.key),k=S(M,P.key),O;if(E<=0&&(P.left&&(O=A(w,M,S,f,P.left),O)||k>0&&(O=f(P.key,P.value),O)))return O;if(k>0&&P.right)return A(w,M,S,f,P.right)}s.forEach=function(M,S,f){if(!!this.root)switch(arguments.length){case 1:return b(M,this.root);case 2:return g(S,this._compare,M,this.root);case 3:return this._compare(S,f)>=0?void 0:A(S,f,this._compare,M,this.root)}},Object.defineProperty(s,"begin",{get:function(){for(var w=[],M=this.root;M;)w.push(M),M=M.left;return new v(this,w)}}),Object.defineProperty(s,"end",{get:function(){for(var w=[],M=this.root;M;)w.push(M),M=M.right;return new v(this,w)}}),s.at=function(w){if(w<0)return new v(this,[]);for(var M=this.root,S=[];;){if(S.push(M),M.left){if(w=M.right._count)break;M=M.right}else break}return new v(this,[])},s.ge=function(w){for(var M=this._compare,S=this.root,f=[],P=0;S;){var E=M(w,S.key);f.push(S),E<=0&&(P=f.length),E<=0?S=S.left:S=S.right}return f.length=P,new v(this,f)},s.gt=function(w){for(var M=this._compare,S=this.root,f=[],P=0;S;){var E=M(w,S.key);f.push(S),E<0&&(P=f.length),E<0?S=S.left:S=S.right}return f.length=P,new v(this,f)},s.lt=function(w){for(var M=this._compare,S=this.root,f=[],P=0;S;){var E=M(w,S.key);f.push(S),E>0&&(P=f.length),E<=0?S=S.left:S=S.right}return f.length=P,new v(this,f)},s.le=function(w){for(var M=this._compare,S=this.root,f=[],P=0;S;){var E=M(w,S.key);f.push(S),E>=0&&(P=f.length),E<0?S=S.left:S=S.right}return f.length=P,new v(this,f)},s.find=function(w){for(var M=this._compare,S=this.root,f=[];S;){var P=M(w,S.key);if(f.push(S),P===0)return new v(this,f);P<=0?S=S.left:S=S.right}return new v(this,[])},s.remove=function(w){var M=this.find(w);return M?M.remove():this},s.get=function(w){for(var M=this._compare,S=this.root;S;){var f=M(w,S.key);if(f===0)return S.value;f<=0?S=S.left:S=S.right}};function v(w,M){this.tree=w,this._stack=M}var h=v.prototype;Object.defineProperty(h,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(h,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),h.clone=function(){return new v(this.tree,this._stack.slice())};function x(w,M){w.key=M.key,w.value=M.value,w.left=M.left,w.right=M.right,w._color=M._color,w._count=M._count}function C(w){for(var M,S,f,P,E=w.length-1;E>=0;--E){if(M=w[E],E===0){M._color=r;return}if(S=w[E-1],S.left===M){if(f=S.right,f.right&&f.right._color===d){if(f=S.right=u(f),P=f.right=u(f.right),S.right=f.left,f.left=S,f.right=P,f._color=S._color,M._color=r,S._color=r,P._color=r,o(S),o(f),E>1){var k=w[E-2];k.left===S?k.left=f:k.right=f}w[E-1]=f;return}else if(f.left&&f.left._color===d){if(f=S.right=u(f),P=f.left=u(f.left),S.right=P.left,f.left=P.right,P.left=S,P.right=f,P._color=S._color,S._color=r,f._color=r,M._color=r,o(S),o(f),o(P),E>1){var k=w[E-2];k.left===S?k.left=P:k.right=P}w[E-1]=P;return}if(f._color===r)if(S._color===d){S._color=r,S.right=a(d,f);return}else{S.right=a(d,f);continue}else{if(f=u(f),S.right=f.left,f.left=S,f._color=S._color,S._color=d,o(S),o(f),E>1){var k=w[E-2];k.left===S?k.left=f:k.right=f}w[E-1]=f,w[E]=S,E+11){var k=w[E-2];k.right===S?k.right=f:k.left=f}w[E-1]=f;return}else if(f.right&&f.right._color===d){if(f=S.left=u(f),P=f.right=u(f.right),S.left=P.right,f.right=P.left,P.right=S,P.left=f,P._color=S._color,S._color=r,f._color=r,M._color=r,o(S),o(f),o(P),E>1){var k=w[E-2];k.right===S?k.right=P:k.left=P}w[E-1]=P;return}if(f._color===r)if(S._color===d){S._color=r,S.left=a(d,f);return}else{S.left=a(d,f);continue}else{if(f=u(f),S.left=f.right,f.right=S,f._color=S._color,S._color=d,o(S),o(f),E>1){var k=w[E-2];k.right===S?k.right=f:k.left=f}w[E-1]=f,w[E]=S,E+1=0;--f){var S=w[f];S.left===w[f+1]?M[f]=new n(S._color,S.key,S.value,M[f+1],S.right,S._count):M[f]=new n(S._color,S.key,S.value,S.left,M[f+1],S._count)}if(S=M[M.length-1],S.left&&S.right){var P=M.length;for(S=S.left;S.right;)M.push(S),S=S.right;var E=M[P-1];M.push(new n(S._color,E.key,E.value,S.left,S.right,S._count)),M[P-1].key=S.key,M[P-1].value=S.value;for(var f=M.length-2;f>=P;--f)S=M[f],M[f]=new n(S._color,S.key,S.value,S.left,M[f+1],S._count);M[P-1].left=M[P]}if(S=M[M.length-1],S._color===d){var k=M[M.length-2];k.left===S?k.left=null:k.right===S&&(k.right=null),M.pop();for(var f=0;f0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(h,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(h,"index",{get:function(){var w=0,M=this._stack;if(M.length===0){var S=this.tree.root;return S?S._count:0}else M[M.length-1].left&&(w=M[M.length-1].left._count);for(var f=M.length-2;f>=0;--f)M[f+1]===M[f].right&&(++w,M[f].left&&(w+=M[f].left._count));return w},enumerable:!0}),h.next=function(){var w=this._stack;if(w.length!==0){var M=w[w.length-1];if(M.right)for(M=M.right;M;)w.push(M),M=M.left;else for(w.pop();w.length>0&&w[w.length-1].right===M;)M=w[w.length-1],w.pop()}},Object.defineProperty(h,"hasNext",{get:function(){var w=this._stack;if(w.length===0)return!1;if(w[w.length-1].right)return!0;for(var M=w.length-1;M>0;--M)if(w[M-1].left===w[M])return!0;return!1}}),h.update=function(w){var M=this._stack;if(M.length===0)throw new Error("Can't update empty node!");var S=new Array(M.length),f=M[M.length-1];S[S.length-1]=new n(f._color,f.key,w,f.left,f.right,f._count);for(var P=M.length-2;P>=0;--P)f=M[P],f.left===M[P+1]?S[P]=new n(f._color,f.key,f.value,S[P+1],f.right,f._count):S[P]=new n(f._color,f.key,f.value,f.left,S[P+1],f._count);return new c(this.tree._compare,S[0])},h.prev=function(){var w=this._stack;if(w.length!==0){var M=w[w.length-1];if(M.left)for(M=M.left;M;)w.push(M),M=M.right;else for(w.pop();w.length>0&&w[w.length-1].left===M;)M=w[w.length-1],w.pop()}},Object.defineProperty(h,"hasPrev",{get:function(){var w=this._stack;if(w.length===0)return!1;if(w[w.length-1].left)return!0;for(var M=w.length-1;M>0;--M)if(w[M-1].right===w[M])return!0;return!1}});function D(w,M){return wM?1:0}function L(w){return new c(w||D,null)}},7453:function(l,d,r){l.exports=f;var n=r(9557),u=r(1681),a=r(1011),o=r(2864),c=r(8468),s=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function b(P,E){return P[0]=E[0],P[1]=E[1],P[2]=E[2],P}function g(P){this.gl=P,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont="sans-serif",this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(P)}var A=g.prototype;A.update=function(P){P=P||{};function E(le,he,$){if($ in P){var Z=P[$],K=this[$],Q;(le?Array.isArray(Z)&&Array.isArray(Z[0]):Array.isArray(Z))?this[$]=Q=[he(Z[0]),he(Z[1]),he(Z[2])]:this[$]=Q=[he(Z),he(Z),he(Z)];for(var ae=0;ae<3;++ae)if(Q[ae]!==K[ae])return!0}return!1}var k=E.bind(this,!1,Number),O=E.bind(this,!1,Boolean),G=E.bind(this,!1,String),z=E.bind(this,!0,function(le){if(Array.isArray(le)){if(le.length===3)return[+le[0],+le[1],+le[2],1];if(le.length===4)return[+le[0],+le[1],+le[2],+le[3]]}return[0,0,0,1]}),U,H=!1,B=!1;if("bounds"in P)for(var W=P.bounds,q=0;q<2;++q)for(var re=0;re<3;++re)W[q][re]!==this.bounds[q][re]&&(B=!0),this.bounds[q][re]=W[q][re];if("ticks"in P){U=P.ticks,H=!0,this.autoTicks=!1;for(var q=0;q<3;++q)this.tickSpacing[q]=0}else k("tickSpacing")&&(this.autoTicks=!0,B=!0);if(this._firstInit&&("ticks"in P||"tickSpacing"in P||(this.autoTicks=!0),B=!0,H=!0,this._firstInit=!1),B&&this.autoTicks&&(U=c.create(this.bounds,this.tickSpacing),H=!0),H){for(var q=0;q<3;++q)U[q].sort(function(he,$){return he.x-$.x});c.equal(U,this.ticks)?H=!1:this.ticks=U}O("tickEnable"),G("tickFont")&&(H=!0),k("tickSize"),k("tickAngle"),k("tickPad"),z("tickColor");var ie=G("labels");G("labelFont")&&(ie=!0),O("labelEnable"),k("labelSize"),k("labelPad"),z("labelColor"),O("lineEnable"),O("lineMirror"),k("lineWidth"),z("lineColor"),O("lineTickEnable"),O("lineTickMirror"),k("lineTickLength"),k("lineTickWidth"),z("lineTickColor"),O("gridEnable"),k("gridWidth"),z("gridColor"),O("zeroEnable"),z("zeroLineColor"),k("zeroLineWidth"),O("backgroundEnable"),z("backgroundColor"),this._text?this._text&&(ie||H)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=n(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&H&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=u(this.gl,this.bounds,this.ticks))};function v(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var h=[new v,new v,new v];function x(P,E,k,O,G){for(var z=P.primalOffset,U=P.primalMinor,H=P.mirrorOffset,B=P.mirrorMinor,W=O[E],q=0;q<3;++q)if(E!==q){var re=z,ie=H,le=U,he=B;W&1<0?(le[q]=-1,he[q]=0):(le[q]=0,he[q]=1)}}var C=[0,0,0],D={model:s,view:s,projection:s,_ortho:!1};A.isOpaque=function(){return!0},A.isTransparent=function(){return!1},A.drawTransparent=function(P){};var L=0,w=[0,0,0],M=[0,0,0],S=[0,0,0];A.draw=function(P){P=P||D;for(var K=this.gl,E=P.model||s,k=P.view||s,O=P.projection||s,G=this.bounds,z=P._ortho||!1,U=o(E,k,O,G,z),H=U.cubeEdges,B=U.axis,W=k[12],q=k[13],re=k[14],ie=k[15],le=z?2:1,he=le*this.pixelRatio*(O[3]*W+O[7]*q+O[11]*re+O[15]*ie)/K.drawingBufferHeight,$=0;$<3;++$)this.lastCubeProps.cubeEdges[$]=H[$],this.lastCubeProps.axis[$]=B[$];for(var Z=h,$=0;$<3;++$)x(h[$],$,this.bounds,H,B);for(var K=this.gl,Q=C,$=0;$<3;++$)this.backgroundEnable[$]?Q[$]=B[$]:Q[$]=0;this._background.draw(E,k,O,G,Q,this.backgroundColor),this._lines.bind(E,k,O,this);for(var $=0;$<3;++$){var ae=[0,0,0];B[$]>0?ae[$]=G[1][$]:ae[$]=G[0][$];for(var fe=0;fe<2;++fe){var te=($+1+fe)%3,ne=($+1+(fe^1))%3;this.gridEnable[te]&&this._lines.drawGrid(te,ne,this.bounds,ae,this.gridColor[te],this.gridWidth[te]*this.pixelRatio)}for(var fe=0;fe<2;++fe){var te=($+1+fe)%3,ne=($+1+(fe^1))%3;this.zeroEnable[ne]&&Math.min(G[0][ne],G[1][ne])<=0&&Math.max(G[0][ne],G[1][ne])>=0&&this._lines.drawZero(te,ne,this.bounds,ae,this.zeroLineColor[ne],this.zeroLineWidth[ne]*this.pixelRatio)}}for(var $=0;$<3;++$){this.lineEnable[$]&&this._lines.drawAxisLine($,this.bounds,Z[$].primalOffset,this.lineColor[$],this.lineWidth[$]*this.pixelRatio),this.lineMirror[$]&&this._lines.drawAxisLine($,this.bounds,Z[$].mirrorOffset,this.lineColor[$],this.lineWidth[$]*this.pixelRatio);for(var ce=b(w,Z[$].primalMinor),oe=b(M,Z[$].mirrorMinor),de=this.lineTickLength,fe=0;fe<3;++fe){var we=he/E[5*fe];ce[fe]*=de[fe]*we,oe[fe]*=de[fe]*we}this.lineTickEnable[$]&&this._lines.drawAxisTicks($,Z[$].primalOffset,ce,this.lineTickColor[$],this.lineTickWidth[$]*this.pixelRatio),this.lineTickMirror[$]&&this._lines.drawAxisTicks($,Z[$].mirrorOffset,oe,this.lineTickColor[$],this.lineTickWidth[$]*this.pixelRatio)}this._lines.unbind(),this._text.bind(E,k,O,this.pixelRatio);var Se,Te=.5,Fe,Ie;function Me(Ye){Ie=[0,0,0],Ie[Ye]=1}function Ae(Ye,Pe,Ve){var Ze=(Ye+1)%3,Ke=(Ye+2)%3,lt=Pe[Ze],vt=Pe[Ke],mt=Ve[Ze],Et=Ve[Ke];if(lt>0&&Et>0){Me(Ze);return}else if(lt>0&&Et<0){Me(Ze);return}else if(lt<0&&Et>0){Me(Ze);return}else if(lt<0&&Et<0){Me(Ze);return}else if(vt>0&&mt>0){Me(Ke);return}else if(vt>0&&mt<0){Me(Ke);return}else if(vt<0&&mt>0){Me(Ke);return}else if(vt<0&&mt<0){Me(Ke);return}}for(var $=0;$<3;++$){for(var De=Z[$].primalMinor,ke=Z[$].mirrorMinor,We=b(S,Z[$].primalOffset),fe=0;fe<3;++fe)this.lineTickEnable[$]&&(We[fe]+=he*De[fe]*Math.max(this.lineTickLength[fe],0)/E[5*fe]);var _e=[0,0,0];if(_e[$]=1,this.tickEnable[$]){this.tickAngle[$]===-3600?(this.tickAngle[$]=0,this.tickAlign[$]="auto"):this.tickAlign[$]=-1,Fe=1,Se=[this.tickAlign[$],Te,Fe],Se[0]==="auto"?Se[0]=L:Se[0]=parseInt(""+Se[0]),Ie=[0,0,0],Ae($,De,ke);for(var fe=0;fe<3;++fe)We[fe]+=he*De[fe]*this.tickPad[fe]/E[5*fe];this._text.drawTicks($,this.tickSize[$],this.tickAngle[$],We,this.tickColor[$],_e,Ie,Se)}if(this.labelEnable[$]){Fe=0,Ie=[0,0,0],this.labels[$].length>4&&(Me($),Fe=1),Se=[this.labelAlign[$],Te,Fe],Se[0]==="auto"?Se[0]=L:Se[0]=parseInt(""+Se[0]);for(var fe=0;fe<3;++fe)We[fe]+=he*De[fe]*this.labelPad[fe]/E[5*fe];We[$]+=.5*(G[0][$]+G[1][$]),this._text.drawLabel($,this.labelSize[$],this.labelAngle[$],We,this.labelColor[$],[0,0,0],Ie,Se)}}this._text.unbind()},A.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function f(P,E){var k=new g(P);return k.update(E),k}},1011:function(l,d,r){l.exports=s;var n=r(5827),u=r(2944),a=r(1943).bg;function o(b,g,A,v){this.gl=b,this.buffer=g,this.vao=A,this.shader=v}var c=o.prototype;c.draw=function(b,g,A,v,h,x){for(var C=!1,D=0;D<3;++D)C=C||h[D];if(!!C){var L=this.gl;L.enable(L.POLYGON_OFFSET_FILL),L.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:b,view:g,projection:A,bounds:v,enable:h,colors:x},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),L.disable(L.POLYGON_OFFSET_FILL)}},c.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function s(b){for(var g=[],A=[],v=0,h=0;h<3;++h)for(var x=(h+1)%3,C=(h+2)%3,D=[0,0,0],L=[0,0,0],w=-1;w<=1;w+=2){A.push(v,v+2,v+1,v+1,v+2,v+3),D[h]=w,L[h]=w;for(var M=-1;M<=1;M+=2){D[x]=M;for(var S=-1;S<=1;S+=2)D[C]=S,g.push(D[0],D[1],D[2],L[0],L[1],L[2]),v+=1}var f=x;x=C,C=f}var P=n(b,new Float32Array(g)),E=n(b,new Uint16Array(A),b.ELEMENT_ARRAY_BUFFER),k=u(b,[{buffer:P,type:b.FLOAT,size:3,offset:0,stride:24},{buffer:P,type:b.FLOAT,size:3,offset:12,stride:24}],E),O=a(b);return O.attributes.position.location=0,O.attributes.normal.location=1,new o(b,P,k,O)}},2864:function(l,d,r){l.exports=w;var n=r(2288),u=r(104),a=r(4670),o=r(417),c=new Array(16),s=new Array(8),b=new Array(8),g=new Array(3),A=[0,0,0];(function(){for(var M=0;M<8;++M)s[M]=[1,1,1,1],b[M]=[1,1,1]})();function v(M,S,f){for(var P=0;P<4;++P){M[P]=f[12+P];for(var E=0;E<3;++E)M[P]+=S[E]*f[4*E+P]}}var h=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function x(M){for(var S=0;Sie&&(U|=1<ie){U|=1<b[O][1])&&(fe=O);for(var te=-1,O=0;O<3;++O){var ne=fe^1<b[ce][0]&&(ce=ne)}}var oe=C;oe[0]=oe[1]=oe[2]=0,oe[n.log2(te^fe)]=fe&te,oe[n.log2(fe^ce)]=fe&ce;var de=ce^7;de===U||de===ae?(de=te^7,oe[n.log2(ce^de)]=de&ce):oe[n.log2(te^de)]=de&te;for(var we=D,Se=U,W=0;W<3;++W)Se&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ? + b - PI : + b; +} + +float look_horizontal_or_vertical(float a, float ratio) { + // ratio controls the ratio between being horizontal to (vertical + horizontal) + // if ratio is set to 0.5 then it is 50%, 50%. + // when using a higher ratio e.g. 0.75 the result would + // likely be more horizontal than vertical. + + float b = positive_angle(a); + + return + (b < ( ratio) * HALF_PI) ? 0.0 : + (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI : + (b < (2.0 + ratio) * HALF_PI) ? 0.0 : + (b < (4.0 - ratio) * HALF_PI) ? HALF_PI : + 0.0; +} + +float roundTo(float a, float b) { + return float(b * floor((a + 0.5 * b) / b)); +} + +float look_round_n_directions(float a, int n) { + float b = positive_angle(a); + float div = TWO_PI / float(n); + float c = roundTo(b, div); + return look_upwards(c); +} + +float applyAlignOption(float rawAngle, float delta) { + return + (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions + (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical + (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis + (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards + (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal + rawAngle; // otherwise return back raw input angle +} + +bool isAxisTitle = (axis.x == 0.0) && + (axis.y == 0.0) && + (axis.z == 0.0); + +void main() { + //Compute world offset + float axisDistance = position.z; + vec3 dataPosition = axisDistance * axis + offset; + + float beta = angle; // i.e. user defined attributes for each tick + + float axisAngle; + float clipAngle; + float flip; + + if (enableAlign) { + axisAngle = (isAxisTitle) ? HALF_PI : + computeViewAngle(dataPosition, dataPosition + axis); + clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir); + + axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0; + clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0; + + flip = (dot(vec2(cos(axisAngle), sin(axisAngle)), + vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0; + + beta += applyAlignOption(clipAngle, flip * PI); + } + + //Compute plane offset + vec2 planeCoord = position.xy * pixelScale; + + mat2 planeXform = scale * mat2( + cos(beta), sin(beta), + -sin(beta), cos(beta) + ); + + vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution; + + //Compute clip position + vec3 clipPosition = project(dataPosition); + + //Apply text offset in clip coordinates + clipPosition += vec3(viewOffset, 0.0); + + //Done + gl_Position = vec4(clipPosition, 1.0); +}`]),s=n([`precision highp float; +#define GLSLIFY 1 + +uniform vec4 color; +void main() { + gl_FragColor = color; +}`]);d.f=function(A){return u(A,c,s,null,[{name:"position",type:"vec3"}])};var b=n([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec3 normal; + +uniform mat4 model, view, projection; +uniform vec3 enable; +uniform vec3 bounds[2]; + +varying vec3 colorChannel; + +void main() { + + vec3 signAxis = sign(bounds[1] - bounds[0]); + + vec3 realNormal = signAxis * normal; + + if(dot(realNormal, enable) > 0.0) { + vec3 minRange = min(bounds[0], bounds[1]); + vec3 maxRange = max(bounds[0], bounds[1]); + vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0)); + gl_Position = projection * view * model * vec4(nPosition, 1.0); + } else { + gl_Position = vec4(0,0,0,0); + } + + colorChannel = abs(realNormal); +}`]),g=n([`precision highp float; +#define GLSLIFY 1 + +uniform vec4 colors[3]; + +varying vec3 colorChannel; + +void main() { + gl_FragColor = colorChannel.x * colors[0] + + colorChannel.y * colors[1] + + colorChannel.z * colors[2]; +}`]);d.bg=function(A){return u(A,b,g,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},9557:function(l,d,r){l.exports=x;var n=r(5827),u=r(2944),a=r(875),o=r(1943).f,c=window||i.global||{},s=c.__TEXT_CACHE||{};c.__TEXT_CACHE={};var b=3;function g(C,D,L,w){this.gl=C,this.shader=D,this.buffer=L,this.vao=w,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var A=g.prototype,v=[0,0];A.bind=function(C,D,L,w){this.vao.bind(),this.shader.bind();var M=this.shader.uniforms;M.model=C,M.view=D,M.projection=L,M.pixelScale=w,v[0]=this.gl.drawingBufferWidth,v[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=v},A.unbind=function(){this.vao.unbind()},A.update=function(C,D,L,w,M){var S=[];function f(B,W,q,re,ie,le){var he=s[q];he||(he=s[q]={});var $=he[W];$||($=he[W]=h(W,{triangles:!0,font:q,textAlign:"center",textBaseline:"middle",lineSpacing:ie,styletags:le}));for(var Z=(re||12)/12,K=$.positions,Q=$.cells,ae=0,fe=Q.length;ae=0;--ne){var ce=K[te[ne]];S.push(Z*ce[0],-Z*ce[1],B)}}for(var P=[0,0,0],E=[0,0,0],k=[0,0,0],O=[0,0,0],G=1.25,z={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},U=0;U<3;++U){k[U]=S.length/b|0,f(.5*(C[0][U]+C[1][U]),D[U],L[U],12,G,z),O[U]=(S.length/b|0)-k[U],P[U]=S.length/b|0;for(var H=0;H=0&&(b=c.length-s-1);var g=Math.pow(10,b),A=Math.round(a*o*g),v=A+"";if(v.indexOf("e")>=0)return v;var h=A/g,x=A%g;A<0?(h=-Math.ceil(h)|0,x=-x|0):(h=Math.floor(h)|0,x=x|0);var C=""+h;if(A<0&&(C="-"+C),b){for(var D=""+x;D.length=a[0][s];--g)b.push({x:g*o[s],text:r(o[s],g)});c.push(b)}return c}function u(a,o){for(var c=0;c<3;++c){if(a[c].length!==o[c].length)return!1;for(var s=0;sC)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return h.bufferSubData(x,w,L),C}function g(h,x){for(var C=n.malloc(h.length,x),D=h.length,L=0;L=0;--D){if(x[D]!==C)return!1;C*=h[D]}return!0}s.update=function(h,x){if(typeof x!="number"&&(x=-1),this.bind(),typeof h=="object"&&typeof h.shape<"u"){var C=h.dtype;if(o.indexOf(C)<0&&(C="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var D=gl.getExtension("OES_element_index_uint");D&&C!=="uint16"?C="uint32":C="uint16"}if(C===h.dtype&&A(h.shape,h.stride))h.offset===0&&h.data.length===h.shape[0]?this.length=b(this.gl,this.type,this.length,this.usage,h.data,x):this.length=b(this.gl,this.type,this.length,this.usage,h.data.subarray(h.offset,h.shape[0]),x);else{var L=n.malloc(h.size,C),w=a(L,h.shape);u.assign(w,h),x<0?this.length=b(this.gl,this.type,this.length,this.usage,L,x):this.length=b(this.gl,this.type,this.length,this.usage,L.subarray(0,h.size),x),n.free(L)}}else if(Array.isArray(h)){var M;this.type===this.gl.ELEMENT_ARRAY_BUFFER?M=g(h,"uint16"):M=g(h,"float32"),x<0?this.length=b(this.gl,this.type,this.length,this.usage,M,x):this.length=b(this.gl,this.type,this.length,this.usage,M.subarray(0,h.length),x),n.free(M)}else if(typeof h=="object"&&typeof h.length=="number")this.length=b(this.gl,this.type,this.length,this.usage,h,x);else if(typeof h=="number"||h===void 0){if(x>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");h=h|0,h<=0&&(h=1),this.gl.bufferData(this.type,h|0,this.usage),this.length=h}else throw new Error("gl-buffer: Invalid data type")};function v(h,x,C,D){if(C=C||h.ARRAY_BUFFER,D=D||h.DYNAMIC_DRAW,C!==h.ARRAY_BUFFER&&C!==h.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(D!==h.DYNAMIC_DRAW&&D!==h.STATIC_DRAW&&D!==h.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var L=h.createBuffer(),w=new c(h,C,L,0,D);return w.update(x),w}l.exports=v},1140:function(l,d,r){var n=r(2858);l.exports=function(a,o){var c=a.positions,s=a.vectors,b={positions:[],vertexIntensity:[],vertexIntensityBounds:a.vertexIntensityBounds,vectors:[],cells:[],coneOffset:a.coneOffset,colormap:a.colormap};if(a.positions.length===0)return o&&(o[0]=[0,0,0],o[1]=[0,0,0]),b;for(var g=0,A=1/0,v=-1/0,h=1/0,x=-1/0,C=1/0,D=-1/0,L=null,w=null,M=[],S=1/0,f=!1,P=0;Pg&&(g=n.length(k)),P){var O=2*n.distance(L,E)/(n.length(w)+n.length(k));O?(S=Math.min(S,O),f=!1):f=!0}f||(L=E,w=k),M.push(k)}var G=[A,h,C],z=[v,x,D];o&&(o[0]=G,o[1]=z),g===0&&(g=1);var U=1/g;isFinite(S)||(S=1),b.vectorScale=S;var H=a.coneSize||.5;a.absoluteConeSize&&(H=a.absoluteConeSize*U),b.coneScale=H;for(var P=0,B=0;P=1},h.isTransparent=function(){return this.opacity<1},h.pickSlots=1,h.setPickBase=function(M){this.pickId=M};function x(M){for(var S=g({colormap:M,nshades:256,format:"rgba"}),f=new Uint8Array(256*4),P=0;P<256;++P){for(var E=S[P],k=0;k<3;++k)f[4*P+k]=E[k];f[4*P+3]=E[3]*255}return b(f,[256,256,4],[4,0,1])}function C(M){for(var S=M.length,f=new Array(S),P=0;P0){var W=this.triShader;W.bind(),W.uniforms=G,this.triangleVAO.bind(),S.drawArrays(S.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},h.drawPick=function(M){M=M||{};for(var S=this.gl,f=M.model||A,P=M.view||A,E=M.projection||A,k=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],O=0;O<3;++O)k[0][O]=Math.max(k[0][O],this.clipBounds[0][O]),k[1][O]=Math.min(k[1][O],this.clipBounds[1][O]);this._model=[].slice.call(f),this._view=[].slice.call(P),this._projection=[].slice.call(E),this._resolution=[S.drawingBufferWidth,S.drawingBufferHeight];var G={model:f,view:P,projection:E,clipBounds:k,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},z=this.pickShader;z.bind(),z.uniforms=G,this.triangleCount>0&&(this.triangleVAO.bind(),S.drawArrays(S.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},h.pick=function(M){if(!M||M.id!==this.pickId)return null;var S=M.value[0]+256*M.value[1]+65536*M.value[2],f=this.cells[S],P=this.positions[f[1]].slice(0,3),E={position:P,dataCoordinate:P,index:Math.floor(f[1]/48)};return this.traceType==="cone"?E.index=Math.floor(f[1]/48):this.traceType==="streamtube"&&(E.intensity=this.intensity[f[1]],E.velocity=this.vectors[f[1]].slice(0,3),E.divergence=this.vectors[f[1]][3],E.index=S),E},h.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function D(M,S){var f=n(M,S.meshShader.vertex,S.meshShader.fragment,null,S.meshShader.attributes);return f.attributes.position.location=0,f.attributes.color.location=2,f.attributes.uv.location=3,f.attributes.vector.location=4,f}function L(M,S){var f=n(M,S.pickShader.vertex,S.pickShader.fragment,null,S.pickShader.attributes);return f.attributes.position.location=0,f.attributes.id.location=1,f.attributes.vector.location=4,f}function w(M,S,f){var P=f.shaders;arguments.length===1&&(S=M,M=S.gl);var E=D(M,P),k=L(M,P),O=o(M,b(new Uint8Array([255,255,255,255]),[1,1,4]));O.generateMipmap(),O.minFilter=M.LINEAR_MIPMAP_LINEAR,O.magFilter=M.LINEAR;var G=u(M),z=u(M),U=u(M),H=u(M),B=u(M),W=a(M,[{buffer:G,type:M.FLOAT,size:4},{buffer:B,type:M.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:U,type:M.FLOAT,size:4},{buffer:H,type:M.FLOAT,size:2},{buffer:z,type:M.FLOAT,size:4}]),q=new v(M,O,E,k,G,z,B,U,H,W,f.traceType||"cone");return q.update(S),q}l.exports=w},7234:function(l,d,r){var n=r(6832),u=n([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the cone vertex and normal at the given index. +// +// The returned vertex is for a cone with its top at origin and height of 1.0, +// pointing in the direction of the vector attribute. +// +// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. +// These vertices are used to make up the triangles of the cone by the following: +// segment + 0 top vertex +// segment + 1 perimeter vertex a+1 +// segment + 2 perimeter vertex a +// segment + 3 center base vertex +// segment + 4 perimeter vertex a +// segment + 5 perimeter vertex a+1 +// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. +// To go from index to segment, floor(index / 6) +// To go from segment to angle, 2*pi * (segment/segmentCount) +// To go from index to segment index, index - (segment*6) +// +vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { + + const float segmentCount = 8.0; + + float index = rawIndex - floor(rawIndex / + (segmentCount * 6.0)) * + (segmentCount * 6.0); + + float segment = floor(0.001 + index/6.0); + float segmentIndex = index - (segment*6.0); + + normal = -normalize(d); + + if (segmentIndex > 2.99 && segmentIndex < 3.01) { + return mix(vec3(0.0), -d, coneOffset); + } + + float nextAngle = ( + (segmentIndex > 0.99 && segmentIndex < 1.01) || + (segmentIndex > 4.99 && segmentIndex < 5.01) + ) ? 1.0 : 0.0; + float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); + + vec3 v1 = mix(d, vec3(0.0), coneOffset); + vec3 v2 = v1 - d; + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d)*0.25; + vec3 y = v * sin(angle) * length(d)*0.25; + vec3 v3 = v2 + x + y; + if (segmentIndex < 3.0) { + vec3 tx = u * sin(angle); + vec3 ty = v * -cos(angle); + vec3 tangent = tx + ty; + normal = normalize(cross(v3 - v1, tangent)); + } + + if (segmentIndex == 0.0) { + return mix(d, vec3(0.0), coneOffset); + } + return v3; +} + +attribute vec3 vector; +attribute vec4 color, position; +attribute vec2 uv; + +uniform float vectorScale, coneScale, coneOffset; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 eyePosition, lightPosition; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + // Scale the vector magnitude to stay constant with + // model & view changes. + vec3 normal; + vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal); + vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * conePosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + // vec4 m_position = model * vec4(conePosition, 1.0); + vec4 t_position = view * conePosition; + gl_Position = projection * t_position; + + f_color = color; + f_data = conePosition.xyz; + f_position = position.xyz; + f_uv = uv; +} +`]),a=n([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform sampler2D texture; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = f_color * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * opacity; +} +`]),o=n([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the cone vertex and normal at the given index. +// +// The returned vertex is for a cone with its top at origin and height of 1.0, +// pointing in the direction of the vector attribute. +// +// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. +// These vertices are used to make up the triangles of the cone by the following: +// segment + 0 top vertex +// segment + 1 perimeter vertex a+1 +// segment + 2 perimeter vertex a +// segment + 3 center base vertex +// segment + 4 perimeter vertex a +// segment + 5 perimeter vertex a+1 +// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. +// To go from index to segment, floor(index / 6) +// To go from segment to angle, 2*pi * (segment/segmentCount) +// To go from index to segment index, index - (segment*6) +// +vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { + + const float segmentCount = 8.0; + + float index = rawIndex - floor(rawIndex / + (segmentCount * 6.0)) * + (segmentCount * 6.0); + + float segment = floor(0.001 + index/6.0); + float segmentIndex = index - (segment*6.0); + + normal = -normalize(d); + + if (segmentIndex > 2.99 && segmentIndex < 3.01) { + return mix(vec3(0.0), -d, coneOffset); + } + + float nextAngle = ( + (segmentIndex > 0.99 && segmentIndex < 1.01) || + (segmentIndex > 4.99 && segmentIndex < 5.01) + ) ? 1.0 : 0.0; + float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); + + vec3 v1 = mix(d, vec3(0.0), coneOffset); + vec3 v2 = v1 - d; + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d)*0.25; + vec3 y = v * sin(angle) * length(d)*0.25; + vec3 v3 = v2 + x + y; + if (segmentIndex < 3.0) { + vec3 tx = u * sin(angle); + vec3 ty = v * -cos(angle); + vec3 tangent = tx + ty; + normal = normalize(cross(v3 - v1, tangent)); + } + + if (segmentIndex == 0.0) { + return mix(d, vec3(0.0), coneOffset); + } + return v3; +} + +attribute vec4 vector; +attribute vec4 position; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform float vectorScale, coneScale, coneOffset; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + vec3 normal; + vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal); + vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + gl_Position = projection * view * conePosition; + f_id = id; + f_position = position.xyz; +} +`]),c=n([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]);d.meshShader={vertex:u,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},d.pickShader={vertex:o,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},1950:function(l){l.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},6603:function(l,d,r){var n=r(1950);l.exports=function(a){return n[a]}},3110:function(l,d,r){l.exports=v;var n=r(5827),u=r(2944),a=r(7667),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function c(h,x,C,D){this.gl=h,this.shader=D,this.buffer=x,this.vao=C,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var s=c.prototype;s.isOpaque=function(){return!this.hasAlpha},s.isTransparent=function(){return this.hasAlpha},s.drawTransparent=s.draw=function(h){var x=this.gl,C=this.shader.uniforms;this.shader.bind();var D=C.view=h.view||o,L=C.projection=h.projection||o;C.model=h.model||o,C.clipBounds=this.clipBounds,C.opacity=this.opacity;var w=D[12],M=D[13],S=D[14],f=D[15],P=h._ortho||!1,E=P?2:1,k=E*this.pixelRatio*(L[3]*w+L[7]*M+L[11]*S+L[15]*f)/x.drawingBufferHeight;this.vao.bind();for(var O=0;O<3;++O)x.lineWidth(this.lineWidth[O]*this.pixelRatio),C.capSize=this.capSize[O]*k,this.lineCount[O]&&x.drawArrays(x.LINES,this.lineOffset[O],this.lineCount[O]);this.vao.unbind()};function b(h,x){for(var C=0;C<3;++C)h[0][C]=Math.min(h[0][C],x[C]),h[1][C]=Math.max(h[1][C],x[C])}var g=function(){for(var h=new Array(3),x=0;x<3;++x){for(var C=[],D=1;D<=2;++D)for(var L=-1;L<=1;L+=2){var w=(D+x)%3,M=[0,0,0];M[w]=L,C.push(M)}h[x]=C}return h}();function A(h,x,C,D){for(var L=g[D],w=0;w0){var G=P.slice();G[S]+=k[1][S],L.push(P[0],P[1],P[2],O[0],O[1],O[2],O[3],0,0,0,G[0],G[1],G[2],O[0],O[1],O[2],O[3],0,0,0),b(this.bounds,G),M+=2+A(L,G,O,S)}}}this.lineCount[S]=M-this.lineOffset[S]}this.buffer.update(L)}},s.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function v(h){var x=h.gl,C=n(x),D=u(x,[{buffer:C,type:x.FLOAT,size:3,offset:0,stride:40},{buffer:C,type:x.FLOAT,size:4,offset:12,stride:40},{buffer:C,type:x.FLOAT,size:3,offset:28,stride:40}]),L=a(x);L.attributes.position.location=0,L.attributes.color.location=1,L.attributes.offset.location=2;var w=new c(x,C,D,L);return w.update(h),w}},7667:function(l,d,r){var n=r(6832),u=r(5158),a=n([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position, offset; +attribute vec4 color; +uniform mat4 model, view, projection; +uniform float capSize; +varying vec4 fragColor; +varying vec3 fragPosition; + +void main() { + vec4 worldPosition = model * vec4(position, 1.0); + worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0); + gl_Position = projection * view * worldPosition; + fragColor = color; + fragPosition = position; +}`]),o=n([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float opacity; +varying vec3 fragPosition; +varying vec4 fragColor; + +void main() { + if ( + outOfRange(clipBounds[0], clipBounds[1], fragPosition) || + fragColor.a * opacity == 0. + ) discard; + + gl_FragColor = opacity * fragColor; +}`]);l.exports=function(c){return u(c,a,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},4234:function(l,d,r){var n=r(8931);l.exports=M;var u=null,a,o,c,s;function b(S){var f=S.getParameter(S.FRAMEBUFFER_BINDING),P=S.getParameter(S.RENDERBUFFER_BINDING),E=S.getParameter(S.TEXTURE_BINDING_2D);return[f,P,E]}function g(S,f){S.bindFramebuffer(S.FRAMEBUFFER,f[0]),S.bindRenderbuffer(S.RENDERBUFFER,f[1]),S.bindTexture(S.TEXTURE_2D,f[2])}function A(S,f){var P=S.getParameter(f.MAX_COLOR_ATTACHMENTS_WEBGL);u=new Array(P+1);for(var E=0;E<=P;++E){for(var k=new Array(P),O=0;O1&&z.drawBuffersWEBGL(u[G]);var q=P.getExtension("WEBGL_depth_texture");q?U?S.depth=h(P,k,O,q.UNSIGNED_INT_24_8_WEBGL,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):H&&(S.depth=h(P,k,O,P.UNSIGNED_SHORT,P.DEPTH_COMPONENT,P.DEPTH_ATTACHMENT)):H&&U?S._depth_rb=x(P,k,O,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):H?S._depth_rb=x(P,k,O,P.DEPTH_COMPONENT16,P.DEPTH_ATTACHMENT):U&&(S._depth_rb=x(P,k,O,P.STENCIL_INDEX,P.STENCIL_ATTACHMENT));var re=P.checkFramebufferStatus(P.FRAMEBUFFER);if(re!==P.FRAMEBUFFER_COMPLETE){S._destroyed=!0,P.bindFramebuffer(P.FRAMEBUFFER,null),P.deleteFramebuffer(S.handle),S.handle=null,S.depth&&(S.depth.dispose(),S.depth=null),S._depth_rb&&(P.deleteRenderbuffer(S._depth_rb),S._depth_rb=null);for(var W=0;Wk||P<0||P>k)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");S._shape[0]=f,S._shape[1]=P;for(var O=b(E),G=0;GO||P<0||P>O)throw new Error("gl-fbo: Parameters are too large for FBO");E=E||{};var G=1;if("color"in E){if(G=Math.max(E.color|0,0),G<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(G>1)if(k){if(G>S.getParameter(k.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+G+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var z=S.UNSIGNED_BYTE,U=S.getExtension("OES_texture_float");if(E.float&&G>0){if(!U)throw new Error("gl-fbo: Context does not support floating point textures");z=S.FLOAT}else E.preferFloat&&G>0&&U&&(z=S.FLOAT);var H=!0;"depth"in E&&(H=!!E.depth);var B=!1;return"stencil"in E&&(B=!!E.stencil),new D(S,f,P,z,G,H,B,k)}},3530:function(l,d,r){var n=r(8974).sprintf,u=r(6603),a=r(9365),o=r(8008);l.exports=c;function c(s,b,g){var A=a(b)||"of unknown name (see npm glsl-shader-name)",v="unknown type";g!==void 0&&(v=g===u.FRAGMENT_SHADER?"fragment":"vertex");for(var h=n(`Error compiling %s shader %s: +`,v,A),x=n("%s%s",h,s),C=s.split(` +`),D={},L=0;L>G*8&255;this.pickOffset=C,L.bind();var z=L.uniforms;z.viewTransform=h,z.pickOffset=x,z.shape=this.shape;var U=L.attributes;return this.positionBuffer.bind(),U.position.pointer(),this.weightBuffer.bind(),U.weight.pointer(S.UNSIGNED_BYTE,!1),this.idBuffer.bind(),U.pickId.pointer(S.UNSIGNED_BYTE,!1),S.drawArrays(S.TRIANGLES,0,M),C+this.shape[0]*this.shape[1]}}}(),g.pick=function(h,x,C){var D=this.pickOffset,L=this.shape[0]*this.shape[1];if(C=D+L)return null;var w=C-D,M=this.xData,S=this.yData;return{object:this,pointId:w,dataCoord:[M[w%this.shape[0]],S[w/this.shape[0]|0]]}},g.update=function(h){h=h||{};var x=h.shape||[0,0],C=h.x||u(x[0]),D=h.y||u(x[1]),L=h.z||new Float32Array(x[0]*x[1]),w=h.zsmooth!==!1;this.xData=C,this.yData=D;var M=h.colorLevels||[0],S=h.colorValues||[0,0,0,1],f=M.length,P=this.bounds,E,k,O,G;w?(E=P[0]=C[0],k=P[1]=D[0],O=P[2]=C[C.length-1],G=P[3]=D[D.length-1]):(E=P[0]=C[0]+(C[1]-C[0])/2,k=P[1]=D[0]+(D[1]-D[0])/2,O=P[2]=C[C.length-1]+(C[C.length-1]-C[C.length-2])/2,G=P[3]=D[D.length-1]+(D[D.length-1]-D[D.length-2])/2);var z=1/(O-E),U=1/(G-k),H=x[0],B=x[1];this.shape=[H,B];var W=(w?(H-1)*(B-1):H*B)*(A.length>>>1);this.numVertices=W;for(var q=a.mallocUint8(W*4),re=a.mallocFloat32(W*2),ie=a.mallocUint8(W*2),le=a.mallocUint32(W),he=0,$=w?H-1:H,Z=w?B-1:B,K=0;K max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform sampler2D dashTexture; +uniform float dashScale; +uniform float opacity; + +varying vec3 worldPosition; +varying float pixelArcLength; +varying vec4 fragColor; + +void main() { + if ( + outOfRange(clipBounds[0], clipBounds[1], worldPosition) || + fragColor.a * opacity == 0. + ) discard; + + float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r; + if(dashWeight < 0.5) { + discard; + } + gl_FragColor = fragColor * opacity; +} +`]),c=n([`precision highp float; +#define GLSLIFY 1 + +#define FLOAT_MAX 1.70141184e38 +#define FLOAT_MIN 1.17549435e-38 + +// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl +vec4 packFloat(float v) { + float av = abs(v); + + //Handle special cases + if(av < FLOAT_MIN) { + return vec4(0.0, 0.0, 0.0, 0.0); + } else if(v > FLOAT_MAX) { + return vec4(127.0, 128.0, 0.0, 0.0) / 255.0; + } else if(v < -FLOAT_MAX) { + return vec4(255.0, 128.0, 0.0, 0.0) / 255.0; + } + + vec4 c = vec4(0,0,0,0); + + //Compute exponent and mantissa + float e = floor(log2(av)); + float m = av * pow(2.0, -e) - 1.0; + + //Unpack mantissa + c[1] = floor(128.0 * m); + m -= c[1] / 128.0; + c[2] = floor(32768.0 * m); + m -= c[2] / 32768.0; + c[3] = floor(8388608.0 * m); + + //Unpack exponent + float ebias = e + 127.0; + c[0] = floor(ebias / 2.0); + ebias -= c[0] * 2.0; + c[1] += floor(ebias) * 128.0; + + //Unpack sign bit + c[0] += 128.0 * step(0.0, -v); + + //Scale back to range + return c / 255.0; +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform float pickId; +uniform vec3 clipBounds[2]; + +varying vec3 worldPosition; +varying float pixelArcLength; +varying vec4 fragColor; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard; + + gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz); +}`]),s=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];d.createShader=function(b){return u(b,a,o,null,s)},d.createPickShader=function(b){return u(b,a,c,null,s)}},6086:function(l,d,r){l.exports=S;var n=r(5827),u=r(2944),a=r(8931),o=new Uint8Array(4),c=new Float32Array(o.buffer);function s(f,P,E,k){return o[0]=k,o[1]=E,o[2]=P,o[3]=f,c[0]}var b=r(5070),g=r(5050),A=r(248),v=A.createShader,h=A.createPickShader,x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function C(f,P){for(var E=0,k=0;k<3;++k){var O=f[k]-P[k];E+=O*O}return Math.sqrt(E)}function D(f){for(var P=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],E=0;E<3;++E)P[0][E]=Math.max(f[0][E],P[0][E]),P[1][E]=Math.min(f[1][E],P[1][E]);return P}function L(f,P,E,k){this.arcLength=f,this.position=P,this.index=E,this.dataCoordinate=k}function w(f,P,E,k,O,G){this.gl=f,this.shader=P,this.pickShader=E,this.buffer=k,this.vao=O,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=G,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var M=w.prototype;M.isTransparent=function(){return this.hasAlpha},M.isOpaque=function(){return!this.hasAlpha},M.pickSlots=1,M.setPickBase=function(f){this.pickId=f},M.drawTransparent=M.draw=function(f){if(!!this.vertexCount){var P=this.gl,E=this.shader,k=this.vao;E.bind(),E.uniforms={model:f.model||x,view:f.view||x,projection:f.projection||x,clipBounds:D(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[P.drawingBufferWidth,P.drawingBufferHeight],pixelRatio:this.pixelRatio},k.bind(),k.draw(P.TRIANGLE_STRIP,this.vertexCount),k.unbind()}},M.drawPick=function(f){if(!!this.vertexCount){var P=this.gl,E=this.pickShader,k=this.vao;E.bind(),E.uniforms={model:f.model||x,view:f.view||x,projection:f.projection||x,pickId:this.pickId,clipBounds:D(this.clipBounds),screenShape:[P.drawingBufferWidth,P.drawingBufferHeight],pixelRatio:this.pixelRatio},k.bind(),k.draw(P.TRIANGLE_STRIP,this.vertexCount),k.unbind()}},M.update=function(f){var P,E;this.dirty=!0;var k=!!f.connectGaps;"dashScale"in f&&(this.dashScale=f.dashScale),this.hasAlpha=!1,"opacity"in f&&(this.opacity=+f.opacity,this.opacity<1&&(this.hasAlpha=!0));var O=[],G=[],z=[],U=0,H=0,B=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],W=f.position||f.positions;if(W){var q=f.color||f.colors||[0,0,0,1],re=f.lineWidth||1,ie=!1;e:for(P=1;P0){for(var $=0;$<24;++$)O.push(O[O.length-12]);H+=2,ie=!0}continue e}B[0][E]=Math.min(B[0][E],le[E],he[E]),B[1][E]=Math.max(B[1][E],le[E],he[E])}var Z,K;Array.isArray(q[0])?(Z=q.length>P-1?q[P-1]:q.length>0?q[q.length-1]:[0,0,0,1],K=q.length>P?q[P]:q.length>0?q[q.length-1]:[0,0,0,1]):Z=K=q,Z.length===3&&(Z=[Z[0],Z[1],Z[2],1]),K.length===3&&(K=[K[0],K[1],K[2],1]),!this.hasAlpha&&Z[3]<1&&(this.hasAlpha=!0);var Q;Array.isArray(re)?Q=re.length>P-1?re[P-1]:re.length>0?re[re.length-1]:[0,0,0,1]:Q=re;var ae=U;if(U+=C(le,he),ie){for(E=0;E<2;++E)O.push(le[0],le[1],le[2],he[0],he[1],he[2],ae,Q,Z[0],Z[1],Z[2],Z[3]);H+=2,ie=!1}O.push(le[0],le[1],le[2],he[0],he[1],he[2],ae,Q,Z[0],Z[1],Z[2],Z[3],le[0],le[1],le[2],he[0],he[1],he[2],ae,-Q,Z[0],Z[1],Z[2],Z[3],he[0],he[1],he[2],le[0],le[1],le[2],U,-Q,K[0],K[1],K[2],K[3],he[0],he[1],he[2],le[0],le[1],le[2],U,Q,K[0],K[1],K[2],K[3]),H+=4}}if(this.buffer.update(O),G.push(U),z.push(W[W.length-1].slice()),this.bounds=B,this.vertexCount=H,this.points=z,this.arcLength=G,"dashes"in f){var fe=f.dashes,te=fe.slice();for(te.unshift(0),P=1;P1.0001)return null;E+=P[L]}return Math.abs(E-1)>.001?null:[w,s(g,P),P]}},2056:function(l,d,r){var n=r(6832),u=n([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position, normal; +attribute vec4 color; +attribute vec2 uv; + +uniform mat4 model + , view + , projection + , inverseModel; +uniform vec3 eyePosition + , lightPosition; + +varying vec3 f_normal + , f_lightDirection + , f_eyeDirection + , f_data; +varying vec4 f_color; +varying vec2 f_uv; + +vec4 project(vec3 p) { + return projection * view * model * vec4(p, 1.0); +} + +void main() { + gl_Position = project(position); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * vec4(position , 1.0); + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + f_color = color; + f_data = position; + f_uv = uv; +} +`]),a=n([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness + , fresnel + , kambient + , kdiffuse + , kspecular; +uniform sampler2D texture; + +varying vec3 f_normal + , f_lightDirection + , f_eyeDirection + , f_data; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (f_color.a == 0.0 || + outOfRange(clipBounds[0], clipBounds[1], f_data) + ) discard; + + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d + + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * f_color.a; +} +`]),o=n([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec4 color; +attribute vec2 uv; + +uniform mat4 model, view, projection; + +varying vec4 f_color; +varying vec3 f_data; +varying vec2 f_uv; + +void main() { + gl_Position = projection * view * model * vec4(position, 1.0); + f_color = color; + f_data = position; + f_uv = uv; +}`]),c=n([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform sampler2D texture; +uniform float opacity; + +varying vec4 f_color; +varying vec3 f_data; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; + + gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; +}`]),s=n([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 uv; +attribute float pointSize; + +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0); + } else { + gl_Position = projection * view * model * vec4(position, 1.0); + } + gl_PointSize = pointSize; + f_color = color; + f_uv = uv; +}`]),b=n([`precision highp float; +#define GLSLIFY 1 + +uniform sampler2D texture; +uniform float opacity; + +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5); + if(dot(pointR, pointR) > 0.25) { + discard; + } + gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; +}`]),g=n([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec4 id; + +uniform mat4 model, view, projection; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + gl_Position = projection * view * model * vec4(position, 1.0); + f_id = id; + f_position = position; +}`]),A=n([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]),v=n([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute float pointSize; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0.0, 0.0, 0.0, 0.0); + } else { + gl_Position = projection * view * model * vec4(position, 1.0); + gl_PointSize = pointSize; + } + f_id = id; + f_position = position; +}`]),h=n([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; + +uniform mat4 model, view, projection; + +void main() { + gl_Position = projection * view * model * vec4(position, 1.0); +}`]),x=n([`precision highp float; +#define GLSLIFY 1 + +uniform vec3 contourColor; + +void main() { + gl_FragColor = vec4(contourColor, 1.0); +} +`]);d.meshShader={vertex:u,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},d.wireShader={vertex:o,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},d.pointShader={vertex:s,fragment:b,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},d.pickShader={vertex:g,fragment:A,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},d.pointPickShader={vertex:v,fragment:A,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},d.contourShader={vertex:h,fragment:x,attributes:[{name:"position",type:"vec3"}]}},8116:function(l,d,r){var n=1e-6,u=1e-6,a=r(5158),o=r(5827),c=r(2944),s=r(8931),b=r(115),g=r(104),A=r(7437),v=r(5050),h=r(9156),x=r(7212),C=r(5306),D=r(2056),L=r(4340),w=D.meshShader,M=D.wireShader,S=D.pointShader,f=D.pickShader,P=D.pointPickShader,E=D.contourShader,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function O($,Z,K,Q,ae,fe,te,ne,ce,oe,de,we,Se,Te,Fe,Ie,Me,Ae,De,ke,We,_e,Ye,Pe,Ve,Ze,Ke){this.gl=$,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=Z,this.dirty=!0,this.triShader=K,this.lineShader=Q,this.pointShader=ae,this.pickShader=fe,this.pointPickShader=te,this.contourShader=ne,this.trianglePositions=ce,this.triangleColors=de,this.triangleNormals=Se,this.triangleUVs=we,this.triangleIds=oe,this.triangleVAO=Te,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Fe,this.edgeColors=Me,this.edgeUVs=Ae,this.edgeIds=Ie,this.edgeVAO=De,this.edgeCount=0,this.pointPositions=ke,this.pointColors=_e,this.pointUVs=Ye,this.pointSizes=Pe,this.pointIds=We,this.pointVAO=Ve,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Ze,this.contourVAO=Ke,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=k,this._view=k,this._projection=k,this._resolution=[1,1]}var G=O.prototype;G.isOpaque=function(){return!this.hasAlpha},G.isTransparent=function(){return this.hasAlpha},G.pickSlots=1,G.setPickBase=function($){this.pickId=$};function z($,Z){if(!Z||!Z.length)return 1;for(var K=0;K$&&K>0){var Q=(Z[K][0]-$)/(Z[K][0]-Z[K-1][0]);return Z[K][1]*(1-Q)+Q*Z[K-1][1]}}return 1}function U($,Z){for(var K=h({colormap:$,nshades:256,format:"rgba"}),Q=new Uint8Array(256*4),ae=0;ae<256;++ae){for(var fe=K[ae],te=0;te<3;++te)Q[4*ae+te]=fe[te];Z?Q[4*ae+3]=255*z(ae/255,Z):Q[4*ae+3]=255*fe[3]}return v(Q,[256,256,4],[4,0,1])}function H($){for(var Z=$.length,K=new Array(Z),Q=0;Q0){var Se=this.triShader;Se.bind(),Se.uniforms=ne,this.triangleVAO.bind(),Z.drawArrays(Z.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Se=this.lineShader;Se.bind(),Se.uniforms=ne,this.edgeVAO.bind(),Z.lineWidth(this.lineWidth*this.pixelRatio),Z.drawArrays(Z.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Se=this.pointShader;Se.bind(),Se.uniforms=ne,this.pointVAO.bind(),Z.drawArrays(Z.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Se=this.contourShader;Se.bind(),Se.uniforms=ne,this.contourVAO.bind(),Z.drawArrays(Z.LINES,0,this.contourCount),this.contourVAO.unbind()}},G.drawPick=function($){$=$||{};for(var Z=this.gl,K=$.model||k,Q=$.view||k,ae=$.projection||k,fe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],te=0;te<3;++te)fe[0][te]=Math.max(fe[0][te],this.clipBounds[0][te]),fe[1][te]=Math.min(fe[1][te],this.clipBounds[1][te]);this._model=[].slice.call(K),this._view=[].slice.call(Q),this._projection=[].slice.call(ae),this._resolution=[Z.drawingBufferWidth,Z.drawingBufferHeight];var ne={model:K,view:Q,projection:ae,clipBounds:fe,pickId:this.pickId/255},ce=this.pickShader;if(ce.bind(),ce.uniforms=ne,this.triangleCount>0&&(this.triangleVAO.bind(),Z.drawArrays(Z.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),Z.lineWidth(this.lineWidth*this.pixelRatio),Z.drawArrays(Z.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ce=this.pointPickShader;ce.bind(),ce.uniforms=ne,this.pointVAO.bind(),Z.drawArrays(Z.POINTS,0,this.pointCount),this.pointVAO.unbind()}},G.pick=function($){if(!$||$.id!==this.pickId)return null;for(var Z=$.value[0]+256*$.value[1]+65536*$.value[2],K=this.cells[Z],Q=this.positions,ae=new Array(K.length),fe=0;few[ie]&&(D.uniforms.dataAxis=A,D.uniforms.screenOffset=v,D.uniforms.color=G[x],D.uniforms.angle=z[x],M.drawArrays(M.TRIANGLES,w[ie],w[le]-w[ie]))),U[x]&&re&&(v[x^1]-=he*E*H[x],D.uniforms.dataAxis=h,D.uniforms.screenOffset=v,D.uniforms.color=B[x],D.uniforms.angle=W[x],M.drawArrays(M.TRIANGLES,q,re)),v[x^1]=he*S[2+(x^1)]-1,k[x+2]&&(v[x^1]+=he*E*O[x+2],iew[ie]&&(D.uniforms.dataAxis=A,D.uniforms.screenOffset=v,D.uniforms.color=G[x+2],D.uniforms.angle=z[x+2],M.drawArrays(M.TRIANGLES,w[ie],w[le]-w[ie]))),U[x+2]&&re&&(v[x^1]+=he*E*H[x+2],D.uniforms.dataAxis=h,D.uniforms.screenOffset=v,D.uniforms.color=B[x+2],D.uniforms.angle=W[x+2],M.drawArrays(M.TRIANGLES,q,re))}}(),b.drawTitle=function(){var A=[0,0],v=[0,0];return function(){var h=this.plot,x=this.shader,C=h.gl,D=h.screenBox,L=h.titleCenter,w=h.titleAngle,M=h.titleColor,S=h.pixelRatio;if(!!this.titleCount){for(var f=0;f<2;++f)v[f]=2*(L[f]*S-D[f])/(D[2+f]-D[f])-1;x.bind(),x.uniforms.dataAxis=A,x.uniforms.screenOffset=v,x.uniforms.angle=w,x.uniforms.color=M,C.drawArrays(C.TRIANGLES,this.titleOffset,this.titleCount)}}}(),b.bind=function(){var A=[0,0],v=[0,0],h=[0,0];return function(){var x=this.plot,C=this.shader,D=x._tickBounds,L=x.dataBox,w=x.screenBox,M=x.viewBox;C.bind();for(var S=0;S<2;++S){var f=D[S],P=D[S+2],E=P-f,k=.5*(L[S+2]+L[S]),O=L[S+2]-L[S],G=M[S],z=M[S+2],U=z-G,H=w[S],B=w[S+2],W=B-H;v[S]=2*E/O*U/W,A[S]=2*(f-k)/O*U/W}h[1]=2*x.pixelRatio/(w[3]-w[1]),h[0]=h[1]*(w[3]-w[1])/(w[2]-w[0]),C.uniforms.dataScale=v,C.uniforms.dataShift=A,C.uniforms.textScale=h,this.vbo.bind(),C.attributes.textCoordinate.pointer()}}(),b.update=function(A){var v=[],h=A.ticks,x=A.bounds,C,D,L,w,M;for(M=0;M<2;++M){var S=[Math.floor(v.length/3)],f=[-1/0],P=h[M];for(C=0;C=0))){var U=x[z]-D[z]*(x[z+2]-x[z])/(D[z+2]-D[z]);z===0?M.drawLine(U,x[1],U,x[3],G[z],O[z]):M.drawLine(x[0],U,x[2],U,G[z],O[z])}}for(var z=0;z=0;--h)this.objects[h].dispose();this.objects.length=0;for(var h=this.overlays.length-1;h>=0;--h)this.overlays[h].dispose();this.overlays.length=0,this.gl=null},b.addObject=function(h){this.objects.indexOf(h)<0&&(this.objects.push(h),this.setDirty())},b.removeObject=function(h){for(var x=this.objects,C=0;CMath.abs(f))h.rotate(k,0,0,-S*P*Math.PI*w.rotateSpeed/window.innerWidth);else if(!w._ortho){var O=-w.zoomSpeed*E*f/window.innerHeight*(k-h.lastT())/20;h.pan(k,0,0,C*(Math.exp(O)-1))}}},!0)},w.enableMouseListeners(),w}},8245:function(l,d,r){var n=r(6832),u=r(5158),a=n([`precision mediump float; +#define GLSLIFY 1 +attribute vec2 position; +varying vec2 uv; +void main() { + uv = position; + gl_Position = vec4(position, 0, 1); +}`]),o=n([`precision mediump float; +#define GLSLIFY 1 + +uniform sampler2D accumBuffer; +varying vec2 uv; + +void main() { + vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); + gl_FragColor = min(vec4(1,1,1,1), accum); +}`]);l.exports=function(c){return u(c,a,o,null,[{name:"position",type:"vec2"}])}},1059:function(l,d,r){var n=r(4296),u=r(7453),a=r(2771),o=r(6496),c=r(2611),s=r(4234),b=r(8126),g=r(6145),A=r(1120),v=r(5268),h=r(8245),x=r(2321)({tablet:!0,featureDetect:!0});l.exports={createScene:M,createCamera:n};function C(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function D(f,P){var E=null;try{E=f.getContext("webgl",P),E||(E=f.getContext("experimental-webgl",P))}catch{return null}return E}function L(f){var P=Math.round(Math.log(Math.abs(f))/Math.log(10));if(P<0){var E=Math.round(Math.pow(10,-P));return Math.ceil(f*E)/E}else if(P>0){var E=Math.round(Math.pow(10,P));return Math.ceil(f/E)*E}return Math.ceil(f)}function w(f){return typeof f=="boolean"?f:!0}function M(f){f=f||{},f.camera=f.camera||{};var P=f.canvas;if(!P)if(P=document.createElement("canvas"),f.container){var E=f.container;E.appendChild(P)}else document.body.appendChild(P);var k=f.gl;if(k||(f.glOptions&&(x=!!f.glOptions.preserveDrawingBuffer),k=D(P,f.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:x})),!k)throw new Error("webgl not supported");var O=f.bounds||[[-10,-10,-10],[10,10,10]],G=new C,z=s(k,k.drawingBufferWidth,k.drawingBufferHeight,{preferFloat:!x}),U=h(k),H=f.cameraObject&&f.cameraObject._ortho===!0||f.camera.projection&&f.camera.projection.type==="orthographic"||!1,B={eye:f.camera.eye||[2,0,0],center:f.camera.center||[0,0,0],up:f.camera.up||[0,1,0],zoomMin:f.camera.zoomMax||.1,zoomMax:f.camera.zoomMin||100,mode:f.camera.mode||"turntable",_ortho:H},W=f.axes||{},q=u(k,W);q.enable=!W.disable;var re=f.spikes||{},ie=o(k,re),le=[],he=[],$=[],Z=[],K=!0,te=!0,Q=new Array(16),ae=new Array(16),fe={view:null,projection:Q,model:ae,_ortho:!1},te=!0,ne=[k.drawingBufferWidth,k.drawingBufferHeight],ce=f.cameraObject||n(P,B),oe={gl:k,contextLost:!1,pixelRatio:f.pixelRatio||1,canvas:P,selection:G,camera:ce,axes:q,axesPixels:null,spikes:ie,bounds:O,objects:le,shape:ne,aspect:f.aspectRatio||[1,1,1],pickRadius:f.pickRadius||10,zNear:f.zNear||.01,zFar:f.zFar||1e3,fovy:f.fovy||Math.PI/4,clearColor:f.clearColor||[0,0,0,0],autoResize:w(f.autoResize),autoBounds:w(f.autoBounds),autoScale:!!f.autoScale,autoCenter:w(f.autoCenter),clipToBounds:w(f.clipToBounds),snapToData:!!f.snapToData,onselect:f.onselect||null,onrender:f.onrender||null,onclick:f.onclick||null,cameraParams:fe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(ke){this.aspect[0]=ke.x,this.aspect[1]=ke.y,this.aspect[2]=ke.z,te=!0},setBounds:function(ke,We){this.bounds[0][ke]=We.min,this.bounds[1][ke]=We.max},setClearColor:function(ke){this.clearColor=ke},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},de=[k.drawingBufferWidth/oe.pixelRatio|0,k.drawingBufferHeight/oe.pixelRatio|0];function we(){if(!oe._stopped&&!!oe.autoResize){var ke=P.parentNode,We=1,_e=1;ke&&ke!==document.body?(We=ke.clientWidth,_e=ke.clientHeight):(We=window.innerWidth,_e=window.innerHeight);var Ye=Math.ceil(We*oe.pixelRatio)|0,Pe=Math.ceil(_e*oe.pixelRatio)|0;if(Ye!==P.width||Pe!==P.height){P.width=Ye,P.height=Pe;var Ve=P.style;Ve.position=Ve.position||"absolute",Ve.left="0px",Ve.top="0px",Ve.width=We+"px",Ve.height=_e+"px",K=!0}}}oe.autoResize&&we(),window.addEventListener("resize",we);function Se(){for(var ke=le.length,We=Z.length,_e=0;_e0&&$[We-1]===0;)$.pop(),Z.pop().dispose()}oe.update=function(ke){oe._stopped||(K=!0,te=!0)},oe.add=function(ke){oe._stopped||(ke.axes=q,le.push(ke),he.push(-1),K=!0,te=!0,Se())},oe.remove=function(ke){if(!oe._stopped){var We=le.indexOf(ke);We<0||(le.splice(We,1),he.pop(),K=!0,te=!0,Se())}},oe.dispose=function(){if(!oe._stopped&&(oe._stopped=!0,window.removeEventListener("resize",we),P.removeEventListener("webglcontextlost",Te),oe.mouseListener.enabled=!1,!oe.contextLost)){q.dispose(),ie.dispose();for(var ke=0;keG.distance)continue;for(var vt=0;vt 1.0) { + discard; + } + baseColor = mix(borderColor, color, step(radius, centerFraction)); + gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a); + } +} +`]),d.pickVertex=n([`precision mediump float; +#define GLSLIFY 1 + +attribute vec2 position; +attribute vec4 pickId; + +uniform mat3 matrix; +uniform float pointSize; +uniform vec4 pickOffset; + +varying vec4 fragId; + +void main() { + vec3 hgPosition = matrix * vec3(position, 1); + gl_Position = vec4(hgPosition.xy, 0, hgPosition.z); + gl_PointSize = pointSize; + + vec4 id = pickId + pickOffset; + id.y += floor(id.x / 256.0); + id.x -= floor(id.x / 256.0) * 256.0; + + id.z += floor(id.y / 256.0); + id.y -= floor(id.y / 256.0) * 256.0; + + id.w += floor(id.z / 256.0); + id.z -= floor(id.z / 256.0) * 256.0; + + fragId = id; +} +`]),d.pickFragment=n([`precision mediump float; +#define GLSLIFY 1 + +varying vec4 fragId; + +void main() { + float radius = length(2.0 * gl_PointCoord.xy - 1.0); + if(radius > 1.0) { + discard; + } + gl_FragColor = fragId / 255.0; +} +`])},8271:function(l,d,r){var n=r(5158),u=r(5827),a=r(5306),o=r(8023);l.exports=g;function c(A,v,h,x,C){this.plot=A,this.offsetBuffer=v,this.pickBuffer=h,this.shader=x,this.pickShader=C,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}var s=c.prototype;s.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},s.update=function(A){var v;A=A||{};function h(S,f){return S in A?A[S]:f}this.sizeMin=h("sizeMin",.5),this.sizeMax=h("sizeMax",20),this.color=h("color",[1,0,0,1]).slice(),this.areaRatio=h("areaRatio",1),this.borderColor=h("borderColor",[0,0,0,1]).slice(),this.blend=h("blend",!1);var x=A.positions.length>>>1,C=A.positions instanceof Float32Array,D=A.idToIndex instanceof Int32Array&&A.idToIndex.length>=x,L=A.positions,w=C?L:a.mallocFloat32(L.length),M=D?A.idToIndex:a.mallocInt32(x);if(C||w.set(L),!D)for(w.set(L),v=0;v>>1,C;for(C=0;C=v[0]&&D<=v[2]&&L>=v[1]&&L<=v[3]&&h++}return h}s.unifiedDraw=function(){var A=[1,0,0,0,1,0,0,0,1],v=[0,0,0,0];return function(h){var x=h!==void 0,C=x?this.pickShader:this.shader,D=this.plot.gl,L=this.plot.dataBox;if(this.pointCount===0)return h;var w=L[2]-L[0],M=L[3]-L[1],S=b(this.points,L),f=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(S,.33333)));A[0]=2/w,A[4]=2/M,A[6]=-2*L[0]/w-1,A[7]=-2*L[1]/M-1,this.offsetBuffer.bind(),C.bind(),C.attributes.position.pointer(),C.uniforms.matrix=A,C.uniforms.color=this.color,C.uniforms.borderColor=this.borderColor,C.uniforms.pointCloud=f<5,C.uniforms.pointSize=f,C.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),x&&(v[0]=h&255,v[1]=h>>8&255,v[2]=h>>16&255,v[3]=h>>24&255,this.pickBuffer.bind(),C.attributes.pickId.pointer(D.UNSIGNED_BYTE),C.uniforms.pickOffset=v,this.pickOffset=h);var P=D.getParameter(D.BLEND),E=D.getParameter(D.DITHER);return P&&!this.blend&&D.disable(D.BLEND),E&&D.disable(D.DITHER),D.drawArrays(D.POINTS,0,this.pointCount),P&&!this.blend&&D.enable(D.BLEND),E&&D.enable(D.DITHER),h+this.pointCount}}(),s.draw=s.unifiedDraw,s.drawPick=s.unifiedDraw,s.pick=function(A,v,h){var x=this.pickOffset,C=this.pointCount;if(h=x+C)return null;var D=h-x,L=this.points;return{object:this,pointId:D,dataCoord:[L[2*D],L[2*D+1]]}};function g(A,v){var h=A.gl,x=u(h),C=u(h),D=n(h,o.pointVertex,o.pointFragment),L=n(h,o.pickVertex,o.pickFragment),w=new c(A,x,C,D,L);return w.update(v),A.addObject(w),w}},6093:function(l){l.exports=d;function d(r,n,u,a){var o=n[0],c=n[1],s=n[2],b=n[3],g=u[0],A=u[1],v=u[2],h=u[3],x,C,D,L,w;return C=o*g+c*A+s*v+b*h,C<0&&(C=-C,g=-g,A=-A,v=-v,h=-h),1-C>1e-6?(x=Math.acos(C),D=Math.sin(x),L=Math.sin((1-a)*x)/D,w=Math.sin(a*x)/D):(L=1-a,w=a),r[0]=L*o+w*g,r[1]=L*c+w*A,r[2]=L*s+w*v,r[3]=L*b+w*h,r}},8240:function(l){l.exports=function(d){return!d&&d!==0?"":d.toString()}},4123:function(l,d,r){var n=r(875);l.exports=a;var u={};function a(o,c,s){var b=u[c];if(b||(b=u[c]={}),o in b)return b[o];var g={textAlign:"center",textBaseline:"middle",lineHeight:1,font:c,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};g.triangles=!0;var A=n(o,g);g.triangles=!1;var v=n(o,g),h,x;if(s&&s!==1){for(h=0;h max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform vec4 highlightId; +uniform float highlightScale; +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float scale = 1.0; + if(distance(highlightId, id) < 0.0001) { + scale = highlightScale; + } + + vec4 worldPosition = model * vec4(position, 1); + vec4 viewPosition = view * worldPosition; + viewPosition = viewPosition / viewPosition.w; + vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0)); + + gl_Position = clipPosition; + interpColor = color; + pickId = id; + dataCoordinate = position; + } +}`]),o=u([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform vec2 screenSize; +uniform vec3 clipBounds[2]; +uniform float highlightScale, pixelRatio; +uniform vec4 highlightId; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float scale = pixelRatio; + if(distance(highlightId.bgr, id.bgr) < 0.001) { + scale *= highlightScale; + } + + vec4 worldPosition = model * vec4(position, 1.0); + vec4 viewPosition = view * worldPosition; + vec4 clipPosition = projection * viewPosition; + clipPosition /= clipPosition.w; + + gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0); + interpColor = color; + pickId = id; + dataCoordinate = position; + } +}`]),c=u([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform float highlightScale; +uniform vec4 highlightId; +uniform vec3 axes[2]; +uniform mat4 model, view, projection; +uniform vec2 screenSize; +uniform vec3 clipBounds[2]; +uniform float scale, pixelRatio; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float lscale = pixelRatio * scale; + if(distance(highlightId, id) < 0.0001) { + lscale *= highlightScale; + } + + vec4 clipCenter = projection * view * model * vec4(position, 1); + vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y; + vec4 clipPosition = projection * view * model * vec4(dataPosition, 1); + + gl_Position = clipPosition; + interpColor = color; + pickId = id; + dataCoordinate = dataPosition; + } +} +`]),s=u([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 fragClipBounds[2]; +uniform float opacity; + +varying vec4 interpColor; +varying vec3 dataCoordinate; + +void main() { + if ( + outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) || + interpColor.a * opacity == 0. + ) discard; + gl_FragColor = interpColor * opacity; +} +`]),b=u([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 fragClipBounds[2]; +uniform float pickGroup; + +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard; + + gl_FragColor = vec4(pickGroup, pickId.bgr); +}`]),g=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],A={vertex:a,fragment:s,attributes:g},v={vertex:o,fragment:s,attributes:g},h={vertex:c,fragment:s,attributes:g},x={vertex:a,fragment:b,attributes:g},C={vertex:o,fragment:b,attributes:g},D={vertex:c,fragment:b,attributes:g};function L(w,M){var S=n(w,M),f=S.attributes;return f.position.location=0,f.color.location=1,f.glyph.location=2,f.id.location=3,S}d.createPerspective=function(w){return L(w,A)},d.createOrtho=function(w){return L(w,v)},d.createProject=function(w){return L(w,h)},d.createPickPerspective=function(w){return L(w,x)},d.createPickOrtho=function(w){return L(w,C)},d.createPickProject=function(w){return L(w,D)}},2182:function(l,d,r){var n=r(3596),u=r(5827),a=r(2944),o=r(5306),c=r(104),s=r(9282),b=r(4123),g=r(8240),A=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];l.exports=he;function v($,Z){var K=$[0],Q=$[1],ae=$[2],fe=$[3];return $[0]=Z[0]*K+Z[4]*Q+Z[8]*ae+Z[12]*fe,$[1]=Z[1]*K+Z[5]*Q+Z[9]*ae+Z[13]*fe,$[2]=Z[2]*K+Z[6]*Q+Z[10]*ae+Z[14]*fe,$[3]=Z[3]*K+Z[7]*Q+Z[11]*ae+Z[15]*fe,$}function h($,Z,K,Q){return v(Q,Q),v(Q,Q),v(Q,Q)}function x($,Z){this.index=$,this.dataCoordinate=this.position=Z}function C($){return $===!0||$>1?1:$}function D($,Z,K,Q,ae,fe,te,ne,ce,oe,de,we){this.gl=$,this.pixelRatio=1,this.shader=Z,this.orthoShader=K,this.projectShader=Q,this.pointBuffer=ae,this.colorBuffer=fe,this.glyphBuffer=te,this.idBuffer=ne,this.vao=ce,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=oe,this.pickOrthoShader=de,this.pickProjectShader=we,this.points=[],this._selectResult=new x(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var L=D.prototype;L.pickSlots=1,L.setPickBase=function($){this.pickId=$},L.isTransparent=function(){if(this.hasAlpha)return!0;for(var $=0;$<3;++$)if(this.axesProject[$]&&this.projectHasAlpha)return!0;return!1},L.isOpaque=function(){if(!this.hasAlpha)return!0;for(var $=0;$<3;++$)if(this.axesProject[$]&&!this.projectHasAlpha)return!0;return!1};var w=[0,0],M=[0,0,0],S=[0,0,0],f=[0,0,0,1],P=[0,0,0,1],E=A.slice(),k=[0,0,0],O=[[0,0,0],[0,0,0]];function G($){return $[0]=$[1]=$[2]=0,$}function z($,Z){return $[0]=Z[0],$[1]=Z[1],$[2]=Z[2],$[3]=1,$}function U($,Z,K,Q){return $[0]=Z[0],$[1]=Z[1],$[2]=Z[2],$[K]=Q,$}function H($){for(var Z=O,K=0;K<2;++K)for(var Q=0;Q<3;++Q)Z[K][Q]=Math.max(Math.min($[K][Q],1e8),-1e8);return Z}function B($,Z,K,Q){var ae=Z.axesProject,fe=Z.gl,te=$.uniforms,ne=K.model||A,ce=K.view||A,oe=K.projection||A,de=Z.axesBounds,we=H(Z.clipBounds),Se;Z.axes&&Z.axes.lastCubeProps?Se=Z.axes.lastCubeProps.axis:Se=[1,1,1],w[0]=2/fe.drawingBufferWidth,w[1]=2/fe.drawingBufferHeight,$.bind(),te.view=ce,te.projection=oe,te.screenSize=w,te.highlightId=Z.highlightId,te.highlightScale=Z.highlightScale,te.clipBounds=we,te.pickGroup=Z.pickId/255,te.pixelRatio=Q;for(var Te=0;Te<3;++Te)if(!!ae[Te]){te.scale=Z.projectScale[Te],te.opacity=Z.projectOpacity[Te];for(var Fe=E,Ie=0;Ie<16;++Ie)Fe[Ie]=0;for(var Ie=0;Ie<4;++Ie)Fe[5*Ie]=1;Fe[5*Te]=0,Se[Te]<0?Fe[12+Te]=de[0][Te]:Fe[12+Te]=de[1][Te],c(Fe,ne,Fe),te.model=Fe;var Me=(Te+1)%3,Ae=(Te+2)%3,De=G(M),ke=G(S);De[Me]=1,ke[Ae]=1;var We=h(oe,ce,ne,z(f,De)),_e=h(oe,ce,ne,z(P,ke));if(Math.abs(We[1])>Math.abs(_e[1])){var Ye=We;We=_e,_e=Ye,Ye=De,De=ke,ke=Ye;var Pe=Me;Me=Ae,Ae=Pe}We[0]<0&&(De[Me]=-1),_e[1]>0&&(ke[Ae]=-1);for(var Ve=0,Ze=0,Ie=0;Ie<4;++Ie)Ve+=Math.pow(ne[4*Me+Ie],2),Ze+=Math.pow(ne[4*Ae+Ie],2);De[Me]/=Math.sqrt(Ve),ke[Ae]/=Math.sqrt(Ze),te.axes[0]=De,te.axes[1]=ke,te.fragClipBounds[0]=U(k,we[0],Te,-1e8),te.fragClipBounds[1]=U(k,we[1],Te,1e8),Z.vao.bind(),Z.vao.draw(fe.TRIANGLES,Z.vertexCount),Z.lineWidth>0&&(fe.lineWidth(Z.lineWidth*Q),Z.vao.draw(fe.LINES,Z.lineVertexCount,Z.vertexCount)),Z.vao.unbind()}}var W=[-1e8,-1e8,-1e8],q=[1e8,1e8,1e8],re=[W,q];function ie($,Z,K,Q,ae,fe,te){var ne=K.gl;if((fe===K.projectHasAlpha||te)&&B(Z,K,Q,ae),fe===K.hasAlpha||te){$.bind();var ce=$.uniforms;ce.model=Q.model||A,ce.view=Q.view||A,ce.projection=Q.projection||A,w[0]=2/ne.drawingBufferWidth,w[1]=2/ne.drawingBufferHeight,ce.screenSize=w,ce.highlightId=K.highlightId,ce.highlightScale=K.highlightScale,ce.fragClipBounds=re,ce.clipBounds=K.axes.bounds,ce.opacity=K.opacity,ce.pickGroup=K.pickId/255,ce.pixelRatio=ae,K.vao.bind(),K.vao.draw(ne.TRIANGLES,K.vertexCount),K.lineWidth>0&&(ne.lineWidth(K.lineWidth*ae),K.vao.draw(ne.LINES,K.lineVertexCount,K.vertexCount)),K.vao.unbind()}}L.draw=function($){var Z=this.useOrtho?this.orthoShader:this.shader;ie(Z,this.projectShader,this,$,this.pixelRatio,!1,!1)},L.drawTransparent=function($){var Z=this.useOrtho?this.orthoShader:this.shader;ie(Z,this.projectShader,this,$,this.pixelRatio,!0,!1)},L.drawPick=function($){var Z=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;ie(Z,this.pickProjectShader,this,$,1,!0,!0)},L.pick=function($){if(!$||$.id!==this.pickId)return null;var Z=$.value[2]+($.value[1]<<8)+($.value[0]<<16);if(Z>=this.pointCount||Z<0)return null;var K=this.points[Z],Q=this._selectResult;Q.index=Z;for(var ae=0;ae<3;++ae)Q.position[ae]=Q.dataCoordinate[ae]=K[ae];return Q},L.highlight=function($){if(!$)this.highlightId=[1,1,1,1];else{var Z=$.index,K=Z&255,Q=Z>>8&255,ae=Z>>16&255;this.highlightId=[K/255,Q/255,ae/255,0]}};function le($,Z,K,Q){var ae;Array.isArray($)?Z<$.length?ae=$[Z]:ae=void 0:ae=$,ae=g(ae);var fe=!0;n(ae)&&(ae="\u25BC",fe=!1);var te=b(ae,K,Q);return{mesh:te[0],lines:te[1],bounds:te[2],visible:fe}}L.update=function($){if($=$||{},"perspective"in $&&(this.useOrtho=!$.perspective),"orthographic"in $&&(this.useOrtho=!!$.orthographic),"lineWidth"in $&&(this.lineWidth=$.lineWidth),"project"in $)if(Array.isArray($.project))this.axesProject=$.project;else{var Z=!!$.project;this.axesProject=[Z,Z,Z]}if("projectScale"in $)if(Array.isArray($.projectScale))this.projectScale=$.projectScale.slice();else{var K=+$.projectScale;this.projectScale=[K,K,K]}if(this.projectHasAlpha=!1,"projectOpacity"in $){if(Array.isArray($.projectOpacity))this.projectOpacity=$.projectOpacity.slice();else{var K=+$.projectOpacity;this.projectOpacity=[K,K,K]}for(var Q=0;Q<3;++Q)this.projectOpacity[Q]=C(this.projectOpacity[Q]),this.projectOpacity[Q]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in $&&(this.opacity=C($.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var ae=$.position,fe=$.font||"normal",te=$.alignment||[0,0],ne,ce;if(te.length===2)ne=te[0],ce=te[1];else{ne=[],ce=[];for(var Q=0;Q0){var et=0,Ue=Ae,Be=[0,0,0,1],rt=[0,0,0,1],ot=Array.isArray(Se)&&Array.isArray(Se[0]),qe=Array.isArray(Ie)&&Array.isArray(Ie[0]);e:for(var Q=0;Q0?1-Ze[0][0]:st<0?1+Ze[1][0]:1,ct*=ct>0?1-Ze[0][1]:ct<0?1+Ze[1][1]:1;for(var bt=[st,ct],tr=Pe.cells||[],lr=Pe.positions||[],_e=0;_e0){var G=A*M;C.drawBox(S-G,f-G,P+G,f+G,x),C.drawBox(S-G,E-G,P+G,E+G,x),C.drawBox(S-G,f-G,S+G,E+G,x),C.drawBox(P-G,f-G,P+G,E+G,x)}}}},c.update=function(b){b=b||{},this.innerFill=!!b.innerFill,this.outerFill=!!b.outerFill,this.innerColor=(b.innerColor||[0,0,0,.5]).slice(),this.outerColor=(b.outerColor||[0,0,0,.5]).slice(),this.borderColor=(b.borderColor||[0,0,0,1]).slice(),this.borderWidth=b.borderWidth||0,this.selectBox=(b.selectBox||this.selectBox).slice()},c.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)};function s(b,g){var A=b.gl,v=u(A,[0,0,0,1,1,0,1,1]),h=n(A,a.boxVertex,a.boxFragment),x=new o(b,v,h);return x.update(g),b.addOverlay(x),x}},2611:function(l,d,r){l.exports=A;var n=r(4234),u=r(5306),a=r(5050),o=r(2288).nextPow2,c=function(v,h,x){for(var C=1e8,D=-1,L=-1,w=v.shape[0],M=v.shape[1],S=0;Sthis.buffer.length){u.free(this.buffer);for(var C=this.buffer=u.mallocUint8(o(x*h*4)),D=0;DC)for(h=C;hx)for(h=x;h=0){for(var H=U.type.charAt(U.type.length-1)|0,B=new Array(H),W=0;W=0;)q+=1;G[z]=q}var re=new Array(C.length);function ie(){w.program=o.program(M,w._vref,w._fref,O,G);for(var le=0;le=0){var f=M.charCodeAt(M.length-1)-48;if(f<2||f>4)throw new n("","Invalid data type for attribute "+w+": "+M);c(g,A,S[0],h,f,x,w)}else if(M.indexOf("mat")>=0){var f=M.charCodeAt(M.length-1)-48;if(f<2||f>4)throw new n("","Invalid data type for attribute "+w+": "+M);s(g,A,S,h,f,x,w)}else throw new n("","Unknown data type for attribute "+w+": "+M);break}}return x}},9016:function(l,d,r){var n=r(3984),u=r(9068);l.exports=c;function a(s){return function(){return s}}function o(s,b){for(var g=new Array(s),A=0;A4)throw new u("","Invalid data type");switch(q.charAt(0)){case"b":case"i":s["uniform"+re+"iv"](A[G],z);break;case"v":s["uniform"+re+"fv"](A[G],z);break;default:throw new u("","Unrecognized data type for vector "+name+": "+q)}}else if(q.indexOf("mat")===0&&q.length===4){if(re=q.charCodeAt(q.length-1)-48,re<2||re>4)throw new u("","Invalid uniform dimension type for matrix "+name+": "+q);s["uniformMatrix"+re+"fv"](A[G],!1,z);break}else throw new u("","Unknown uniform data type for "+name+": "+q)}}}}}function x(M,S){if(typeof S!="object")return[[M,S]];var f=[];for(var P in S){var E=S[P],k=M;parseInt(P)+""===P?k+="["+P+"]":k+="."+P,typeof E=="object"?f.push.apply(f,x(k,E)):f.push([k,E])}return f}function C(M){switch(M){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var S=M.indexOf("vec");if(0<=S&&S<=1&&M.length===4+S){var f=M.charCodeAt(M.length-1)-48;if(f<2||f>4)throw new u("","Invalid data type");return M.charAt(0)==="b"?o(f,!1):o(f,0)}else if(M.indexOf("mat")===0&&M.length===4){var f=M.charCodeAt(M.length-1)-48;if(f<2||f>4)throw new u("","Invalid uniform dimension type for matrix "+name+": "+M);return o(f*f,0)}else throw new u("","Unknown uniform data type for "+name+": "+M)}}function D(M,S,f){if(typeof f=="object"){var P=L(f);Object.defineProperty(M,S,{get:a(P),set:h(f),enumerable:!0,configurable:!1})}else A[f]?Object.defineProperty(M,S,{get:v(f),set:h(f),enumerable:!0,configurable:!1}):M[S]=C(g[f].type)}function L(M){var S;if(Array.isArray(M)){S=new Array(M.length);for(var f=0;f1){g[0]in s||(s[g[0]]=[]),s=s[g[0]];for(var A=1;A1)for(var x=0;x"u"?r(4037):WeakMap,o=new a,c=0;function s(D,L,w,M,S,f,P){this.id=D,this.src=L,this.type=w,this.shader=M,this.count=f,this.programs=[],this.cache=P}s.prototype.dispose=function(){if(--this.count===0){for(var D=this.cache,L=D.gl,w=this.programs,M=0,S=w.length;M 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the tube vertex and normal at the given index. +// +// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. +// +// Each tube segment is made up of a ring of vertices. +// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. +// The indexes of tube segments run from 0 to 8. +// +vec3 getTubePosition(vec3 d, float index, out vec3 normal) { + float segmentCount = 8.0; + + float angle = 2.0 * 3.14159 * (index / segmentCount); + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d); + vec3 y = v * sin(angle) * length(d); + vec3 v3 = x + y; + + normal = normalize(v3); + + return v3; +} + +attribute vec4 vector; +attribute vec4 color, position; +attribute vec2 uv; + +uniform float vectorScale, tubeScale; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 eyePosition, lightPosition; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + // Scale the vector magnitude to stay constant with + // model & view changes. + vec3 normal; + vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); + vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * tubePosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + // vec4 m_position = model * vec4(tubePosition, 1.0); + vec4 t_position = view * tubePosition; + gl_Position = projection * t_position; + + f_color = color; + f_data = tubePosition.xyz; + f_position = position.xyz; + f_uv = uv; +} +`]),a=n([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform sampler2D texture; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = f_color * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * opacity; +} +`]),o=n([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the tube vertex and normal at the given index. +// +// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. +// +// Each tube segment is made up of a ring of vertices. +// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. +// The indexes of tube segments run from 0 to 8. +// +vec3 getTubePosition(vec3 d, float index, out vec3 normal) { + float segmentCount = 8.0; + + float angle = 2.0 * 3.14159 * (index / segmentCount); + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d); + vec3 y = v * sin(angle) * length(d); + vec3 v3 = x + y; + + normal = normalize(v3); + + return v3; +} + +attribute vec4 vector; +attribute vec4 position; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform float tubeScale; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + vec3 normal; + vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); + vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + gl_Position = projection * view * tubePosition; + f_id = id; + f_position = position.xyz; +} +`]),c=n([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]);d.meshShader={vertex:u,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},d.pickShader={vertex:o,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7307:function(l,d,r){var n=r(2858),u=r(4020),a=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(C,D,L,w){for(var M=C.points,S=C.velocities,f=C.divergences,P=[],E=[],k=[],O=[],G=[],z=[],U=0,H=0,B=u.create(),W=u.create(),q=8,re=0;re0)for(var $=0;$D)return w-1}return w},b=function(C,D,L){return CL?L:C},g=function(C,D,L){var w=D.vectors,M=D.meshgrid,S=C[0],f=C[1],P=C[2],E=M[0].length,k=M[1].length,O=M[2].length,G=s(M[0],S),z=s(M[1],f),U=s(M[2],P),H=G+1,B=z+1,W=U+1;if(G=b(G,0,E-1),H=b(H,0,E-1),z=b(z,0,k-1),B=b(B,0,k-1),U=b(U,0,O-1),W=b(W,0,O-1),G<0||z<0||U<0||H>E-1||B>k-1||W>O-1)return n.create();var q=M[0][G],re=M[0][H],ie=M[1][z],le=M[1][B],he=M[2][U],$=M[2][W],Z=(S-q)/(re-q),K=(f-ie)/(le-ie),Q=(P-he)/($-he);isFinite(Z)||(Z=.5),isFinite(K)||(K=.5),isFinite(Q)||(Q=.5);var ae,fe,te,ne,ce,oe;switch(L.reversedX&&(G=E-1-G,H=E-1-H),L.reversedY&&(z=k-1-z,B=k-1-B),L.reversedZ&&(U=O-1-U,W=O-1-W),L.filled){case 5:ce=U,oe=W,te=z*O,ne=B*O,ae=G*O*k,fe=H*O*k;break;case 4:ce=U,oe=W,ae=G*O,fe=H*O,te=z*O*E,ne=B*O*E;break;case 3:te=z,ne=B,ce=U*k,oe=W*k,ae=G*k*O,fe=H*k*O;break;case 2:te=z,ne=B,ae=G*k,fe=H*k,ce=U*k*E,oe=W*k*E;break;case 1:ae=G,fe=H,ce=U*E,oe=W*E,te=z*E*O,ne=B*E*O;break;default:ae=G,fe=H,te=z*E,ne=B*E,ce=U*E*k,oe=W*E*k;break}var de=w[ae+te+ce],we=w[ae+te+oe],Se=w[ae+ne+ce],Te=w[ae+ne+oe],Fe=w[fe+te+ce],Ie=w[fe+te+oe],Me=w[fe+ne+ce],Ae=w[fe+ne+oe],De=n.create(),ke=n.create(),We=n.create(),_e=n.create();n.lerp(De,de,Fe,Z),n.lerp(ke,we,Ie,Z),n.lerp(We,Se,Me,Z),n.lerp(_e,Te,Ae,Z);var Ye=n.create(),Pe=n.create();n.lerp(Ye,De,We,K),n.lerp(Pe,ke,_e,K);var Ve=n.create();return n.lerp(Ve,Ye,Pe,Q),Ve},A=function(C){var D=1/0;C.sort(function(S,f){return S-f});for(var L=C.length,w=1;wH||AeB||DeW)},re=n.distance(D[0],D[1]),ie=10*re/w,le=ie*ie,he=1,$=0,Z=L.length;Z>1&&(he=v(L));for(var K=0;K$&&($=de),ce.push(de),O.push({points:ae,velocities:fe,divergences:ce});for(var we=0;wele&&n.scale(Se,Se,ie/Math.sqrt(Te)),n.add(Se,Se,Q),te=E(Se),n.squaredDistance(ne,Se)-le>-1e-4*le){ae.push(Se),ne=Se,fe.push(te);var oe=k(Se,te),de=n.length(oe);isFinite(de)&&de>$&&($=de),ce.push(de)}Q=Se}}var Fe=c(O,C.colormap,$,he);return S?Fe.tubeScale=S:($===0&&($=1),Fe.tubeScale=M*.5*he/$),Fe};var h=r(9578),x=r(1140).createMesh;l.exports.createTubeMesh=function(C,D){return x(C,D,{shaders:h,traceType:"streamtube"})}},9054:function(l,d,r){var n=r(5158),u=r(6832),a=u([`precision highp float; +#define GLSLIFY 1 + +attribute vec4 uv; +attribute vec3 f; +attribute vec3 normal; + +uniform vec3 objectOffset; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 lightPosition, eyePosition; +uniform sampler2D colormap; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + vec3 localCoordinate = vec3(uv.zw, f.x); + worldCoordinate = objectOffset + localCoordinate; + vec4 worldPosition = model * vec4(worldCoordinate, 1.0); + vec4 clipPosition = projection * view * worldPosition; + gl_Position = clipPosition; + kill = f.y; + value = f.z; + planeCoordinate = uv.xy; + + vColor = texture2D(colormap, vec2(value, value)); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * worldPosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + lightDirection = lightPosition - cameraCoordinate.xyz; + eyeDirection = eyePosition - cameraCoordinate.xyz; + surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz); +} +`]),o=u([`precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float beckmannSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness) { + return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 lowerBound, upperBound; +uniform float contourTint; +uniform vec4 contourColor; +uniform sampler2D colormap; +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform float vertexColor; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + if ( + kill > 0.0 || + vColor.a == 0.0 || + outOfRange(clipBounds[0], clipBounds[1], worldCoordinate) + ) discard; + + vec3 N = normalize(surfaceNormal); + vec3 V = normalize(eyeDirection); + vec3 L = normalize(lightDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = max(beckmannSpecular(L, V, N, roughness), 0.); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + //decide how to interpolate color \u2014 in vertex or in fragment + vec4 surfaceColor = + step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + + step(.5, vertexColor) * vColor; + + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; +} +`]),c=u([`precision highp float; +#define GLSLIFY 1 + +attribute vec4 uv; +attribute float f; + +uniform vec3 objectOffset; +uniform mat3 permutation; +uniform mat4 model, view, projection; +uniform float height, zOffset; +uniform sampler2D colormap; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + vec3 dataCoordinate = permutation * vec3(uv.xy, height); + worldCoordinate = objectOffset + dataCoordinate; + vec4 worldPosition = model * vec4(worldCoordinate, 1.0); + + vec4 clipPosition = projection * view * worldPosition; + clipPosition.z += zOffset; + + gl_Position = clipPosition; + value = f + objectOffset.z; + kill = -1.0; + planeCoordinate = uv.zw; + + vColor = texture2D(colormap, vec2(value, value)); + + //Don't do lighting for contours + surfaceNormal = vec3(1,0,0); + eyeDirection = vec3(0,1,0); + lightDirection = vec3(0,0,1); +} +`]),s=u([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec2 shape; +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 surfaceNormal; + +vec2 splitFloat(float v) { + float vh = 255.0 * v; + float upper = floor(vh); + float lower = fract(vh); + return vec2(upper / 255.0, floor(lower * 16.0) / 16.0); +} + +void main() { + if ((kill > 0.0) || + (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard; + + vec2 ux = splitFloat(planeCoordinate.x / shape.x); + vec2 uy = splitFloat(planeCoordinate.y / shape.y); + gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); +} +`]);d.createShader=function(b){var g=n(b,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return g.attributes.uv.location=0,g.attributes.f.location=1,g.attributes.normal.location=2,g},d.createPickShader=function(b){var g=n(b,a,s,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return g.attributes.uv.location=0,g.attributes.f.location=1,g.attributes.normal.location=2,g},d.createContourShader=function(b){var g=n(b,c,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return g.attributes.uv.location=0,g.attributes.f.location=1,g},d.createPickContourShader=function(b){var g=n(b,c,s,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return g.attributes.uv.location=0,g.attributes.f.location=1,g}},3754:function(l,d,r){l.exports=fe;var n=r(2288),u=r(5827),a=r(2944),o=r(8931),c=r(5306),s=r(9156),b=r(7498),g=r(7382),A=r(5050),v=r(4162),h=r(104),x=r(7437),C=r(5070),D=r(9144),L=r(9054),w=L.createShader,M=L.createContourShader,S=L.createPickShader,f=L.createPickContourShader,P=4*(4+3+3),E=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],k=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],O=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var te=0;te<3;++te){var ne=O[te],ce=(te+1)%3,oe=(te+2)%3;ne[ce+0]=1,ne[oe+3]=1,ne[te+6]=1}})();function G(te,ne,ce,oe,de){this.position=te,this.index=ne,this.uv=ce,this.level=oe,this.dataCoordinate=de}var z=256;function U(te,ne,ce,oe,de,we,Se,Te,Fe,Ie,Me,Ae,De,ke,We){this.gl=te,this.shape=ne,this.bounds=ce,this.objectOffset=We,this.intensityBounds=[],this._shader=oe,this._pickShader=de,this._coordinateBuffer=we,this._vao=Se,this._colorMap=Te,this._contourShader=Fe,this._contourPickShader=Ie,this._contourBuffer=Me,this._contourVAO=Ae,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new G([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=De,this._dynamicVAO=ke,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[A(c.mallocFloat(1024),[0,0]),A(c.mallocFloat(1024),[0,0]),A(c.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var H=U.prototype;H.genColormap=function(te,ne){var ce=!1,oe=g([s({colormap:te,nshades:z,format:"rgba"}).map(function(de,we){var Se=ne?B(we/255,ne):de[3];return Se<1&&(ce=!0),[de[0],de[1],de[2],255*Se]})]);return b.divseq(oe,255),this.hasAlphaScale=ce,oe},H.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},H.isOpaque=function(){return!this.isTransparent()},H.pickSlots=1,H.setPickBase=function(te){this.pickId=te};function B(te,ne){if(!ne||!ne.length)return 1;for(var ce=0;cete&&ce>0){var oe=(ne[ce][0]-te)/(ne[ce][0]-ne[ce-1][0]);return ne[ce][1]*(1-oe)+oe*ne[ce-1][1]}}return 1}var W=[0,0,0],q={showSurface:!1,showContour:!1,projections:[E.slice(),E.slice(),E.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function re(te,ne){var ce,oe,de,we=ne.axes&&ne.axes.lastCubeProps.axis||W,Se=ne.showSurface,Te=ne.showContour;for(ce=0;ce<3;++ce)for(Se=Se||ne.surfaceProject[ce],oe=0;oe<3;++oe)Te=Te||ne.contourProject[ce][oe];for(ce=0;ce<3;++ce){var Fe=q.projections[ce];for(oe=0;oe<16;++oe)Fe[oe]=0;for(oe=0;oe<4;++oe)Fe[5*oe]=1;Fe[5*ce]=0,Fe[12+ce]=ne.axesBounds[+(we[ce]>0)][ce],h(Fe,te.model,Fe);var Ie=q.clipBounds[ce];for(de=0;de<2;++de)for(oe=0;oe<3;++oe)Ie[de][oe]=te.clipBounds[de][oe];Ie[0][ce]=-1e8,Ie[1][ce]=1e8}return q.showSurface=Se,q.showContour=Te,q}var ie={model:E,view:E,projection:E,inverseModel:E.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},le=E.slice(),he=[1,0,0,0,1,0,0,0,1];function $(te,ne){te=te||{};var ce=this.gl;ce.disable(ce.CULL_FACE),this._colorMap.bind(0);var oe=ie;oe.model=te.model||E,oe.view=te.view||E,oe.projection=te.projection||E,oe.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],oe.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],oe.objectOffset=this.objectOffset,oe.contourColor=this.contourColor[0],oe.inverseModel=x(oe.inverseModel,oe.model);for(var de=0;de<2;++de)for(var we=oe.clipBounds[de],Se=0;Se<3;++Se)we[Se]=Math.min(Math.max(this.clipBounds[de][Se],-1e8),1e8);oe.kambient=this.ambientLight,oe.kdiffuse=this.diffuseLight,oe.kspecular=this.specularLight,oe.roughness=this.roughness,oe.fresnel=this.fresnel,oe.opacity=this.opacity,oe.height=0,oe.permutation=he,oe.vertexColor=this.vertexColor;var Te=le;for(h(Te,oe.view,oe.model),h(Te,oe.projection,Te),x(Te,Te),de=0;de<3;++de)oe.eyePosition[de]=Te[12+de]/Te[15];var Fe=Te[15];for(de=0;de<3;++de)Fe+=this.lightPosition[de]*Te[4*de+3];for(de=0;de<3;++de){var Ie=Te[12+de];for(Se=0;Se<3;++Se)Ie+=Te[4*Se+de]*this.lightPosition[Se];oe.lightPosition[de]=Ie/Fe}var Me=re(oe,this);if(Me.showSurface){for(this._shader.bind(),this._shader.uniforms=oe,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ce.TRIANGLES,this._vertexCount),de=0;de<3;++de)!this.surfaceProject[de]||!this.vertexCount||(this._shader.uniforms.model=Me.projections[de],this._shader.uniforms.clipBounds=Me.clipBounds[de],this._vao.draw(ce.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Me.showContour){var Ae=this._contourShader;oe.kambient=1,oe.kdiffuse=0,oe.kspecular=0,oe.opacity=1,Ae.bind(),Ae.uniforms=oe;var De=this._contourVAO;for(De.bind(),de=0;de<3;++de)for(Ae.uniforms.permutation=O[de],ce.lineWidth(this.contourWidth[de]*this.pixelRatio),Se=0;Se>4)/16)/255,de=Math.floor(oe),we=oe-de,Se=ne[1]*(te.value[1]+(te.value[2]&15)/16)/255,Te=Math.floor(Se),Fe=Se-Te;de+=1,Te+=1;var Ie=ce.position;Ie[0]=Ie[1]=Ie[2]=0;for(var Me=0;Me<2;++Me)for(var Ae=Me?we:1-we,De=0;De<2;++De)for(var ke=De?Fe:1-Fe,We=de+Me,_e=Te+De,Ye=Ae*ke,Pe=0;Pe<3;++Pe)Ie[Pe]+=this._field[Pe].get(We,_e)*Ye;for(var Ve=this._pickResult.level,Ze=0;Ze<3;++Ze)if(Ve[Ze]=C.le(this.contourLevels[Ze],Ie[Ze]),Ve[Ze]<0)this.contourLevels[Ze].length>0&&(Ve[Ze]=0);else if(Ve[Ze]Math.abs(lt-Ie[Ze])&&(Ve[Ze]+=1)}for(ce.index[0]=we<.5?de:de+1,ce.index[1]=Fe<.5?Te:Te+1,ce.uv[0]=oe/ne[0],ce.uv[1]=Se/ne[1],Pe=0;Pe<3;++Pe)ce.dataCoordinate[Pe]=this._field[Pe].get(ce.index[0],ce.index[1]);return ce},H.padField=function(te,ne){var ce=ne.shape.slice(),oe=te.shape.slice();b.assign(te.lo(1,1).hi(ce[0],ce[1]),ne),b.assign(te.lo(1).hi(ce[0],1),ne.hi(ce[0],1)),b.assign(te.lo(1,oe[1]-1).hi(ce[0],1),ne.lo(0,ce[1]-1).hi(ce[0],1)),b.assign(te.lo(0,1).hi(1,ce[1]),ne.hi(1)),b.assign(te.lo(oe[0]-1,1).hi(1,ce[1]),ne.lo(ce[0]-1)),te.set(0,0,ne.get(0,0)),te.set(0,oe[1]-1,ne.get(0,ce[1]-1)),te.set(oe[0]-1,0,ne.get(ce[0]-1,0)),te.set(oe[0]-1,oe[1]-1,ne.get(ce[0]-1,ce[1]-1))};function K(te,ne){return Array.isArray(te)?[ne(te[0]),ne(te[1]),ne(te[2])]:[ne(te),ne(te),ne(te)]}function Q(te){return Array.isArray(te)?te.length===3?[te[0],te[1],te[2],1]:[te[0],te[1],te[2],te[3]]:[0,0,0,1]}function ae(te){if(Array.isArray(te)){if(Array.isArray(te))return[Q(te[0]),Q(te[1]),Q(te[2])];var ne=Q(te);return[ne.slice(),ne.slice(),ne.slice()]}}H.update=function(te){te=te||{},this.objectOffset=te.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in te&&(this.contourWidth=K(te.contourWidth,Number)),"showContour"in te&&(this.showContour=K(te.showContour,Boolean)),"showSurface"in te&&(this.showSurface=!!te.showSurface),"contourTint"in te&&(this.contourTint=K(te.contourTint,Boolean)),"contourColor"in te&&(this.contourColor=ae(te.contourColor)),"contourProject"in te&&(this.contourProject=K(te.contourProject,function(_t){return K(_t,Boolean)})),"surfaceProject"in te&&(this.surfaceProject=te.surfaceProject),"dynamicColor"in te&&(this.dynamicColor=ae(te.dynamicColor)),"dynamicTint"in te&&(this.dynamicTint=K(te.dynamicTint,Number)),"dynamicWidth"in te&&(this.dynamicWidth=K(te.dynamicWidth,Number)),"opacity"in te&&(this.opacity=te.opacity),"opacityscale"in te&&(this.opacityscale=te.opacityscale),"colorBounds"in te&&(this.colorBounds=te.colorBounds),"vertexColor"in te&&(this.vertexColor=te.vertexColor?1:0),"colormap"in te&&this._colorMap.setPixels(this.genColormap(te.colormap,this.opacityscale));var ne=te.field||te.coords&&te.coords[2]||null,ce=!1;if(ne||(this._field[2].shape[0]||this._field[2].shape[2]?ne=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):ne=this._field[2].hi(0,0)),"field"in te||"coords"in te){var oe=(ne.shape[0]+2)*(ne.shape[1]+2);oe>this._field[2].data.length&&(c.freeFloat(this._field[2].data),this._field[2].data=c.mallocFloat(n.nextPow2(oe))),this._field[2]=A(this._field[2].data,[ne.shape[0]+2,ne.shape[1]+2]),this.padField(this._field[2],ne),this.shape=ne.shape.slice();for(var de=this.shape,we=0;we<2;++we)this._field[2].size>this._field[we].data.length&&(c.freeFloat(this._field[we].data),this._field[we].data=c.mallocFloat(this._field[2].size)),this._field[we]=A(this._field[we].data,[de[0]+2,de[1]+2]);if(te.coords){var Se=te.coords;if(!Array.isArray(Se)||Se.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(we=0;we<2;++we){var Te=Se[we];for(De=0;De<2;++De)if(Te.shape[De]!==de[De])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[we],Te)}}else if(te.ticks){var Fe=te.ticks;if(!Array.isArray(Fe)||Fe.length!==2)throw new Error("gl-surface: invalid ticks");for(we=0;we<2;++we){var Ie=Fe[we];if((Array.isArray(Ie)||Ie.length)&&(Ie=A(Ie)),Ie.shape[0]!==de[we])throw new Error("gl-surface: invalid tick length");var Me=A(Ie.data,de);Me.stride[we]=Ie.stride[0],Me.stride[we^1]=0,this.padField(this._field[we],Me)}}else{for(we=0;we<2;++we){var Ae=[0,0];Ae[we]=1,this._field[we]=A(this._field[we].data,[de[0]+2,de[1]+2],Ae,0)}this._field[0].set(0,0,0);for(var De=0;De0){for(var je=0;je<5;++je)tr.pop();pe-=1}continue e}}}jt.push(pe)}this._contourOffsets[lr]=xt,this._contourCounts[lr]=jt}var It=c.mallocFloat(tr.length);for(we=0;weG||k<0||k>G)throw new Error("gl-texture2d: Invalid texture size");return P._shape=[E,k],P.bind(),O.texImage2D(O.TEXTURE_2D,0,P.format,E,k,0,P.format,P.type,null),P._mipLevels=[0],P}function h(P,E,k,O,G,z){this.gl=P,this.handle=E,this.format=G,this.type=z,this._shape=[k,O],this._mipLevels=[0],this._magFilter=P.NEAREST,this._minFilter=P.NEAREST,this._wrapS=P.CLAMP_TO_EDGE,this._wrapT=P.CLAMP_TO_EDGE,this._anisoSamples=1;var U=this,H=[this._wrapS,this._wrapT];Object.defineProperties(H,[{get:function(){return U._wrapS},set:function(W){return U.wrapS=W}},{get:function(){return U._wrapT},set:function(W){return U.wrapT=W}}]),this._wrapVector=H;var B=[this._shape[0],this._shape[1]];Object.defineProperties(B,[{get:function(){return U._shape[0]},set:function(W){return U.width=W}},{get:function(){return U._shape[1]},set:function(W){return U.height=W}}]),this._shapeVector=B}var x=h.prototype;Object.defineProperties(x,{minFilter:{get:function(){return this._minFilter},set:function(P){this.bind();var E=this.gl;if(this.type===E.FLOAT&&o.indexOf(P)>=0&&(E.getExtension("OES_texture_float_linear")||(P=E.NEAREST)),c.indexOf(P)<0)throw new Error("gl-texture2d: Unknown filter mode "+P);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MIN_FILTER,P),this._minFilter=P}},magFilter:{get:function(){return this._magFilter},set:function(P){this.bind();var E=this.gl;if(this.type===E.FLOAT&&o.indexOf(P)>=0&&(E.getExtension("OES_texture_float_linear")||(P=E.NEAREST)),c.indexOf(P)<0)throw new Error("gl-texture2d: Unknown filter mode "+P);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MAG_FILTER,P),this._magFilter=P}},mipSamples:{get:function(){return this._anisoSamples},set:function(P){var E=this._anisoSamples;if(this._anisoSamples=Math.max(P,1)|0,E!==this._anisoSamples){var k=this.gl.getExtension("EXT_texture_filter_anisotropic");k&&this.gl.texParameterf(this.gl.TEXTURE_2D,k.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(P){if(this.bind(),s.indexOf(P)<0)throw new Error("gl-texture2d: Unknown wrap mode "+P);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,P),this._wrapS=P}},wrapT:{get:function(){return this._wrapT},set:function(P){if(this.bind(),s.indexOf(P)<0)throw new Error("gl-texture2d: Unknown wrap mode "+P);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,P),this._wrapT=P}},wrap:{get:function(){return this._wrapVector},set:function(P){if(Array.isArray(P)||(P=[P,P]),P.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var E=0;E<2;++E)if(s.indexOf(P[E])<0)throw new Error("gl-texture2d: Unknown wrap mode "+P);this._wrapS=P[0],this._wrapT=P[1];var k=this.gl;return this.bind(),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,this._wrapS),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,this._wrapT),P}},shape:{get:function(){return this._shapeVector},set:function(P){if(!Array.isArray(P))P=[P|0,P|0];else if(P.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return v(this,P[0]|0,P[1]|0),[P[0]|0,P[1]|0]}},width:{get:function(){return this._shape[0]},set:function(P){return P=P|0,v(this,P,this._shape[1]),P}},height:{get:function(){return this._shape[1]},set:function(P){return P=P|0,v(this,this._shape[0],P),P}}}),x.bind=function(P){var E=this.gl;return P!==void 0&&E.activeTexture(E.TEXTURE0+(P|0)),E.bindTexture(E.TEXTURE_2D,this.handle),P!==void 0?P|0:E.getParameter(E.ACTIVE_TEXTURE)-E.TEXTURE0},x.dispose=function(){this.gl.deleteTexture(this.handle)},x.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var P=Math.min(this._shape[0],this._shape[1]),E=0;P>0;++E,P>>>=1)this._mipLevels.indexOf(E)<0&&this._mipLevels.push(E)},x.setPixels=function(P,E,k,O){var G=this.gl;this.bind(),Array.isArray(E)?(O=k,k=E[1]|0,E=E[0]|0):(E=E||0,k=k||0),O=O||0;var z=g(P)?P:P.raw;if(z){var U=this._mipLevels.indexOf(O)<0;U?(G.texImage2D(G.TEXTURE_2D,0,this.format,this.format,this.type,z),this._mipLevels.push(O)):G.texSubImage2D(G.TEXTURE_2D,O,E,k,this.format,this.type,z)}else if(P.shape&&P.stride&&P.data){if(P.shape.length<2||E+P.shape[1]>this._shape[1]>>>O||k+P.shape[0]>this._shape[0]>>>O||E<0||k<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");D(G,E,k,O,this.format,this.type,this._mipLevels,P)}else throw new Error("gl-texture2d: Unsupported data type")};function C(P,E){return P.length===3?E[2]===1&&E[1]===P[0]*P[2]&&E[0]===P[2]:E[0]===1&&E[1]===P[0]}function D(P,E,k,O,G,z,U,H){var B=H.dtype,W=H.shape.slice();if(W.length<2||W.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var q=0,re=0,ie=C(W,H.stride.slice());if(B==="float32"?q=P.FLOAT:B==="float64"?(q=P.FLOAT,ie=!1,B="float32"):B==="uint8"?q=P.UNSIGNED_BYTE:(q=P.UNSIGNED_BYTE,ie=!1,B="uint8"),W.length===2)re=P.LUMINANCE,W=[W[0],W[1],1],H=n(H.data,W,[H.stride[0],H.stride[1],1],H.offset);else if(W.length===3){if(W[2]===1)re=P.ALPHA;else if(W[2]===2)re=P.LUMINANCE_ALPHA;else if(W[2]===3)re=P.RGB;else if(W[2]===4)re=P.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");W[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((re===P.LUMINANCE||re===P.ALPHA)&&(G===P.LUMINANCE||G===P.ALPHA)&&(re=G),re!==G)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var le=H.size,he=U.indexOf(O)<0;if(he&&U.push(O),q===z&&ie)H.offset===0&&H.data.length===le?he?P.texImage2D(P.TEXTURE_2D,O,G,W[0],W[1],0,G,z,H.data):P.texSubImage2D(P.TEXTURE_2D,O,E,k,W[0],W[1],G,z,H.data):he?P.texImage2D(P.TEXTURE_2D,O,G,W[0],W[1],0,G,z,H.data.subarray(H.offset,H.offset+le)):P.texSubImage2D(P.TEXTURE_2D,O,E,k,W[0],W[1],G,z,H.data.subarray(H.offset,H.offset+le));else{var $;z===P.FLOAT?$=a.mallocFloat32(le):$=a.mallocUint8(le);var Z=n($,W,[W[2],W[2]*W[0],1]);q===P.FLOAT&&z===P.UNSIGNED_BYTE?A(Z,H):u.assign(Z,H),he?P.texImage2D(P.TEXTURE_2D,O,G,W[0],W[1],0,G,z,$.subarray(0,le)):P.texSubImage2D(P.TEXTURE_2D,O,E,k,W[0],W[1],G,z,$.subarray(0,le)),z===P.FLOAT?a.freeFloat32($):a.freeUint8($)}}function L(P){var E=P.createTexture();return P.bindTexture(P.TEXTURE_2D,E),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MIN_FILTER,P.NEAREST),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MAG_FILTER,P.NEAREST),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_S,P.CLAMP_TO_EDGE),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_T,P.CLAMP_TO_EDGE),E}function w(P,E,k,O,G){var z=P.getParameter(P.MAX_TEXTURE_SIZE);if(E<0||E>z||k<0||k>z)throw new Error("gl-texture2d: Invalid texture shape");if(G===P.FLOAT&&!P.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var U=L(P);return P.texImage2D(P.TEXTURE_2D,0,O,E,k,0,O,G,null),new h(P,U,E,k,O,G)}function M(P,E,k,O,G,z){var U=L(P);return P.texImage2D(P.TEXTURE_2D,0,G,G,z,E),new h(P,U,k,O,G,z)}function S(P,E){var k=E.dtype,O=E.shape.slice(),G=P.getParameter(P.MAX_TEXTURE_SIZE);if(O[0]<0||O[0]>G||O[1]<0||O[1]>G)throw new Error("gl-texture2d: Invalid texture size");var z=C(O,E.stride.slice()),U=0;k==="float32"?U=P.FLOAT:k==="float64"?(U=P.FLOAT,z=!1,k="float32"):k==="uint8"?U=P.UNSIGNED_BYTE:(U=P.UNSIGNED_BYTE,z=!1,k="uint8");var H=0;if(O.length===2)H=P.LUMINANCE,O=[O[0],O[1],1],E=n(E.data,O,[E.stride[0],E.stride[1],1],E.offset);else if(O.length===3)if(O[2]===1)H=P.ALPHA;else if(O[2]===2)H=P.LUMINANCE_ALPHA;else if(O[2]===3)H=P.RGB;else if(O[2]===4)H=P.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");U===P.FLOAT&&!P.getExtension("OES_texture_float")&&(U=P.UNSIGNED_BYTE,z=!1);var B,W,q=E.size;if(z)E.offset===0&&E.data.length===q?B=E.data:B=E.data.subarray(E.offset,E.offset+q);else{var re=[O[2],O[2]*O[0],1];W=a.malloc(q,k);var ie=n(W,O,re,0);(k==="float32"||k==="float64")&&U===P.UNSIGNED_BYTE?A(ie,E):u.assign(ie,E),B=W.subarray(0,q)}var le=L(P);return P.texImage2D(P.TEXTURE_2D,0,H,O[0],O[1],0,H,U,B),z||a.free(W),new h(P,le,O[0],O[1],H,U)}function f(P){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(o||b(P),typeof arguments[1]=="number")return w(P,arguments[1],arguments[2],arguments[3]||P.RGBA,arguments[4]||P.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return w(P,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||P.RGBA,arguments[3]||P.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var E=arguments[1],k=g(E)?E:E.raw;if(k)return M(P,k,E.width|0,E.height|0,arguments[2]||P.RGBA,arguments[3]||P.UNSIGNED_BYTE);if(E.shape&&E.data&&E.stride)return S(P,E)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},3056:function(l){function d(r,n,u){n?n.bind():r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,null);var a=r.getParameter(r.MAX_VERTEX_ATTRIBS)|0;if(u){if(u.length>a)throw new Error("gl-vao: Too many vertex attributes");for(var o=0;o1?0:Math.acos(A)}},8827:function(l){l.exports=d;function d(r,n){return r[0]=Math.ceil(n[0]),r[1]=Math.ceil(n[1]),r[2]=Math.ceil(n[2]),r}},7622:function(l){l.exports=d;function d(r){var n=new Float32Array(3);return n[0]=r[0],n[1]=r[1],n[2]=r[2],n}},8782:function(l){l.exports=d;function d(r,n){return r[0]=n[0],r[1]=n[1],r[2]=n[2],r}},8501:function(l){l.exports=d;function d(){var r=new Float32Array(3);return r[0]=0,r[1]=0,r[2]=0,r}},903:function(l){l.exports=d;function d(r,n,u){var a=n[0],o=n[1],c=n[2],s=u[0],b=u[1],g=u[2];return r[0]=o*g-c*b,r[1]=c*s-a*g,r[2]=a*b-o*s,r}},5981:function(l,d,r){l.exports=r(8288)},8288:function(l){l.exports=d;function d(r,n){var u=n[0]-r[0],a=n[1]-r[1],o=n[2]-r[2];return Math.sqrt(u*u+a*a+o*o)}},8629:function(l,d,r){l.exports=r(7979)},7979:function(l){l.exports=d;function d(r,n,u){return r[0]=n[0]/u[0],r[1]=n[1]/u[1],r[2]=n[2]/u[2],r}},9305:function(l){l.exports=d;function d(r,n){return r[0]*n[0]+r[1]*n[1]+r[2]*n[2]}},154:function(l){l.exports=1e-6},4932:function(l,d,r){l.exports=u;var n=r(154);function u(a,o){var c=a[0],s=a[1],b=a[2],g=o[0],A=o[1],v=o[2];return Math.abs(c-g)<=n*Math.max(1,Math.abs(c),Math.abs(g))&&Math.abs(s-A)<=n*Math.max(1,Math.abs(s),Math.abs(A))&&Math.abs(b-v)<=n*Math.max(1,Math.abs(b),Math.abs(v))}},5777:function(l){l.exports=d;function d(r,n){return r[0]===n[0]&&r[1]===n[1]&&r[2]===n[2]}},3306:function(l){l.exports=d;function d(r,n){return r[0]=Math.floor(n[0]),r[1]=Math.floor(n[1]),r[2]=Math.floor(n[2]),r}},7447:function(l,d,r){l.exports=u;var n=r(8501)();function u(a,o,c,s,b,g){var A,v;for(o||(o=3),c||(c=0),s?v=Math.min(s*o+c,a.length):v=a.length,A=c;A0&&(c=1/Math.sqrt(c),r[0]=n[0]*c,r[1]=n[1]*c,r[2]=n[2]*c),r}},6660:function(l){l.exports=d;function d(r,n){n=n||1;var u=Math.random()*2*Math.PI,a=Math.random()*2-1,o=Math.sqrt(1-a*a)*n;return r[0]=Math.cos(u)*o,r[1]=Math.sin(u)*o,r[2]=a*n,r}},392:function(l){l.exports=d;function d(r,n,u,a){var o=u[1],c=u[2],s=n[1]-o,b=n[2]-c,g=Math.sin(a),A=Math.cos(a);return r[0]=n[0],r[1]=o+s*A-b*g,r[2]=c+s*g+b*A,r}},3222:function(l){l.exports=d;function d(r,n,u,a){var o=u[0],c=u[2],s=n[0]-o,b=n[2]-c,g=Math.sin(a),A=Math.cos(a);return r[0]=o+b*g+s*A,r[1]=n[1],r[2]=c+b*A-s*g,r}},3388:function(l){l.exports=d;function d(r,n,u,a){var o=u[0],c=u[1],s=n[0]-o,b=n[1]-c,g=Math.sin(a),A=Math.cos(a);return r[0]=o+s*A-b*g,r[1]=c+s*g+b*A,r[2]=n[2],r}},1624:function(l){l.exports=d;function d(r,n){return r[0]=Math.round(n[0]),r[1]=Math.round(n[1]),r[2]=Math.round(n[2]),r}},5685:function(l){l.exports=d;function d(r,n,u){return r[0]=n[0]*u,r[1]=n[1]*u,r[2]=n[2]*u,r}},6722:function(l){l.exports=d;function d(r,n,u,a){return r[0]=n[0]+u[0]*a,r[1]=n[1]+u[1]*a,r[2]=n[2]+u[2]*a,r}},831:function(l){l.exports=d;function d(r,n,u,a){return r[0]=n,r[1]=u,r[2]=a,r}},5294:function(l,d,r){l.exports=r(6403)},3303:function(l,d,r){l.exports=r(4337)},6403:function(l){l.exports=d;function d(r,n){var u=n[0]-r[0],a=n[1]-r[1],o=n[2]-r[2];return u*u+a*a+o*o}},4337:function(l){l.exports=d;function d(r){var n=r[0],u=r[1],a=r[2];return n*n+u*u+a*a}},8921:function(l,d,r){l.exports=r(911)},911:function(l){l.exports=d;function d(r,n,u){return r[0]=n[0]-u[0],r[1]=n[1]-u[1],r[2]=n[2]-u[2],r}},9908:function(l){l.exports=d;function d(r,n,u){var a=n[0],o=n[1],c=n[2];return r[0]=a*u[0]+o*u[3]+c*u[6],r[1]=a*u[1]+o*u[4]+c*u[7],r[2]=a*u[2]+o*u[5]+c*u[8],r}},3255:function(l){l.exports=d;function d(r,n,u){var a=n[0],o=n[1],c=n[2],s=u[3]*a+u[7]*o+u[11]*c+u[15];return s=s||1,r[0]=(u[0]*a+u[4]*o+u[8]*c+u[12])/s,r[1]=(u[1]*a+u[5]*o+u[9]*c+u[13])/s,r[2]=(u[2]*a+u[6]*o+u[10]*c+u[14])/s,r}},6568:function(l){l.exports=d;function d(r,n,u){var a=n[0],o=n[1],c=n[2],s=u[0],b=u[1],g=u[2],A=u[3],v=A*a+b*c-g*o,h=A*o+g*a-s*c,x=A*c+s*o-b*a,C=-s*a-b*o-g*c;return r[0]=v*A+C*-s+h*-g-x*-b,r[1]=h*A+C*-b+x*-s-v*-g,r[2]=x*A+C*-g+v*-b-h*-s,r}},3433:function(l){l.exports=d;function d(r,n,u){return r[0]=n[0]+u[0],r[1]=n[1]+u[1],r[2]=n[2]+u[2],r[3]=n[3]+u[3],r}},1413:function(l){l.exports=d;function d(r){var n=new Float32Array(4);return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n}},3470:function(l){l.exports=d;function d(r,n){return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r}},5313:function(l){l.exports=d;function d(){var r=new Float32Array(4);return r[0]=0,r[1]=0,r[2]=0,r[3]=0,r}},5446:function(l){l.exports=d;function d(r,n){var u=n[0]-r[0],a=n[1]-r[1],o=n[2]-r[2],c=n[3]-r[3];return Math.sqrt(u*u+a*a+o*o+c*c)}},205:function(l){l.exports=d;function d(r,n,u){return r[0]=n[0]/u[0],r[1]=n[1]/u[1],r[2]=n[2]/u[2],r[3]=n[3]/u[3],r}},4242:function(l){l.exports=d;function d(r,n){return r[0]*n[0]+r[1]*n[1]+r[2]*n[2]+r[3]*n[3]}},5680:function(l){l.exports=d;function d(r,n,u,a){var o=new Float32Array(4);return o[0]=r,o[1]=n,o[2]=u,o[3]=a,o}},4020:function(l,d,r){l.exports={create:r(5313),clone:r(1413),fromValues:r(5680),copy:r(3470),set:r(6453),add:r(3433),subtract:r(2705),multiply:r(746),divide:r(205),min:r(2170),max:r(3030),scale:r(5510),scaleAndAdd:r(4224),distance:r(5446),squaredDistance:r(1542),length:r(8177),squaredLength:r(9037),negate:r(6459),inverse:r(8057),normalize:r(381),dot:r(4242),lerp:r(8746),random:r(3770),transformMat4:r(6342),transformQuat:r(5022)}},8057:function(l){l.exports=d;function d(r,n){return r[0]=1/n[0],r[1]=1/n[1],r[2]=1/n[2],r[3]=1/n[3],r}},8177:function(l){l.exports=d;function d(r){var n=r[0],u=r[1],a=r[2],o=r[3];return Math.sqrt(n*n+u*u+a*a+o*o)}},8746:function(l){l.exports=d;function d(r,n,u,a){var o=n[0],c=n[1],s=n[2],b=n[3];return r[0]=o+a*(u[0]-o),r[1]=c+a*(u[1]-c),r[2]=s+a*(u[2]-s),r[3]=b+a*(u[3]-b),r}},3030:function(l){l.exports=d;function d(r,n,u){return r[0]=Math.max(n[0],u[0]),r[1]=Math.max(n[1],u[1]),r[2]=Math.max(n[2],u[2]),r[3]=Math.max(n[3],u[3]),r}},2170:function(l){l.exports=d;function d(r,n,u){return r[0]=Math.min(n[0],u[0]),r[1]=Math.min(n[1],u[1]),r[2]=Math.min(n[2],u[2]),r[3]=Math.min(n[3],u[3]),r}},746:function(l){l.exports=d;function d(r,n,u){return r[0]=n[0]*u[0],r[1]=n[1]*u[1],r[2]=n[2]*u[2],r[3]=n[3]*u[3],r}},6459:function(l){l.exports=d;function d(r,n){return r[0]=-n[0],r[1]=-n[1],r[2]=-n[2],r[3]=-n[3],r}},381:function(l){l.exports=d;function d(r,n){var u=n[0],a=n[1],o=n[2],c=n[3],s=u*u+a*a+o*o+c*c;return s>0&&(s=1/Math.sqrt(s),r[0]=u*s,r[1]=a*s,r[2]=o*s,r[3]=c*s),r}},3770:function(l,d,r){var n=r(381),u=r(5510);l.exports=a;function a(o,c){return c=c||1,o[0]=Math.random(),o[1]=Math.random(),o[2]=Math.random(),o[3]=Math.random(),n(o,o),u(o,o,c),o}},5510:function(l){l.exports=d;function d(r,n,u){return r[0]=n[0]*u,r[1]=n[1]*u,r[2]=n[2]*u,r[3]=n[3]*u,r}},4224:function(l){l.exports=d;function d(r,n,u,a){return r[0]=n[0]+u[0]*a,r[1]=n[1]+u[1]*a,r[2]=n[2]+u[2]*a,r[3]=n[3]+u[3]*a,r}},6453:function(l){l.exports=d;function d(r,n,u,a,o){return r[0]=n,r[1]=u,r[2]=a,r[3]=o,r}},1542:function(l){l.exports=d;function d(r,n){var u=n[0]-r[0],a=n[1]-r[1],o=n[2]-r[2],c=n[3]-r[3];return u*u+a*a+o*o+c*c}},9037:function(l){l.exports=d;function d(r){var n=r[0],u=r[1],a=r[2],o=r[3];return n*n+u*u+a*a+o*o}},2705:function(l){l.exports=d;function d(r,n,u){return r[0]=n[0]-u[0],r[1]=n[1]-u[1],r[2]=n[2]-u[2],r[3]=n[3]-u[3],r}},6342:function(l){l.exports=d;function d(r,n,u){var a=n[0],o=n[1],c=n[2],s=n[3];return r[0]=u[0]*a+u[4]*o+u[8]*c+u[12]*s,r[1]=u[1]*a+u[5]*o+u[9]*c+u[13]*s,r[2]=u[2]*a+u[6]*o+u[10]*c+u[14]*s,r[3]=u[3]*a+u[7]*o+u[11]*c+u[15]*s,r}},5022:function(l){l.exports=d;function d(r,n,u){var a=n[0],o=n[1],c=n[2],s=u[0],b=u[1],g=u[2],A=u[3],v=A*a+b*c-g*o,h=A*o+g*a-s*c,x=A*c+s*o-b*a,C=-s*a-b*o-g*c;return r[0]=v*A+C*-s+h*-g-x*-b,r[1]=h*A+C*-b+x*-s-v*-g,r[2]=x*A+C*-g+v*-b-h*-s,r[3]=n[3],r}},9365:function(l,d,r){var n=r(8096),u=r(7896);l.exports=a;function a(o){for(var c=Array.isArray(o)?o:n(o),s=0;s0)continue;Pe=We.slice(0,1).join("")}return te(Pe),ie+=Pe.length,B=B.slice(Pe.length),B.length}while(1)}function Me(){return/[^a-fA-F0-9]/.test(U)?(te(B.join("")),z=s,O):(B.push(U),H=U,O+1)}function Ae(){return U==="."||/[eE]/.test(U)?(B.push(U),z=C,H=U,O+1):U==="x"&&B.length===1&&B[0]==="0"?(z=f,B.push(U),H=U,O+1):/[^\d]/.test(U)?(te(B.join("")),z=s,O):(B.push(U),H=U,O+1)}function De(){return U==="f"&&(B.push(U),H=U,O+=1),/[eE]/.test(U)||(U==="-"||U==="+")&&/[eE]/.test(H)?(B.push(U),H=U,O+1):/[^\d]/.test(U)?(te(B.join("")),z=s,O):(B.push(U),H=U,O+1)}function ke(){if(/[^\d\w_]/.test(U)){var We=B.join("");return fe[We]?z=w:ae[We]?z=L:z=D,te(B.join("")),z=s,O}return B.push(U),H=U,O+1}}},3585:function(l,d,r){var n=r(9525);n=n.slice().filter(function(u){return!/^(gl\_|texture)/.test(u)}),l.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},9525:function(l){l.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},9458:function(l,d,r){var n=r(399);l.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},399:function(l){l.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},9746:function(l){l.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},8096:function(l,d,r){var n=r(3193);l.exports=u;function u(a,o){var c=n(o),s=[];return s=s.concat(c(a)),s=s.concat(c(null)),s}},6832:function(l){l.exports=function(d){typeof d=="string"&&(d=[d]);for(var r=[].slice.call(arguments,1),n=[],u=0;u0;){x=S.pop();for(var f=x.adjacent,P=0;P<=D;++P){var E=f[P];if(!(!E.boundary||E.lastVisited<=-L)){for(var k=E.vertices,O=0;O<=D;++O){var G=k[O];G<0?w[O]=C:w[O]=M[G]}var z=this.orient();if(z>0)return E;E.lastVisited=-L,z===0&&S.push(E)}}}return null},v.walk=function(x,C){var D=this.vertices.length-1,L=this.dimension,w=this.vertices,M=this.tuple,S=C?this.interior.length*Math.random()|0:this.interior.length-1,f=this.interior[S];e:for(;!f.boundary;){for(var P=f.vertices,E=f.adjacent,k=0;k<=L;++k)M[k]=w[P[k]];f.lastVisited=D;for(var k=0;k<=L;++k){var O=E[k];if(!(O.lastVisited>=D)){var G=M[k];M[k]=x;var z=this.orient();if(M[k]=G,z<0){f=O;continue e}else O.boundary?O.lastVisited=-D:O.lastVisited=D}}return}return f},v.addPeaks=function(x,C){var D=this.vertices.length-1,L=this.dimension,w=this.vertices,M=this.tuple,S=this.interior,f=this.simplices,P=[C];C.lastVisited=D,C.vertices[C.vertices.indexOf(-1)]=D,C.boundary=!1,S.push(C);for(var E=[];P.length>0;){var C=P.pop(),k=C.vertices,O=C.adjacent,G=k.indexOf(D);if(!(G<0)){for(var z=0;z<=L;++z)if(z!==G){var U=O[z];if(!(!U.boundary||U.lastVisited>=D)){var H=U.vertices;if(U.lastVisited!==-D){for(var B=0,W=0;W<=L;++W)H[W]<0?(B=W,M[W]=x):M[W]=w[H[W]];var q=this.orient();if(q>0){H[B]=D,U.boundary=!1,S.push(U),P.push(U),U.lastVisited=D;continue}else U.lastVisited=-D}var re=U.adjacent,ie=k.slice(),le=O.slice(),he=new a(ie,le,!0);f.push(he);var $=re.indexOf(C);if(!($<0)){re[$]=he,le[G]=U,ie[z]=-1,le[z]=C,O[z]=he,he.flip();for(var W=0;W<=L;++W){var Z=ie[W];if(!(Z<0||Z===D)){for(var K=new Array(L-1),Q=0,ae=0;ae<=L;++ae){var fe=ie[ae];fe<0||ae===W||(K[Q++]=fe)}E.push(new o(K,he,W))}}}}}}}E.sort(c);for(var z=0;z+1=0?S[P++]=f[k]:E=k&1;if(E===(x&1)){var O=S[0];S[0]=S[1],S[1]=O}C.push(S)}}return C};function h(x,C){var D=x.length;if(D===0)throw new Error("Must have at least d+1 points");var L=x[0].length;if(D<=L)throw new Error("Must input at least d+1 points");var w=x.slice(0,L+1),M=n.apply(void 0,w);if(M===0)throw new Error("Input not in general position");for(var S=new Array(L+1),f=0;f<=L;++f)S[f]=f;M<0&&(S[0]=1,S[1]=0);for(var P=new a(S,new Array(L+1),!1),E=P.adjacent,k=new Array(L+2),f=0;f<=L;++f){for(var O=S.slice(),G=0;G<=L;++G)G===f&&(O[G]=-1);var z=O[0];O[0]=O[1],O[1]=z;var U=new a(O,new Array(L+1),!0);E[f]=U,k[f]=U}k[L+1]=P;for(var f=0;f<=L;++f)for(var O=E[f].vertices,H=E[f].adjacent,G=0;G<=L;++G){var B=O[G];if(B<0){H[G]=P;continue}for(var W=0;W<=L;++W)E[W].vertices.indexOf(B)<0&&(H[G]=E[W])}for(var q=new A(L,w,k),re=!!C,f=L+1;f3*(k+1)?A(this,E):this.left.insert(E):this.left=M([E]);else if(E[0]>this.mid)this.right?4*(this.right.count+1)>3*(k+1)?A(this,E):this.right.insert(E):this.right=M([E]);else{var O=n.ge(this.leftPoints,E,L),G=n.ge(this.rightPoints,E,w);this.leftPoints.splice(O,0,E),this.rightPoints.splice(G,0,E)}},s.remove=function(E){var k=this.count-this.leftPoints;if(E[1]3*(k-1))return v(this,E);var G=this.left.remove(E);return G===o?(this.left=null,this.count-=1,a):(G===a&&(this.count-=1),G)}else if(E[0]>this.mid){if(!this.right)return u;var z=this.left?this.left.count:0;if(4*z>3*(k-1))return v(this,E);var G=this.right.remove(E);return G===o?(this.right=null,this.count-=1,a):(G===a&&(this.count-=1),G)}else{if(this.count===1)return this.leftPoints[0]===E?o:u;if(this.leftPoints.length===1&&this.leftPoints[0]===E){if(this.left&&this.right){for(var U=this,H=this.left;H.right;)U=H,H=H.right;if(U===this)H.right=this.right;else{var B=this.left,G=this.right;U.count-=H.count,U.right=H.left,H.left=B,H.right=G}b(this,H),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?b(this,this.left):b(this,this.right);return a}for(var B=n.ge(this.leftPoints,E,L);B=0&&E[G][1]>=k;--G){var z=O(E[G]);if(z)return z}}function C(E,k){for(var O=0;Othis.mid){if(this.right){var O=this.right.queryPoint(E,k);if(O)return O}return x(this.rightPoints,E,k)}else return C(this.leftPoints,k)},s.queryInterval=function(E,k,O){if(Ethis.mid&&this.right){var G=this.right.queryInterval(E,k,O);if(G)return G}return kthis.mid?x(this.rightPoints,E,O):C(this.leftPoints,O)};function D(E,k){return E-k}function L(E,k){var O=E[0]-k[0];return O||E[1]-k[1]}function w(E,k){var O=E[1]-k[1];return O||E[0]-k[0]}function M(E){if(E.length===0)return null;for(var k=[],O=0;O>1],z=[],U=[],H=[],O=0;O +* @license MIT +*/l.exports=function(n){return n!=null&&(d(n)||r(n)||!!n._isBuffer)};function d(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function r(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&d(n.slice(0,0))}},3596:function(l){l.exports=function(d){for(var r=d.length,n,u=0;u13)&&n!==32&&n!==133&&n!==160&&n!==5760&&n!==6158&&(n<8192||n>8205)&&n!==8232&&n!==8233&&n!==8239&&n!==8287&&n!==8288&&n!==12288&&n!==65279)return!1;return!0}},3578:function(l){function d(r,n,u){return r*(1-u)+n*u}l.exports=d},7191:function(l,d,r){var n=r(4690),u=r(9823),a=r(7332),o=r(7787),c=r(7437),s=r(2142),b={length:r(4693),normalize:r(899),dot:r(9305),cross:r(903)},g=u(),A=u(),v=[0,0,0,0],h=[[0,0,0],[0,0,0],[0,0,0]],x=[0,0,0];l.exports=function(M,S,f,P,E,k){if(S||(S=[0,0,0]),f||(f=[0,0,0]),P||(P=[0,0,0]),E||(E=[0,0,0,1]),k||(k=[0,0,0,1]),!n(g,M)||(a(A,g),A[3]=0,A[7]=0,A[11]=0,A[15]=1,Math.abs(o(A)<1e-8)))return!1;var O=g[3],G=g[7],z=g[11],U=g[12],H=g[13],B=g[14],W=g[15];if(O!==0||G!==0||z!==0){v[0]=O,v[1]=G,v[2]=z,v[3]=W;var q=c(A,A);if(!q)return!1;s(A,A),C(E,v,A)}else E[0]=E[1]=E[2]=0,E[3]=1;if(S[0]=U,S[1]=H,S[2]=B,D(h,g),f[0]=b.length(h[0]),b.normalize(h[0],h[0]),P[0]=b.dot(h[0],h[1]),L(h[1],h[1],h[0],1,-P[0]),f[1]=b.length(h[1]),b.normalize(h[1],h[1]),P[0]/=f[1],P[1]=b.dot(h[0],h[2]),L(h[2],h[2],h[0],1,-P[1]),P[2]=b.dot(h[1],h[2]),L(h[2],h[2],h[1],1,-P[2]),f[2]=b.length(h[2]),b.normalize(h[2],h[2]),P[1]/=f[2],P[2]/=f[2],b.cross(x,h[1],h[2]),b.dot(h[0],x)<0)for(var re=0;re<3;re++)f[re]*=-1,h[re][0]*=-1,h[re][1]*=-1,h[re][2]*=-1;return k[0]=.5*Math.sqrt(Math.max(1+h[0][0]-h[1][1]-h[2][2],0)),k[1]=.5*Math.sqrt(Math.max(1-h[0][0]+h[1][1]-h[2][2],0)),k[2]=.5*Math.sqrt(Math.max(1-h[0][0]-h[1][1]+h[2][2],0)),k[3]=.5*Math.sqrt(Math.max(1+h[0][0]+h[1][1]+h[2][2],0)),h[2][1]>h[1][2]&&(k[0]=-k[0]),h[0][2]>h[2][0]&&(k[1]=-k[1]),h[1][0]>h[0][1]&&(k[2]=-k[2]),!0};function C(w,M,S){var f=M[0],P=M[1],E=M[2],k=M[3];return w[0]=S[0]*f+S[4]*P+S[8]*E+S[12]*k,w[1]=S[1]*f+S[5]*P+S[9]*E+S[13]*k,w[2]=S[2]*f+S[6]*P+S[10]*E+S[14]*k,w[3]=S[3]*f+S[7]*P+S[11]*E+S[15]*k,w}function D(w,M){w[0][0]=M[0],w[0][1]=M[1],w[0][2]=M[2],w[1][0]=M[4],w[1][1]=M[5],w[1][2]=M[6],w[2][0]=M[8],w[2][1]=M[9],w[2][2]=M[10]}function L(w,M,S,f,P){w[0]=M[0]*f+S[0]*P,w[1]=M[1]*f+S[1]*P,w[2]=M[2]*f+S[2]*P}},4690:function(l){l.exports=function(r,n){var u=n[15];if(u===0)return!1;for(var a=1/u,o=0;o<16;o++)r[o]=n[o]*a;return!0}},7649:function(l,d,r){var n=r(1868),u=r(1102),a=r(7191),o=r(7787),c=r(1116),s=v(),b=v(),g=v();l.exports=A;function A(C,D,L,w){if(o(D)===0||o(L)===0)return!1;var M=a(D,s.translate,s.scale,s.skew,s.perspective,s.quaternion),S=a(L,b.translate,b.scale,b.skew,b.perspective,b.quaternion);return!M||!S?!1:(n(g.translate,s.translate,b.translate,w),n(g.skew,s.skew,b.skew,w),n(g.scale,s.scale,b.scale,w),n(g.perspective,s.perspective,b.perspective,w),c(g.quaternion,s.quaternion,b.quaternion,w),u(C,g.translate,g.scale,g.skew,g.perspective,g.quaternion),!0)}function v(){return{translate:h(),scale:h(1),skew:h(),perspective:x(),quaternion:x()}}function h(C){return[C||0,C||0,C||0]}function x(){return[0,0,0,1]}},1102:function(l,d,r){var n={identity:r(9947),translate:r(998),multiply:r(104),create:r(9823),scale:r(3668),fromRotationTranslation:r(7280)};n.create();var u=n.create();l.exports=function(o,c,s,b,g,A){return n.identity(o),n.fromRotationTranslation(o,A,c),o[3]=g[0],o[7]=g[1],o[11]=g[2],o[15]=g[3],n.identity(u),b[2]!==0&&(u[9]=b[2],n.multiply(o,o,u)),b[1]!==0&&(u[9]=0,u[8]=b[1],n.multiply(o,o,u)),b[0]!==0&&(u[8]=0,u[4]=b[0],n.multiply(o,o,u)),n.scale(o,o,s),o}},9298:function(l,d,r){var n=r(5070),u=r(7649),a=r(7437),o=r(6109),c=r(7115),s=r(5240),b=r(3012),g=r(998);r(3668);var A=r(899),v=[0,0,0];l.exports=D;function h(L){this._components=L.slice(),this._time=[0],this.prevMatrix=L.slice(),this.nextMatrix=L.slice(),this.computedMatrix=L.slice(),this.computedInverse=L.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var x=h.prototype;x.recalcMatrix=function(L){var w=this._time,M=n.le(w,L),S=this.computedMatrix;if(!(M<0)){var f=this._components;if(M===w.length-1)for(var P=16*M,E=0;E<16;++E)S[E]=f[P++];else{for(var k=w[M+1]-w[M],P=16*M,O=this.prevMatrix,G=!0,E=0;E<16;++E)O[E]=f[P++];for(var z=this.nextMatrix,E=0;E<16;++E)z[E]=f[P++],G=G&&O[E]===z[E];if(k<1e-6||G)for(var E=0;E<16;++E)S[E]=O[E];else u(S,O,z,(L-w[M])/k)}var U=this.computedUp;U[0]=S[1],U[1]=S[5],U[2]=S[9],A(U,U);var H=this.computedInverse;a(H,S);var B=this.computedEye,W=H[15];B[0]=H[12]/W,B[1]=H[13]/W,B[2]=H[14]/W;for(var q=this.computedCenter,re=Math.exp(this.computedRadius[0]),E=0;E<3;++E)q[E]=B[E]-S[2+4*E]*re}},x.idle=function(L){if(!(L1&&n(a[b[h-2]],a[b[h-1]],v)<=0;)h-=1,b.pop();for(b.push(A),h=g.length;h>1&&n(a[g[h-2]],a[g[h-1]],v)>=0;)h-=1,g.pop();g.push(A)}for(var x=new Array(g.length+b.length-2),C=0,c=0,D=b.length;c0;--L)x[C++]=g[L];return x}},6145:function(l,d,r){l.exports=u;var n=r(4110);function u(a,o){o||(o=a,a=window);var c=0,s=0,b=0,g={shift:!1,alt:!1,control:!1,meta:!1},A=!1;function v(E){var k=!1;return"altKey"in E&&(k=k||E.altKey!==g.alt,g.alt=!!E.altKey),"shiftKey"in E&&(k=k||E.shiftKey!==g.shift,g.shift=!!E.shiftKey),"ctrlKey"in E&&(k=k||E.ctrlKey!==g.control,g.control=!!E.ctrlKey),"metaKey"in E&&(k=k||E.metaKey!==g.meta,g.meta=!!E.metaKey),k}function h(E,k){var O=n.x(k),G=n.y(k);"buttons"in k&&(E=k.buttons|0),(E!==c||O!==s||G!==b||v(k))&&(c=E|0,s=O||0,b=G||0,o&&o(c,s,b,g))}function x(E){h(0,E)}function C(){(c||s||b||g.shift||g.alt||g.meta||g.control)&&(s=b=0,c=0,g.shift=g.alt=g.control=g.meta=!1,o&&o(0,0,0,g))}function D(E){v(E)&&o&&o(c,s,b,g)}function L(E){n.buttons(E)===0?h(0,E):h(c,E)}function w(E){h(c|n.buttons(E),E)}function M(E){h(c&~n.buttons(E),E)}function S(){A||(A=!0,a.addEventListener("mousemove",L),a.addEventListener("mousedown",w),a.addEventListener("mouseup",M),a.addEventListener("mouseleave",x),a.addEventListener("mouseenter",x),a.addEventListener("mouseout",x),a.addEventListener("mouseover",x),a.addEventListener("blur",C),a.addEventListener("keyup",D),a.addEventListener("keydown",D),a.addEventListener("keypress",D),a!==window&&(window.addEventListener("blur",C),window.addEventListener("keyup",D),window.addEventListener("keydown",D),window.addEventListener("keypress",D)))}function f(){!A||(A=!1,a.removeEventListener("mousemove",L),a.removeEventListener("mousedown",w),a.removeEventListener("mouseup",M),a.removeEventListener("mouseleave",x),a.removeEventListener("mouseenter",x),a.removeEventListener("mouseout",x),a.removeEventListener("mouseover",x),a.removeEventListener("blur",C),a.removeEventListener("keyup",D),a.removeEventListener("keydown",D),a.removeEventListener("keypress",D),a!==window&&(window.removeEventListener("blur",C),window.removeEventListener("keyup",D),window.removeEventListener("keydown",D),window.removeEventListener("keypress",D)))}S();var P={element:a};return Object.defineProperties(P,{enabled:{get:function(){return A},set:function(E){E?S():f()},enumerable:!0},buttons:{get:function(){return c},enumerable:!0},x:{get:function(){return s},enumerable:!0},y:{get:function(){return b},enumerable:!0},mods:{get:function(){return g},enumerable:!0}}),P}},2565:function(l){var d={left:0,top:0};l.exports=r;function r(u,a,o){a=a||u.currentTarget||u.srcElement,Array.isArray(o)||(o=[0,0]);var c=u.clientX||0,s=u.clientY||0,b=n(a);return o[0]=c-b.left,o[1]=s-b.top,o}function n(u){return u===window||u===document||u===document.body?d:u.getBoundingClientRect()}},4110:function(l,d){function r(o){if(typeof o=="object"){if("buttons"in o)return o.buttons;if("which"in o){var c=o.which;if(c===2)return 4;if(c===3)return 2;if(c>0)return 1<=0)return 1<0){if(le=1,Z[Q++]=g(S[k],C,D,L),k+=q,w>0)for(ie=1,O=S[k],ae=Z[Q]=g(O,C,D,L),ne=Z[Q+fe],de=Z[Q+ce],Te=Z[Q+we],(ae!==ne||ae!==de||ae!==Te)&&(z=S[k+G],H=S[k+U],W=S[k+B],s(ie,le,O,z,H,W,ae,ne,de,Te,C,D,L),Fe=K[Q]=he++),Q+=1,k+=q,ie=2;ie0)for(ie=1,O=S[k],ae=Z[Q]=g(O,C,D,L),ne=Z[Q+fe],de=Z[Q+ce],Te=Z[Q+we],(ae!==ne||ae!==de||ae!==Te)&&(z=S[k+G],H=S[k+U],W=S[k+B],s(ie,le,O,z,H,W,ae,ne,de,Te,C,D,L),Fe=K[Q]=he++,Te!==de&&b(K[Q+ce],Fe,H,W,de,Te,C,D,L)),Q+=1,k+=q,ie=2;ie0){if(ie=1,Z[Q++]=g(S[k],C,D,L),k+=q,M>0)for(le=1,O=S[k],ae=Z[Q]=g(O,C,D,L),de=Z[Q+ce],ne=Z[Q+fe],Te=Z[Q+we],(ae!==de||ae!==ne||ae!==Te)&&(z=S[k+G],H=S[k+U],W=S[k+B],s(ie,le,O,z,H,W,ae,de,ne,Te,C,D,L),Fe=K[Q]=he++),Q+=1,k+=q,le=2;le0)for(le=1,O=S[k],ae=Z[Q]=g(O,C,D,L),de=Z[Q+ce],ne=Z[Q+fe],Te=Z[Q+we],(ae!==de||ae!==ne||ae!==Te)&&(z=S[k+G],H=S[k+U],W=S[k+B],s(ie,le,O,z,H,W,ae,de,ne,Te,C,D,L),Fe=K[Q]=he++,Te!==de&&b(K[Q+ce],Fe,W,z,Te,de,C,D,L)),Q+=1,k+=q,le=2;le 0"),typeof c.vertex!="function"&&s("Must specify vertex creation function"),typeof c.cell!="function"&&s("Must specify cell creation function"),typeof c.phase!="function"&&s("Must specify phase function");for(var v=c.getters||[],h=new Array(g),x=0;x=0?h[x]=!0:h[x]=!1;return a(c.vertex,c.cell,c.phase,A,b,h)}},9144:function(l,d,r){var n=r(3094),u={zero:function(D,L,w,M){var S=D[0],f=w[0];M|=0;var P=0,E=f;for(P=0;P2&&P[1]>2&&M(f.pick(-1,-1).lo(1,1).hi(P[0]-2,P[1]-2),S.pick(-1,-1,0).lo(1,1).hi(P[0]-2,P[1]-2),S.pick(-1,-1,1).lo(1,1).hi(P[0]-2,P[1]-2)),P[1]>2&&(w(f.pick(0,-1).lo(1).hi(P[1]-2),S.pick(0,-1,1).lo(1).hi(P[1]-2)),L(S.pick(0,-1,0).lo(1).hi(P[1]-2))),P[1]>2&&(w(f.pick(P[0]-1,-1).lo(1).hi(P[1]-2),S.pick(P[0]-1,-1,1).lo(1).hi(P[1]-2)),L(S.pick(P[0]-1,-1,0).lo(1).hi(P[1]-2))),P[0]>2&&(w(f.pick(-1,0).lo(1).hi(P[0]-2),S.pick(-1,0,0).lo(1).hi(P[0]-2)),L(S.pick(-1,0,1).lo(1).hi(P[0]-2))),P[0]>2&&(w(f.pick(-1,P[1]-1).lo(1).hi(P[0]-2),S.pick(-1,P[1]-1,0).lo(1).hi(P[0]-2)),L(S.pick(-1,P[1]-1,1).lo(1).hi(P[0]-2))),S.set(0,0,0,0),S.set(0,0,1,0),S.set(P[0]-1,0,0,0),S.set(P[0]-1,0,1,0),S.set(0,P[1]-1,0,0),S.set(0,P[1]-1,1,0),S.set(P[0]-1,P[1]-1,0,0),S.set(P[0]-1,P[1]-1,1,0),S}}function C(D){var L=D.join(),P=g[L];if(P)return P;for(var w=D.length,M=[A,v],S=1;S<=w;++S)M.push(h(S));var f=x,P=f.apply(void 0,M);return g[L]=P,P}l.exports=function(L,w,M){if(Array.isArray(M)||(typeof M=="string"?M=n(w.dimension,M):M=n(w.dimension,"clamp")),w.size===0)return L;if(w.dimension===0)return L.set(0),L;var S=C(M);return S(L,w)}},3581:function(l){function d(o,c){var s=Math.floor(c),b=c-s,g=0<=s&&s0;){H<64?(w=H,H=0):(w=64,H-=64);for(var B=g[1]|0;B>0;){B<64?(M=B,B=0):(M=64,B-=64),h=z+H*f+B*P,D=U+H*k+B*O;var W=0,q=0,re=0,ie=E,le=f-S*E,he=P-w*f,$=G,Z=k-S*G,K=O-w*k;for(re=0;re0;){O<64?(w=O,O=0):(w=64,O-=64);for(var G=g[0]|0;G>0;){G<64?(L=G,G=0):(L=64,G-=64),h=E+O*S+G*M,D=k+O*P+G*f;var z=0,U=0,H=S,B=M-w*S,W=P,q=f-w*P;for(U=0;U0;){U<64?(M=U,U=0):(M=64,U-=64);for(var H=g[0]|0;H>0;){H<64?(L=H,H=0):(L=64,H-=64);for(var B=g[1]|0;B>0;){B<64?(w=B,B=0):(w=64,B-=64),h=G+U*P+H*S+B*f,D=z+U*O+H*E+B*k;var W=0,q=0,re=0,ie=P,le=S-M*P,he=f-L*S,$=O,Z=E-M*O,K=k-L*E;for(re=0;rex;){W=0,q=z-w;t:for(H=0;Hie)break t;q+=E,W+=k}for(W=z,q=z-w,H=0;H>1,B=H-G,W=H+G,q=z,re=B,ie=H,le=W,he=U,$=C+1,Z=D-1,K=!0,Q,ae,fe,te,ne,ce,oe,de,we,Se=0,Te=0,Fe=0,Ie,Me,Ae,De,ke,We,_e,Ye,Pe,Ve,Ze,Ke,lt,vt,mt,Et,et=P,Ue=v(et),Be=v(et);Me=M*q,Ae=M*re,Et=w;e:for(Ie=0;Ie0){ae=q,q=re,re=ae;break e}if(Fe<0)break e;Et+=k}Me=M*le,Ae=M*he,Et=w;e:for(Ie=0;Ie0){ae=le,le=he,he=ae;break e}if(Fe<0)break e;Et+=k}Me=M*q,Ae=M*ie,Et=w;e:for(Ie=0;Ie0){ae=q,q=ie,ie=ae;break e}if(Fe<0)break e;Et+=k}Me=M*re,Ae=M*ie,Et=w;e:for(Ie=0;Ie0){ae=re,re=ie,ie=ae;break e}if(Fe<0)break e;Et+=k}Me=M*q,Ae=M*le,Et=w;e:for(Ie=0;Ie0){ae=q,q=le,le=ae;break e}if(Fe<0)break e;Et+=k}Me=M*ie,Ae=M*le,Et=w;e:for(Ie=0;Ie0){ae=ie,ie=le,le=ae;break e}if(Fe<0)break e;Et+=k}Me=M*re,Ae=M*he,Et=w;e:for(Ie=0;Ie0){ae=re,re=he,he=ae;break e}if(Fe<0)break e;Et+=k}Me=M*re,Ae=M*ie,Et=w;e:for(Ie=0;Ie0){ae=re,re=ie,ie=ae;break e}if(Fe<0)break e;Et+=k}Me=M*le,Ae=M*he,Et=w;e:for(Ie=0;Ie0){ae=le,le=he,he=ae;break e}if(Fe<0)break e;Et+=k}for(Me=M*q,Ae=M*re,De=M*ie,ke=M*le,We=M*he,_e=M*z,Ye=M*H,Pe=M*U,mt=0,Et=w,Ie=0;Ie0)Z--;else if(Fe<0){for(Me=M*ce,Ae=M*$,De=M*Z,Et=w,Ie=0;Ie0)for(;;){oe=w+Z*M,mt=0;e:for(Ie=0;Ie0){if(--ZU){e:for(;;){for(oe=w+$*M,mt=0,Et=w,Ie=0;Ie1&&x?D(h,x[0],x[1]):D(h)}var b={"uint32,1,0":function(A,v){return function(h){var x=h.data,C=h.offset|0,D=h.shape,L=h.stride,w=L[0]|0,M=D[0]|0,S=L[1]|0,f=D[1]|0,P=S,E=S,k=1;M<=32?A(0,M-1,x,C,w,S,M,f,P,E,k):v(0,M-1,x,C,w,S,M,f,P,E,k)}}};function g(A,v){var h=[v,A].join(","),x=b[h],C=o(A,v),D=s(A,v,C);return x(C,D)}l.exports=g},8729:function(l,d,r){var n=r(8139),u={};function a(o){var c=o.order,s=o.dtype,b=[c,s],g=b.join(":"),A=u[g];return A||(u[g]=A=n(c,s)),A(o),o}l.exports=a},5050:function(l,d,r){var n=r(4780),u=typeof Float64Array<"u";function a(v,h){return v[0]-h[0]}function o(){var v=this.stride,h=new Array(v.length),x;for(x=0;x=0&&(S=w|0,M+=P*S,f-=S),new C(this.data,f,P,M)},D.step=function(w){var M=this.shape[0],S=this.stride[0],f=this.offset,P=0,E=Math.ceil;return typeof w=="number"&&(P=w|0,P<0?(f+=S*(M-1),M=E(-M/P)):M=E(M/P),S*=P),new C(this.data,M,S,f)},D.transpose=function(w){w=w===void 0?0:w|0;var M=this.shape,S=this.stride;return new C(this.data,M[w],S[w],this.offset)},D.pick=function(w){var M=[],S=[],f=this.offset;typeof w=="number"&&w>=0?f=f+this.stride[0]*w|0:(M.push(this.shape[0]),S.push(this.stride[0]));var P=h[M.length+1];return P(this.data,M,S,f)},function(w,M,S,f){return new C(w,M[0],S[0],f)}},2:function(v,h,x){function C(L,w,M,S,f,P){this.data=L,this.shape=[w,M],this.stride=[S,f],this.offset=P|0}var D=C.prototype;return D.dtype=v,D.dimension=2,Object.defineProperty(D,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(D,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),D.set=function(w,M,S){return v==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*M,S):this.data[this.offset+this.stride[0]*w+this.stride[1]*M]=S},D.get=function(w,M){return v==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*M):this.data[this.offset+this.stride[0]*w+this.stride[1]*M]},D.index=function(w,M){return this.offset+this.stride[0]*w+this.stride[1]*M},D.hi=function(w,M){return new C(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof M!="number"||M<0?this.shape[1]:M|0,this.stride[0],this.stride[1],this.offset)},D.lo=function(w,M){var S=this.offset,f=0,P=this.shape[0],E=this.shape[1],k=this.stride[0],O=this.stride[1];return typeof w=="number"&&w>=0&&(f=w|0,S+=k*f,P-=f),typeof M=="number"&&M>=0&&(f=M|0,S+=O*f,E-=f),new C(this.data,P,E,k,O,S)},D.step=function(w,M){var S=this.shape[0],f=this.shape[1],P=this.stride[0],E=this.stride[1],k=this.offset,O=0,G=Math.ceil;return typeof w=="number"&&(O=w|0,O<0?(k+=P*(S-1),S=G(-S/O)):S=G(S/O),P*=O),typeof M=="number"&&(O=M|0,O<0?(k+=E*(f-1),f=G(-f/O)):f=G(f/O),E*=O),new C(this.data,S,f,P,E,k)},D.transpose=function(w,M){w=w===void 0?0:w|0,M=M===void 0?1:M|0;var S=this.shape,f=this.stride;return new C(this.data,S[w],S[M],f[w],f[M],this.offset)},D.pick=function(w,M){var S=[],f=[],P=this.offset;typeof w=="number"&&w>=0?P=P+this.stride[0]*w|0:(S.push(this.shape[0]),f.push(this.stride[0])),typeof M=="number"&&M>=0?P=P+this.stride[1]*M|0:(S.push(this.shape[1]),f.push(this.stride[1]));var E=h[S.length+1];return E(this.data,S,f,P)},function(w,M,S,f){return new C(w,M[0],M[1],S[0],S[1],f)}},3:function(v,h,x){function C(L,w,M,S,f,P,E,k){this.data=L,this.shape=[w,M,S],this.stride=[f,P,E],this.offset=k|0}var D=C.prototype;return D.dtype=v,D.dimension=3,Object.defineProperty(D,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(D,"order",{get:function(){var w=Math.abs(this.stride[0]),M=Math.abs(this.stride[1]),S=Math.abs(this.stride[2]);return w>M?M>S?[2,1,0]:w>S?[1,2,0]:[1,0,2]:w>S?[2,0,1]:S>M?[0,1,2]:[0,2,1]}}),D.set=function(w,M,S,f){return v==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*M+this.stride[2]*S,f):this.data[this.offset+this.stride[0]*w+this.stride[1]*M+this.stride[2]*S]=f},D.get=function(w,M,S){return v==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*M+this.stride[2]*S):this.data[this.offset+this.stride[0]*w+this.stride[1]*M+this.stride[2]*S]},D.index=function(w,M,S){return this.offset+this.stride[0]*w+this.stride[1]*M+this.stride[2]*S},D.hi=function(w,M,S){return new C(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof M!="number"||M<0?this.shape[1]:M|0,typeof S!="number"||S<0?this.shape[2]:S|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},D.lo=function(w,M,S){var f=this.offset,P=0,E=this.shape[0],k=this.shape[1],O=this.shape[2],G=this.stride[0],z=this.stride[1],U=this.stride[2];return typeof w=="number"&&w>=0&&(P=w|0,f+=G*P,E-=P),typeof M=="number"&&M>=0&&(P=M|0,f+=z*P,k-=P),typeof S=="number"&&S>=0&&(P=S|0,f+=U*P,O-=P),new C(this.data,E,k,O,G,z,U,f)},D.step=function(w,M,S){var f=this.shape[0],P=this.shape[1],E=this.shape[2],k=this.stride[0],O=this.stride[1],G=this.stride[2],z=this.offset,U=0,H=Math.ceil;return typeof w=="number"&&(U=w|0,U<0?(z+=k*(f-1),f=H(-f/U)):f=H(f/U),k*=U),typeof M=="number"&&(U=M|0,U<0?(z+=O*(P-1),P=H(-P/U)):P=H(P/U),O*=U),typeof S=="number"&&(U=S|0,U<0?(z+=G*(E-1),E=H(-E/U)):E=H(E/U),G*=U),new C(this.data,f,P,E,k,O,G,z)},D.transpose=function(w,M,S){w=w===void 0?0:w|0,M=M===void 0?1:M|0,S=S===void 0?2:S|0;var f=this.shape,P=this.stride;return new C(this.data,f[w],f[M],f[S],P[w],P[M],P[S],this.offset)},D.pick=function(w,M,S){var f=[],P=[],E=this.offset;typeof w=="number"&&w>=0?E=E+this.stride[0]*w|0:(f.push(this.shape[0]),P.push(this.stride[0])),typeof M=="number"&&M>=0?E=E+this.stride[1]*M|0:(f.push(this.shape[1]),P.push(this.stride[1])),typeof S=="number"&&S>=0?E=E+this.stride[2]*S|0:(f.push(this.shape[2]),P.push(this.stride[2]));var k=h[f.length+1];return k(this.data,f,P,E)},function(w,M,S,f){return new C(w,M[0],M[1],M[2],S[0],S[1],S[2],f)}},4:function(v,h,x){function C(L,w,M,S,f,P,E,k,O,G){this.data=L,this.shape=[w,M,S,f],this.stride=[P,E,k,O],this.offset=G|0}var D=C.prototype;return D.dtype=v,D.dimension=4,Object.defineProperty(D,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(D,"order",{get:x}),D.set=function(w,M,S,f,P){return v==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*M+this.stride[2]*S+this.stride[3]*f,P):this.data[this.offset+this.stride[0]*w+this.stride[1]*M+this.stride[2]*S+this.stride[3]*f]=P},D.get=function(w,M,S,f){return v==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*M+this.stride[2]*S+this.stride[3]*f):this.data[this.offset+this.stride[0]*w+this.stride[1]*M+this.stride[2]*S+this.stride[3]*f]},D.index=function(w,M,S,f){return this.offset+this.stride[0]*w+this.stride[1]*M+this.stride[2]*S+this.stride[3]*f},D.hi=function(w,M,S,f){return new C(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof M!="number"||M<0?this.shape[1]:M|0,typeof S!="number"||S<0?this.shape[2]:S|0,typeof f!="number"||f<0?this.shape[3]:f|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},D.lo=function(w,M,S,f){var P=this.offset,E=0,k=this.shape[0],O=this.shape[1],G=this.shape[2],z=this.shape[3],U=this.stride[0],H=this.stride[1],B=this.stride[2],W=this.stride[3];return typeof w=="number"&&w>=0&&(E=w|0,P+=U*E,k-=E),typeof M=="number"&&M>=0&&(E=M|0,P+=H*E,O-=E),typeof S=="number"&&S>=0&&(E=S|0,P+=B*E,G-=E),typeof f=="number"&&f>=0&&(E=f|0,P+=W*E,z-=E),new C(this.data,k,O,G,z,U,H,B,W,P)},D.step=function(w,M,S,f){var P=this.shape[0],E=this.shape[1],k=this.shape[2],O=this.shape[3],G=this.stride[0],z=this.stride[1],U=this.stride[2],H=this.stride[3],B=this.offset,W=0,q=Math.ceil;return typeof w=="number"&&(W=w|0,W<0?(B+=G*(P-1),P=q(-P/W)):P=q(P/W),G*=W),typeof M=="number"&&(W=M|0,W<0?(B+=z*(E-1),E=q(-E/W)):E=q(E/W),z*=W),typeof S=="number"&&(W=S|0,W<0?(B+=U*(k-1),k=q(-k/W)):k=q(k/W),U*=W),typeof f=="number"&&(W=f|0,W<0?(B+=H*(O-1),O=q(-O/W)):O=q(O/W),H*=W),new C(this.data,P,E,k,O,G,z,U,H,B)},D.transpose=function(w,M,S,f){w=w===void 0?0:w|0,M=M===void 0?1:M|0,S=S===void 0?2:S|0,f=f===void 0?3:f|0;var P=this.shape,E=this.stride;return new C(this.data,P[w],P[M],P[S],P[f],E[w],E[M],E[S],E[f],this.offset)},D.pick=function(w,M,S,f){var P=[],E=[],k=this.offset;typeof w=="number"&&w>=0?k=k+this.stride[0]*w|0:(P.push(this.shape[0]),E.push(this.stride[0])),typeof M=="number"&&M>=0?k=k+this.stride[1]*M|0:(P.push(this.shape[1]),E.push(this.stride[1])),typeof S=="number"&&S>=0?k=k+this.stride[2]*S|0:(P.push(this.shape[2]),E.push(this.stride[2])),typeof f=="number"&&f>=0?k=k+this.stride[3]*f|0:(P.push(this.shape[3]),E.push(this.stride[3]));var O=h[P.length+1];return O(this.data,P,E,k)},function(w,M,S,f){return new C(w,M[0],M[1],M[2],M[3],S[0],S[1],S[2],S[3],f)}},5:function(h,x,C){function D(w,M,S,f,P,E,k,O,G,z,U,H){this.data=w,this.shape=[M,S,f,P,E],this.stride=[k,O,G,z,U],this.offset=H|0}var L=D.prototype;return L.dtype=h,L.dimension=5,Object.defineProperty(L,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(L,"order",{get:C}),L.set=function(M,S,f,P,E,k){return h==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*S+this.stride[2]*f+this.stride[3]*P+this.stride[4]*E,k):this.data[this.offset+this.stride[0]*M+this.stride[1]*S+this.stride[2]*f+this.stride[3]*P+this.stride[4]*E]=k},L.get=function(M,S,f,P,E){return h==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*S+this.stride[2]*f+this.stride[3]*P+this.stride[4]*E):this.data[this.offset+this.stride[0]*M+this.stride[1]*S+this.stride[2]*f+this.stride[3]*P+this.stride[4]*E]},L.index=function(M,S,f,P,E){return this.offset+this.stride[0]*M+this.stride[1]*S+this.stride[2]*f+this.stride[3]*P+this.stride[4]*E},L.hi=function(M,S,f,P,E){return new D(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof S!="number"||S<0?this.shape[1]:S|0,typeof f!="number"||f<0?this.shape[2]:f|0,typeof P!="number"||P<0?this.shape[3]:P|0,typeof E!="number"||E<0?this.shape[4]:E|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},L.lo=function(M,S,f,P,E){var k=this.offset,O=0,G=this.shape[0],z=this.shape[1],U=this.shape[2],H=this.shape[3],B=this.shape[4],W=this.stride[0],q=this.stride[1],re=this.stride[2],ie=this.stride[3],le=this.stride[4];return typeof M=="number"&&M>=0&&(O=M|0,k+=W*O,G-=O),typeof S=="number"&&S>=0&&(O=S|0,k+=q*O,z-=O),typeof f=="number"&&f>=0&&(O=f|0,k+=re*O,U-=O),typeof P=="number"&&P>=0&&(O=P|0,k+=ie*O,H-=O),typeof E=="number"&&E>=0&&(O=E|0,k+=le*O,B-=O),new D(this.data,G,z,U,H,B,W,q,re,ie,le,k)},L.step=function(M,S,f,P,E){var k=this.shape[0],O=this.shape[1],G=this.shape[2],z=this.shape[3],U=this.shape[4],H=this.stride[0],B=this.stride[1],W=this.stride[2],q=this.stride[3],re=this.stride[4],ie=this.offset,le=0,he=Math.ceil;return typeof M=="number"&&(le=M|0,le<0?(ie+=H*(k-1),k=he(-k/le)):k=he(k/le),H*=le),typeof S=="number"&&(le=S|0,le<0?(ie+=B*(O-1),O=he(-O/le)):O=he(O/le),B*=le),typeof f=="number"&&(le=f|0,le<0?(ie+=W*(G-1),G=he(-G/le)):G=he(G/le),W*=le),typeof P=="number"&&(le=P|0,le<0?(ie+=q*(z-1),z=he(-z/le)):z=he(z/le),q*=le),typeof E=="number"&&(le=E|0,le<0?(ie+=re*(U-1),U=he(-U/le)):U=he(U/le),re*=le),new D(this.data,k,O,G,z,U,H,B,W,q,re,ie)},L.transpose=function(M,S,f,P,E){M=M===void 0?0:M|0,S=S===void 0?1:S|0,f=f===void 0?2:f|0,P=P===void 0?3:P|0,E=E===void 0?4:E|0;var k=this.shape,O=this.stride;return new D(this.data,k[M],k[S],k[f],k[P],k[E],O[M],O[S],O[f],O[P],O[E],this.offset)},L.pick=function(M,S,f,P,E){var k=[],O=[],G=this.offset;typeof M=="number"&&M>=0?G=G+this.stride[0]*M|0:(k.push(this.shape[0]),O.push(this.stride[0])),typeof S=="number"&&S>=0?G=G+this.stride[1]*S|0:(k.push(this.shape[1]),O.push(this.stride[1])),typeof f=="number"&&f>=0?G=G+this.stride[2]*f|0:(k.push(this.shape[2]),O.push(this.stride[2])),typeof P=="number"&&P>=0?G=G+this.stride[3]*P|0:(k.push(this.shape[3]),O.push(this.stride[3])),typeof E=="number"&&E>=0?G=G+this.stride[4]*E|0:(k.push(this.shape[4]),O.push(this.stride[4]));var z=x[k.length+1];return z(this.data,k,O,G)},function(M,S,f,P){return new D(M,S[0],S[1],S[2],S[3],S[4],f[0],f[1],f[2],f[3],f[4],P)}}};function s(v,h){var x=h===-1?"T":String(h),C=c[x];return h===-1?C(v):h===0?C(v,g[v][0]):C(v,g[v],o)}function b(v){if(n(v))return"buffer";if(u)switch(Object.prototype.toString.call(v)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(v)?"array":"generic"}var g={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function A(v,h,x,C){if(v===void 0){var f=g.array[0];return f([])}else typeof v=="number"&&(v=[v]);h===void 0&&(h=[v.length]);var D=h.length;if(x===void 0){x=new Array(D);for(var L=D-1,w=1;L>=0;--L)x[L]=w,w*=h[L]}if(C===void 0){C=0;for(var L=0;L>>0;l.exports=o;function o(c,s){if(isNaN(c)||isNaN(s))return NaN;if(c===s)return c;if(c===0)return s<0?-u:u;var b=n.hi(c),g=n.lo(c);return s>c==c>0?g===a?(b+=1,g=0):g+=1:g===0?(g=a,b-=1):g-=1,n.pack(g,b)}},115:function(l,d){var r=1e-6,n=1e-6;d.vertexNormals=function(u,a,o){for(var c=a.length,s=new Array(c),b=o===void 0?r:o,g=0;gb)for(var k=s[h],O=1/Math.sqrt(S*P),E=0;E<3;++E){var G=(E+1)%3,z=(E+2)%3;k[E]+=O*(f[G]*M[z]-f[z]*M[G])}}for(var g=0;gb)for(var O=1/Math.sqrt(U),E=0;E<3;++E)k[E]*=O;else for(var E=0;E<3;++E)k[E]=0}return s},d.faceNormals=function(u,a,o){for(var c=u.length,s=new Array(c),b=o===void 0?n:o,g=0;gb?L=1/Math.sqrt(L):L=0;for(var h=0;h<3;++h)D[h]*=L;s[g]=D}return s}},567:function(l){l.exports=d;function d(r,n,u,a,o,c,s,b,g,A){var v=n+c+A;if(h>0){var h=Math.sqrt(v+1);r[0]=.5*(s-g)/h,r[1]=.5*(b-a)/h,r[2]=.5*(u-c)/h,r[3]=.5*h}else{var x=Math.max(n,c,A),h=Math.sqrt(2*x-v+1);n>=x?(r[0]=.5*h,r[1]=.5*(o+u)/h,r[2]=.5*(b+a)/h,r[3]=.5*(s-g)/h):c>=x?(r[0]=.5*(u+o)/h,r[1]=.5*h,r[2]=.5*(g+s)/h,r[3]=.5*(b-a)/h):(r[0]=.5*(a+b)/h,r[1]=.5*(s+g)/h,r[2]=.5*h,r[3]=.5*(u-o)/h)}return r}},7774:function(l,d,r){l.exports=h;var n=r(8444),u=r(3012),a=r(5950),o=r(7437),c=r(567);function s(x,C,D){return Math.sqrt(Math.pow(x,2)+Math.pow(C,2)+Math.pow(D,2))}function b(x,C,D,L){return Math.sqrt(Math.pow(x,2)+Math.pow(C,2)+Math.pow(D,2)+Math.pow(L,2))}function g(x,C){var D=C[0],L=C[1],w=C[2],M=C[3],S=b(D,L,w,M);S>1e-6?(x[0]=D/S,x[1]=L/S,x[2]=w/S,x[3]=M/S):(x[0]=x[1]=x[2]=0,x[3]=1)}function A(x,C,D){this.radius=n([D]),this.center=n(C),this.rotation=n(x),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var v=A.prototype;v.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},v.recalcMatrix=function(x){this.radius.curve(x),this.center.curve(x),this.rotation.curve(x);var C=this.computedRotation;g(C,C);var D=this.computedMatrix;a(D,C);var L=this.computedCenter,w=this.computedEye,M=this.computedUp,S=Math.exp(this.computedRadius[0]);w[0]=L[0]+S*D[2],w[1]=L[1]+S*D[6],w[2]=L[2]+S*D[10],M[0]=D[1],M[1]=D[5],M[2]=D[9];for(var f=0;f<3;++f){for(var P=0,E=0;E<3;++E)P+=D[f+4*E]*w[E];D[12+f]=-P}},v.getMatrix=function(x,C){this.recalcMatrix(x);var D=this.computedMatrix;if(C){for(var L=0;L<16;++L)C[L]=D[L];return C}return D},v.idle=function(x){this.center.idle(x),this.radius.idle(x),this.rotation.idle(x)},v.flush=function(x){this.center.flush(x),this.radius.flush(x),this.rotation.flush(x)},v.pan=function(x,C,D,L){C=C||0,D=D||0,L=L||0,this.recalcMatrix(x);var w=this.computedMatrix,M=w[1],S=w[5],f=w[9],P=s(M,S,f);M/=P,S/=P,f/=P;var E=w[0],k=w[4],O=w[8],G=E*M+k*S+O*f;E-=M*G,k-=S*G,O-=f*G;var z=s(E,k,O);E/=z,k/=z,O/=z,w[2],w[6],w[10];var U=E*C+M*D,H=k*C+S*D,B=O*C+f*D;this.center.move(x,U,H,B);var W=Math.exp(this.computedRadius[0]);W=Math.max(1e-4,W+L),this.radius.set(x,Math.log(W))},v.rotate=function(x,C,D,L){this.recalcMatrix(x),C=C||0,D=D||0;var w=this.computedMatrix,M=w[0],S=w[4],f=w[8],P=w[1],E=w[5],k=w[9],O=w[2],G=w[6],z=w[10],U=C*M+D*P,H=C*S+D*E,B=C*f+D*k,W=-(G*B-z*H),q=-(z*U-O*B),re=-(O*H-G*U),ie=Math.sqrt(Math.max(0,1-Math.pow(W,2)-Math.pow(q,2)-Math.pow(re,2))),le=b(W,q,re,ie);le>1e-6?(W/=le,q/=le,re/=le,ie/=le):(W=q=re=0,ie=1);var he=this.computedRotation,$=he[0],Z=he[1],K=he[2],Q=he[3],ae=$*ie+Q*W+Z*re-K*q,fe=Z*ie+Q*q+K*W-$*re,te=K*ie+Q*re+$*q-Z*W,ne=Q*ie-$*W-Z*q-K*re;if(L){W=O,q=G,re=z;var ce=Math.sin(L)/s(W,q,re);W*=ce,q*=ce,re*=ce,ie=Math.cos(C),ae=ae*ie+ne*W+fe*re-te*q,fe=fe*ie+ne*q+te*W-ae*re,te=te*ie+ne*re+ae*q-fe*W,ne=ne*ie-ae*W-fe*q-te*re}var oe=b(ae,fe,te,ne);oe>1e-6?(ae/=oe,fe/=oe,te/=oe,ne/=oe):(ae=fe=te=0,ne=1),this.rotation.set(x,ae,fe,te,ne)},v.lookAt=function(x,C,D,L){this.recalcMatrix(x),D=D||this.computedCenter,C=C||this.computedEye,L=L||this.computedUp;var w=this.computedMatrix;u(w,C,D,L);var M=this.computedRotation;c(M,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),g(M,M),this.rotation.set(x,M[0],M[1],M[2],M[3]);for(var S=0,f=0;f<3;++f)S+=Math.pow(D[f]-C[f],2);this.radius.set(x,.5*Math.log(Math.max(S,1e-6))),this.center.set(x,D[0],D[1],D[2])},v.translate=function(x,C,D,L){this.center.move(x,C||0,D||0,L||0)},v.setMatrix=function(x,C){var D=this.computedRotation;c(D,C[0],C[1],C[2],C[4],C[5],C[6],C[8],C[9],C[10]),g(D,D),this.rotation.set(x,D[0],D[1],D[2],D[3]);var L=this.computedMatrix;o(L,C);var w=L[15];if(Math.abs(w)>1e-6){var M=L[12]/w,S=L[13]/w,f=L[14]/w;this.recalcMatrix(x);var P=Math.exp(this.computedRadius[0]);this.center.set(x,M-L[2]*P,S-L[6]*P,f-L[10]*P),this.radius.idle(x)}else this.center.idle(x),this.radius.idle(x)},v.setDistance=function(x,C){C>0&&this.radius.set(x,Math.log(C))},v.setDistanceLimits=function(x,C){x>0?x=Math.log(x):x=-1/0,C>0?C=Math.log(C):C=1/0,C=Math.max(C,x),this.radius.bounds[0][0]=x,this.radius.bounds[1][0]=C},v.getDistanceLimits=function(x){var C=this.radius.bounds;return x?(x[0]=Math.exp(C[0][0]),x[1]=Math.exp(C[1][0]),x):[Math.exp(C[0][0]),Math.exp(C[1][0])]},v.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},v.fromJSON=function(x){var C=this.lastT(),D=x.center;D&&this.center.set(C,D[0],D[1],D[2]);var L=x.rotation;L&&this.rotation.set(C,L[0],L[1],L[2],L[3]);var w=x.distance;w&&w>0&&this.radius.set(C,Math.log(w)),this.setDistanceLimits(x.zoomMin,x.zoomMax)};function h(x){x=x||{};var C=x.center||[0,0,0],D=x.rotation||[0,0,0,1],L=x.radius||1;C=[].slice.call(C,0,3),D=[].slice.call(D,0,4),g(D,D);var w=new A(D,C,Math.log(L));return w.setDistanceLimits(x.zoomMin,x.zoomMax),("eye"in x||"up"in x)&&w.lookAt(0,x.eye,x.center,x.up),w}},4930:function(l,d,r){/*! +* pad-left +* +* Copyright (c) 2014-2015, Jon Schlinkert. +* Licensed under the MIT license. +*/var n=r(6184);l.exports=function(a,o,c){return c=typeof c<"u"?c+"":" ",n(c,o)+a}},4405:function(l){l.exports=function(r,n){n||(n=[0,""]),r=String(r);var u=parseFloat(r,10);return n[0]=u,n[1]=r.match(/[\d.\-\+]*\s*(.*)/)[1]||"",n}},4166:function(l,d,r){l.exports=u;var n=r(9398);function u(a,o){for(var c=o.length|0,s=a.length,b=[new Array(c),new Array(c)],g=0;g0){E=b[G][f][0],O=G;break}k=E[O^1];for(var z=0;z<2;++z)for(var U=b[z][f],H=0;H0&&(E=B,k=W,O=z)}return P||E&&h(E,O),k}function C(S,f){var P=b[f][S][0],E=[S];h(P,f);for(var k=P[f^1];;){for(;k!==S;)E.push(k),k=x(E[E.length-2],k,!1);if(b[0][S].length+b[1][S].length===0)break;var O=E[E.length-1],G=S,z=E[1],U=x(O,G,!0);if(n(o[O],o[G],o[z],o[U])<0)break;E.push(S),k=x(O,G)}return E}function D(S,f){return f[1]===f[f.length-1]}for(var g=0;g0;){b[0][g].length;var M=C(g,L);D(w,M)?w.push.apply(w,M):(w.length>0&&v.push(w),w=M)}w.length>0&&v.push(w)}return v}},3959:function(l,d,r){l.exports=u;var n=r(8348);function u(a,o){for(var c=n(a,o.length),s=new Array(o.length),b=new Array(o.length),g=[],A=0;A0;){var h=g.pop();s[h]=!1;for(var x=c[h],A=0;A0}w=w.filter(M);for(var S=w.length,f=new Array(S),P=new Array(S),L=0;L0;){var ce=fe.pop(),oe=ie[ce];s(oe,function(Fe,Ie){return Fe-Ie});var de=oe.length,we=te[ce],Se;if(we===0){var U=w[ce];Se=[U]}for(var L=0;L=0)&&(te[Te]=we^1,fe.push(Te),we===0)){var U=w[Te];ae(U)||(U.reverse(),Se.push(U))}}we===0&&ne.push(Se)}return ne}},211:function(l,d,r){l.exports=x;var n=r(417)[3],u=r(4385),a=r(9014),o=r(5070);function c(){return!0}function s(C){return function(D,L){var w=C[D];return w?!!w.queryPoint(L,c):!1}}function b(C){for(var D={},L=0;L0&&D[w]===L[0])M=C[w-1];else return 1;for(var S=1;M;){var f=M.key,P=n(L,f[0],f[1]);if(f[0][0]0)S=-1,M=M.right;else return 0;else if(P>0)M=M.left;else if(P<0)S=1,M=M.right;else return 0}return S}}function A(C){return 1}function v(C){return function(L){return C(L[0],L[1])?0:1}}function h(C,D){return function(w){return C(w[0],w[1])?0:D(w)}}function x(C){for(var D=C.length,L=[],w=[],M=0;M=A?(f=1,E=A+2*x+D):(f=-x/A,E=x*f+D)):(f=0,C>=0?(P=0,E=D):-C>=h?(P=1,E=h+2*C+D):(P=-C/h,E=C*P+D));else if(P<0)P=0,x>=0?(f=0,E=D):-x>=A?(f=1,E=A+2*x+D):(f=-x/A,E=x*f+D);else{var k=1/S;f*=k,P*=k,E=f*(A*f+v*P+2*x)+P*(v*f+h*P+2*C)+D}else{var O,G,z,U;f<0?(O=v+x,G=h+C,G>O?(z=G-O,U=A-2*v+h,z>=U?(f=1,P=0,E=A+2*x+D):(f=z/U,P=1-f,E=f*(A*f+v*P+2*x)+P*(v*f+h*P+2*C)+D)):(f=0,G<=0?(P=1,E=h+2*C+D):C>=0?(P=0,E=D):(P=-C/h,E=C*P+D))):P<0?(O=v+C,G=A+x,G>O?(z=G-O,U=A-2*v+h,z>=U?(P=1,f=0,E=h+2*C+D):(P=z/U,f=1-P,E=f*(A*f+v*P+2*x)+P*(v*f+h*P+2*C)+D)):(P=0,G<=0?(f=1,E=A+2*x+D):x>=0?(f=0,E=D):(f=-x/A,E=x*f+D))):(z=h+C-v-x,z<=0?(f=0,P=1,E=h+2*C+D):(U=A-2*v+h,z>=U?(f=1,P=0,E=A+2*x+D):(f=z/U,P=1-f,E=f*(A*f+v*P+2*x)+P*(v*f+h*P+2*C)+D)))}for(var H=1-f-P,g=0;g0){var h=c[b-1];if(n(A,h)===0&&a(h)!==v){b-=1;continue}}c[b++]=A}}return c.length=b,c}},6184:function(l){/*! +* repeat-string +* +* Copyright (c) 2014-2015, Jon Schlinkert. +* Licensed under the MIT License. +*/var d="",r;l.exports=n;function n(u,a){if(typeof u!="string")throw new TypeError("expected a string");if(a===1)return u;if(a===2)return u+u;var o=u.length*a;if(r!==u||typeof r>"u")r=u,d="";else if(d.length>=o)return d.substr(0,o);for(;o>d.length&&a>1;)a&1&&(d+=u),a>>=1,u+=u;return d+=u,d=d.substr(0,o),d}},8161:function(l,d,r){l.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},402:function(l){l.exports=d;function d(r){for(var n=r.length,u=r[r.length-1],a=n,o=n-2;o>=0;--o){var c=u,s=r[o];u=c+s;var b=u-c,g=s-b;g&&(r[--a]=u,u=g)}for(var A=0,o=a;o0){if(G<=0)return z;U=O+G}else if(O<0){if(G>=0)return z;U=-(O+G)}else return z;var H=b*U;return z>=H||z<=-H?z:C(P,E,k)},function(P,E,k,O){var G=P[0]-O[0],z=E[0]-O[0],U=k[0]-O[0],H=P[1]-O[1],B=E[1]-O[1],W=k[1]-O[1],q=P[2]-O[2],re=E[2]-O[2],ie=k[2]-O[2],le=z*W,he=U*B,$=U*H,Z=G*W,K=G*B,Q=z*H,ae=q*(le-he)+re*($-Z)+ie*(K-Q),fe=(Math.abs(le)+Math.abs(he))*Math.abs(q)+(Math.abs($)+Math.abs(Z))*Math.abs(re)+(Math.abs(K)+Math.abs(Q))*Math.abs(ie),te=g*fe;return ae>te||-ae>te?ae:D(P,E,k,O)}];function w(f){var P=L[f.length];return P||(P=L[f.length]=x(f.length)),P.apply(void 0,f)}function M(f,P,E,k,O,G,z){return function(H,B,W,q,re){switch(arguments.length){case 0:case 1:return 0;case 2:return k(H,B);case 3:return O(H,B,W);case 4:return G(H,B,W,q);case 5:return z(H,B,W,q,re)}for(var ie=new Array(arguments.length),le=0;le0&&A>0||g<0&&A<0)return!1;var v=n(s,o,c),h=n(b,o,c);return v>0&&h>0||v<0&&h<0?!1:g===0&&A===0&&v===0&&h===0?u(o,c,s,b):!0}},4078:function(l){l.exports=r;function d(n,u){var a=n+u,o=a-n,c=a-o,s=u-o,b=n-c,g=b+s;return g?[g,a]:[a]}function r(n,u){var a=n.length|0,o=u.length|0;if(a===1&&o===1)return d(n[0],-u[0]);var c=a+o,s=new Array(c),b=0,g=0,A=0,v=Math.abs,h=n[g],x=v(h),C=-u[A],D=v(C),L,w;x=o?(L=h,g+=1,g=o?(L=h,g+=1,g"u"&&(L=c(x));var w=x.length;if(w===0||L<1)return{cells:[],vertexIds:[],vertexWeights:[]};var M=s(C,+D),S=b(x,L),f=g(S,C,M,+D),P=A(S,C.length|0),E=o(L)(x,S.data,P,M),k=v(S),O=[].slice.call(f.data,0,f.shape[0]);return u.free(M),u.free(S.data),u.free(f.data),u.free(P),{cells:E,vertexIds:k,vertexWeights:O}}},1168:function(l){l.exports=r;var d=[function(){function u(a,o,c,s){for(var b=a.length,g=[],A=0;A>1,C=c[2*x+1];if(C===A)return x;A>1,C=c[2*x+1];if(C===A)return x;A>1,C=c[2*x+1];if(C===A)return x;A0)-(a<0)},d.abs=function(a){var o=a>>r-1;return(a^o)-o},d.min=function(a,o){return o^(a^o)&-(a65535)<<4,a>>>=o,c=(a>255)<<3,a>>>=c,o|=c,c=(a>15)<<2,a>>>=c,o|=c,c=(a>3)<<1,a>>>=c,o|=c,o|a>>1},d.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0},d.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function n(a){var o=32;return a&=-a,a&&o--,a&65535&&(o-=16),a&16711935&&(o-=8),a&252645135&&(o-=4),a&858993459&&(o-=2),a&1431655765&&(o-=1),o}d.countTrailingZeros=n,d.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},d.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},d.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var u=new Array(256);(function(a){for(var o=0;o<256;++o){var c=o,s=o,b=7;for(c>>>=1;c;c>>>=1)s<<=1,s|=c&1,--b;a[o]=s<>>8&255]<<16|u[a>>>16&255]<<8|u[a>>>24&255]},d.interleave2=function(a,o){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,a|o<<1},d.deinterleave2=function(a,o){return a=a>>>o&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},d.interleave3=function(a,o,c){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,a|=o<<1,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,a|c<<2},d.deinterleave3=function(a,o){return a=a>>>o&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},d.nextCombination=function(a){var o=a|a-1;return o+1|(~o&-~o)-1>>>n(a)+1}},6656:function(l,d,r){var n=r(9392),u=r(9521);function a(f){for(var P=0,E=Math.max,k=0,O=f.length;k>1,z=s(f[G],P);z<=0?(z===0&&(O=G),E=G+1):z>0&&(k=G-1)}return O}d.findCell=v;function h(f,P){for(var E=new Array(f.length),k=0,O=E.length;k=f.length||s(f[ie],G)!==0););}return E}d.incidence=h;function x(f,P){if(!P)return h(A(D(f,0)),f);for(var E=new Array(P),k=0;k>>B&1&&H.push(O[B]);P.push(H)}return g(P)}d.explode=C;function D(f,P){if(P<0)return[];for(var E=[],k=(1<>1:($>>1)-1}function k($){for(var Z=P($);;){var K=Z,Q=2*$+1,ae=2*($+1),fe=$;if(Q0;){var K=E($);if(K>=0){var Q=P(K);if(Z0){var $=H[0];return f(0,q-1),q-=1,k(0),$}return-1}function z($,Z){var K=H[$];return x[K]===Z?$:(x[K]=-1/0,O($),G(),x[K]=Z,q+=1,O(q-1))}function U($){if(!C[$]){C[$]=!0;var Z=v[$],K=h[$];v[K]>=0&&(v[K]=Z),h[Z]>=0&&(h[Z]=K),B[Z]>=0&&z(B[Z],S(Z)),B[K]>=0&&z(B[K],S(K))}}for(var H=[],B=new Array(g),D=0;D>1;D>=0;--D)k(D);for(;;){var re=G();if(re<0||x[re]>b)break;U(re)}for(var ie=[],D=0;D=0&&K>=0&&Z!==K){var Q=B[Z],ae=B[K];Q!==ae&&he.push([Q,ae])}}),u.unique(u.normalize(he)),{positions:ie,edges:he}}},6638:function(l,d,r){l.exports=a;var n=r(417);function u(o,c){var s,b;if(c[0][0]c[1][0])s=c[1],b=c[0];else{var g=Math.min(o[0][1],o[1][1]),A=Math.max(o[0][1],o[1][1]),v=Math.min(c[0][1],c[1][1]),h=Math.max(c[0][1],c[1][1]);return Ah?g-h:A-h}var x,C;o[0][1]c[1][0])s=c[1],b=c[0];else return u(c,o);var g,A;if(o[0][0]o[1][0])g=o[1],A=o[0];else return-u(o,c);var v=n(s,b,A),h=n(s,b,g);if(v<0){if(h<=0)return v}else if(v>0){if(h>=0)return v}else if(h)return h;if(v=n(A,g,b),h=n(A,g,s),v<0){if(h<=0)return v}else if(v>0){if(h>=0)return v}else if(h)return h;return b[0]-A[0]}},4385:function(l,d,r){l.exports=h;var n=r(5070),u=r(7080),a=r(417),o=r(6638);function c(x,C,D){this.slabs=x,this.coordinates=C,this.horizontal=D}var s=c.prototype;function b(x,C){return x.y-C}function g(x,C){for(var D=null;x;){var L=x.key,w,M;L[0][0]0)if(C[0]!==L[1][0])D=x,x=x.right;else{var f=g(x.right,C);if(f)return f;x=x.left}else{if(C[0]!==L[1][0])return x;var f=g(x.right,C);if(f)return f;x=x.left}}return D}s.castUp=function(x){var C=n.le(this.coordinates,x[0]);if(C<0)return-1;this.slabs[C];var D=g(this.slabs[C],x),L=-1;if(D&&(L=D.value),this.coordinates[C]===x[0]){var w=null;if(D&&(w=D.key),C>0){var M=g(this.slabs[C-1],x);M&&(w?o(M.key,w)>0&&(w=M.key,L=M.value):(L=M.value,w=M.key))}var S=this.horizontal[C];if(S.length>0){var f=n.ge(S,x[1],b);if(f=S.length)return L;P=S[f]}}if(P.start)if(w){var E=a(w[0],w[1],[x[0],P.y]);w[0][0]>w[1][0]&&(E=-E),E>0&&(L=P.index)}else L=P.index;else P.y!==x[1]&&(L=P.index)}}}return L};function A(x,C,D,L){this.y=x,this.index=C,this.start=D,this.closed=L}function v(x,C,D,L){this.x=x,this.segment=C,this.create=D,this.index=L}function h(x){for(var C=x.length,D=2*C,L=new Array(D),w=0;w1&&(C=1);for(var D=1-C,L=g.length,w=new Array(L),M=0;M0||x>0&&w<0){var M=o(C,w,D,x);v.push(M),h.push(M.slice())}w<0?h.push(D.slice()):w>0?v.push(D.slice()):(v.push(D.slice()),h.push(D.slice())),x=w}return{positive:v,negative:h}}function s(g,A){for(var v=[],h=a(g[g.length-1],A),x=g[g.length-1],C=g[0],D=0;D0||h>0&&L<0)&&v.push(o(x,L,C,h)),L>=0&&v.push(C.slice()),h=L}return v}function b(g,A){for(var v=[],h=a(g[g.length-1],A),x=g[g.length-1],C=g[0],D=0;D0||h>0&&L<0)&&v.push(o(x,L,C,h)),L<=0&&v.push(C.slice()),h=L}return v}},8974:function(l,d,r){var n;(function(){var u={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(g){return c(b(g),arguments)}function o(g,A){return a.apply(null,[g].concat(A||[]))}function c(g,A){var v=1,h=g.length,x,C="",D,L,w,M,S,f,P,E;for(D=0;D=0),w.type){case"b":x=parseInt(x,10).toString(2);break;case"c":x=String.fromCharCode(parseInt(x,10));break;case"d":case"i":x=parseInt(x,10);break;case"j":x=JSON.stringify(x,null,w.width?parseInt(w.width):0);break;case"e":x=w.precision?parseFloat(x).toExponential(w.precision):parseFloat(x).toExponential();break;case"f":x=w.precision?parseFloat(x).toFixed(w.precision):parseFloat(x);break;case"g":x=w.precision?String(Number(x.toPrecision(w.precision))):parseFloat(x);break;case"o":x=(parseInt(x,10)>>>0).toString(8);break;case"s":x=String(x),x=w.precision?x.substring(0,w.precision):x;break;case"t":x=String(!!x),x=w.precision?x.substring(0,w.precision):x;break;case"T":x=Object.prototype.toString.call(x).slice(8,-1).toLowerCase(),x=w.precision?x.substring(0,w.precision):x;break;case"u":x=parseInt(x,10)>>>0;break;case"v":x=x.valueOf(),x=w.precision?x.substring(0,w.precision):x;break;case"x":x=(parseInt(x,10)>>>0).toString(16);break;case"X":x=(parseInt(x,10)>>>0).toString(16).toUpperCase();break}u.json.test(w.type)?C+=x:(u.number.test(w.type)&&(!P||w.sign)?(E=P?"+":"-",x=x.toString().replace(u.sign,"")):E="",S=w.pad_char?w.pad_char==="0"?"0":w.pad_char.charAt(1):" ",f=w.width-(E+x).length,M=w.width&&f>0?S.repeat(f):"",C+=w.align?E+x+M:S==="0"?E+M+x:M+E+x)}return C}var s=Object.create(null);function b(g){if(s[g])return s[g];for(var A=g,v,h=[],x=0;A;){if((v=u.text.exec(A))!==null)h.push(v[0]);else if((v=u.modulo.exec(A))!==null)h.push("%");else if((v=u.placeholder.exec(A))!==null){if(v[2]){x|=1;var C=[],D=v[2],L=[];if((L=u.key.exec(D))!==null)for(C.push(L[1]);(D=D.substring(L[0].length))!=="";)if((L=u.key_access.exec(D))!==null)C.push(L[1]);else if((L=u.index_access.exec(D))!==null)C.push(L[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");v[2]=C}else x|=2;if(x===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");h.push({placeholder:v[0],param_no:v[1],keys:v[2],sign:v[3],pad_char:v[4],align:v[5],width:v[6],precision:v[7],type:v[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");A=A.substring(v[0].length)}return s[g]=h}d.sprintf=a,d.vsprintf=o,typeof window<"u"&&(window.sprintf=a,window.vsprintf=o,n=function(){return{sprintf:a,vsprintf:o}}.call(d,r,d,l),n!==void 0&&(l.exports=n))})()},4162:function(l,d,r){l.exports=b;var n=r(9284),u=r(9584),a={"2d":function(g,A,v){var h=g({order:A,scalarArguments:3,getters:v==="generic"?[0]:void 0,phase:function(C,D,L,w){return C>w|0},vertex:function(C,D,L,w,M,S,f,P,E,k,O,G,z){var U=(f<<0)+(P<<1)+(E<<2)+(k<<3)|0;if(!(U===0||U===15))switch(U){case 0:O.push([C-.5,D-.5]);break;case 1:O.push([C-.25-.25*(w+L-2*z)/(L-w),D-.25-.25*(M+L-2*z)/(L-M)]);break;case 2:O.push([C-.75-.25*(-w-L+2*z)/(w-L),D-.25-.25*(S+w-2*z)/(w-S)]);break;case 3:O.push([C-.5,D-.5-.5*(M+L+S+w-4*z)/(L-M+w-S)]);break;case 4:O.push([C-.25-.25*(S+M-2*z)/(M-S),D-.75-.25*(-M-L+2*z)/(M-L)]);break;case 5:O.push([C-.5-.5*(w+L+S+M-4*z)/(L-w+M-S),D-.5]);break;case 6:O.push([C-.5-.25*(-w-L+S+M)/(w-L+M-S),D-.5-.25*(-M-L+S+w)/(M-L+w-S)]);break;case 7:O.push([C-.75-.25*(S+M-2*z)/(M-S),D-.75-.25*(S+w-2*z)/(w-S)]);break;case 8:O.push([C-.75-.25*(-S-M+2*z)/(S-M),D-.75-.25*(-S-w+2*z)/(S-w)]);break;case 9:O.push([C-.5-.25*(w+L+-S-M)/(L-w+S-M),D-.5-.25*(M+L+-S-w)/(L-M+S-w)]);break;case 10:O.push([C-.5-.5*(-w-L+-S-M+4*z)/(w-L+S-M),D-.5]);break;case 11:O.push([C-.25-.25*(-S-M+2*z)/(S-M),D-.75-.25*(M+L-2*z)/(L-M)]);break;case 12:O.push([C-.5,D-.5-.5*(-M-L+-S-w+4*z)/(M-L+S-w)]);break;case 13:O.push([C-.75-.25*(w+L-2*z)/(L-w),D-.25-.25*(-S-w+2*z)/(S-w)]);break;case 14:O.push([C-.25-.25*(-w-L+2*z)/(w-L),D-.25-.25*(-M-L+2*z)/(M-L)]);break;case 15:O.push([C-.5,D-.5]);break}},cell:function(C,D,L,w,M,S,f,P,E){M?P.push([C,D]):P.push([D,C])}});return function(x,C){var D=[],L=[];return h(x,D,L,C),{positions:D,cells:L}}}};function o(g,A){var v=g.length+"d",h=a[v];if(h)return h(n,g,A)}function c(g,A){for(var v=u(g,A),h=v.length,x=new Array(h),C=new Array(h),D=0;D0&&(L+=.02);for(var M=new Float32Array(D),S=0,f=-.5*L,w=0;wMath.max(w,M)?S[2]=1:w>Math.max(L,M)?S[0]=1:S[1]=1;for(var f=0,P=0,E=0;E<3;++E)f+=D[E]*D[E],P+=S[E]*D[E];for(var E=0;E<3;++E)S[E]-=P/f*D[E];return c(S,S),S}function v(D,L,w,M,S,f,P,E){this.center=n(w),this.up=n(M),this.right=n(S),this.radius=n([f]),this.angle=n([P,E]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(D,L),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var k=0;k<16;++k)this.computedMatrix[k]=.5;this.recalcMatrix(0)}var h=v.prototype;h.setDistanceLimits=function(D,L){D>0?D=Math.log(D):D=-1/0,L>0?L=Math.log(L):L=1/0,L=Math.max(L,D),this.radius.bounds[0][0]=D,this.radius.bounds[1][0]=L},h.getDistanceLimits=function(D){var L=this.radius.bounds[0];return D?(D[0]=Math.exp(L[0][0]),D[1]=Math.exp(L[1][0]),D):[Math.exp(L[0][0]),Math.exp(L[1][0])]},h.recalcMatrix=function(D){this.center.curve(D),this.up.curve(D),this.right.curve(D),this.radius.curve(D),this.angle.curve(D);for(var L=this.computedUp,w=this.computedRight,M=0,S=0,f=0;f<3;++f)S+=L[f]*w[f],M+=L[f]*L[f];for(var P=Math.sqrt(M),E=0,f=0;f<3;++f)w[f]-=L[f]*S/M,E+=w[f]*w[f],L[f]/=P;for(var k=Math.sqrt(E),f=0;f<3;++f)w[f]/=k;var O=this.computedToward;o(O,L,w),c(O,O);for(var G=Math.exp(this.computedRadius[0]),z=this.computedAngle[0],U=this.computedAngle[1],H=Math.cos(z),B=Math.sin(z),W=Math.cos(U),q=Math.sin(U),re=this.computedCenter,ie=H*W,le=B*W,he=q,$=-H*q,Z=-B*q,K=W,Q=this.computedEye,ae=this.computedMatrix,f=0;f<3;++f){var fe=ie*w[f]+le*O[f]+he*L[f];ae[4*f+1]=$*w[f]+Z*O[f]+K*L[f],ae[4*f+2]=fe,ae[4*f+3]=0}var te=ae[1],ne=ae[5],ce=ae[9],oe=ae[2],de=ae[6],we=ae[10],Se=ne*we-ce*de,Te=ce*oe-te*we,Fe=te*de-ne*oe,Ie=b(Se,Te,Fe);Se/=Ie,Te/=Ie,Fe/=Ie,ae[0]=Se,ae[4]=Te,ae[8]=Fe;for(var f=0;f<3;++f)Q[f]=re[f]+ae[2+4*f]*G;for(var f=0;f<3;++f){for(var E=0,Me=0;Me<3;++Me)E+=ae[f+4*Me]*Q[Me];ae[12+f]=-E}ae[15]=1},h.getMatrix=function(D,L){this.recalcMatrix(D);var w=this.computedMatrix;if(L){for(var M=0;M<16;++M)L[M]=w[M];return L}return w};var x=[0,0,0];h.rotate=function(D,L,w,M){if(this.angle.move(D,L,w),M){this.recalcMatrix(D);var S=this.computedMatrix;x[0]=S[2],x[1]=S[6],x[2]=S[10];for(var f=this.computedUp,P=this.computedRight,E=this.computedToward,k=0;k<3;++k)S[4*k]=f[k],S[4*k+1]=P[k],S[4*k+2]=E[k];a(S,S,M,x);for(var k=0;k<3;++k)f[k]=S[4*k],P[k]=S[4*k+1];this.up.set(D,f[0],f[1],f[2]),this.right.set(D,P[0],P[1],P[2])}},h.pan=function(D,L,w,M){L=L||0,w=w||0,M=M||0,this.recalcMatrix(D);var S=this.computedMatrix;Math.exp(this.computedRadius[0]);var f=S[1],P=S[5],E=S[9],k=b(f,P,E);f/=k,P/=k,E/=k;var O=S[0],G=S[4],z=S[8],U=O*f+G*P+z*E;O-=f*U,G-=P*U,z-=E*U;var H=b(O,G,z);O/=H,G/=H,z/=H;var B=O*L+f*w,W=G*L+P*w,q=z*L+E*w;this.center.move(D,B,W,q);var re=Math.exp(this.computedRadius[0]);re=Math.max(1e-4,re+M),this.radius.set(D,Math.log(re))},h.translate=function(D,L,w,M){this.center.move(D,L||0,w||0,M||0)},h.setMatrix=function(D,L,w,M){var S=1;typeof w=="number"&&(S=w|0),(S<0||S>3)&&(S=1);var f=(S+2)%3;L||(this.recalcMatrix(D),L=this.computedMatrix);var P=L[S],E=L[S+4],k=L[S+8];if(M){var G=Math.abs(P),z=Math.abs(E),U=Math.abs(k),H=Math.max(G,z,U);G===H?(P=P<0?-1:1,E=k=0):U===H?(k=k<0?-1:1,P=E=0):(E=E<0?-1:1,P=k=0)}else{var O=b(P,E,k);P/=O,E/=O,k/=O}var B=L[f],W=L[f+4],q=L[f+8],re=B*P+W*E+q*k;B-=P*re,W-=E*re,q-=k*re;var ie=b(B,W,q);B/=ie,W/=ie,q/=ie;var le=E*q-k*W,he=k*B-P*q,$=P*W-E*B,Z=b(le,he,$);le/=Z,he/=Z,$/=Z,this.center.jump(D,We,_e,Ye),this.radius.idle(D),this.up.jump(D,P,E,k),this.right.jump(D,B,W,q);var K,Q;if(S===2){var ae=L[1],fe=L[5],te=L[9],ne=ae*B+fe*W+te*q,ce=ae*le+fe*he+te*$;Se<0?K=-Math.PI/2:K=Math.PI/2,Q=Math.atan2(ce,ne)}else{var oe=L[2],de=L[6],we=L[10],Se=oe*P+de*E+we*k,Te=oe*B+de*W+we*q,Fe=oe*le+de*he+we*$;K=Math.asin(g(Se)),Q=Math.atan2(Fe,Te)}this.angle.jump(D,Q,K),this.recalcMatrix(D);var Ie=L[2],Me=L[6],Ae=L[10],De=this.computedMatrix;u(De,L);var ke=De[15],We=De[12]/ke,_e=De[13]/ke,Ye=De[14]/ke,Pe=Math.exp(this.computedRadius[0]);this.center.jump(D,We-Ie*Pe,_e-Me*Pe,Ye-Ae*Pe)},h.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},h.idle=function(D){this.center.idle(D),this.up.idle(D),this.right.idle(D),this.radius.idle(D),this.angle.idle(D)},h.flush=function(D){this.center.flush(D),this.up.flush(D),this.right.flush(D),this.radius.flush(D),this.angle.flush(D)},h.setDistance=function(D,L){L>0&&this.radius.set(D,Math.log(L))},h.lookAt=function(D,L,w,M){this.recalcMatrix(D),L=L||this.computedEye,w=w||this.computedCenter,M=M||this.computedUp;var S=M[0],f=M[1],P=M[2],E=b(S,f,P);if(!(E<1e-6)){S/=E,f/=E,P/=E;var k=L[0]-w[0],O=L[1]-w[1],G=L[2]-w[2],z=b(k,O,G);if(!(z<1e-6)){k/=z,O/=z,G/=z;var U=this.computedRight,H=U[0],B=U[1],W=U[2],q=S*H+f*B+P*W;H-=q*S,B-=q*f,W-=q*P;var re=b(H,B,W);if(!(re<.01&&(H=f*G-P*O,B=P*k-S*G,W=S*O-f*k,re=b(H,B,W),re<1e-6))){H/=re,B/=re,W/=re,this.up.set(D,S,f,P),this.right.set(D,H,B,W),this.center.set(D,w[0],w[1],w[2]),this.radius.set(D,Math.log(z));var ie=f*W-P*B,le=P*H-S*W,he=S*B-f*H,$=b(ie,le,he);ie/=$,le/=$,he/=$;var Z=S*k+f*O+P*G,K=H*k+B*O+W*G,Q=ie*k+le*O+he*G,ae=Math.asin(g(Z)),fe=Math.atan2(Q,K),te=this.angle._state,ne=te[te.length-1],ce=te[te.length-2];ne=ne%(2*Math.PI);var oe=Math.abs(ne+2*Math.PI-fe),de=Math.abs(ne-fe),we=Math.abs(ne-2*Math.PI-fe);oe0?W.pop():new ArrayBuffer(H)}d.mallocArrayBuffer=x;function C(U){return new Uint8Array(x(U),0,U)}d.mallocUint8=C;function D(U){return new Uint16Array(x(2*U),0,U)}d.mallocUint16=D;function L(U){return new Uint32Array(x(4*U),0,U)}d.mallocUint32=L;function w(U){return new Int8Array(x(U),0,U)}d.mallocInt8=w;function M(U){return new Int16Array(x(2*U),0,U)}d.mallocInt16=M;function S(U){return new Int32Array(x(4*U),0,U)}d.mallocInt32=S;function f(U){return new Float32Array(x(4*U),0,U)}d.mallocFloat32=d.mallocFloat=f;function P(U){return new Float64Array(x(8*U),0,U)}d.mallocFloat64=d.mallocDouble=P;function E(U){return o?new Uint8ClampedArray(x(U),0,U):C(U)}d.mallocUint8Clamped=E;function k(U){return c?new BigUint64Array(x(8*U),0,U):null}d.mallocBigUint64=k;function O(U){return s?new BigInt64Array(x(8*U),0,U):null}d.mallocBigInt64=O;function G(U){return new DataView(x(U),0,U)}d.mallocDataView=G;function z(U){U=n.nextPow2(U);var H=n.log2(U),B=A[H];return B.length>0?B.pop():new a(U)}d.mallocBuffer=z,d.clearCache=function(){for(var H=0;H<32;++H)b.UINT8[H].length=0,b.UINT16[H].length=0,b.UINT32[H].length=0,b.INT8[H].length=0,b.INT16[H].length=0,b.INT32[H].length=0,b.FLOAT[H].length=0,b.DOUBLE[H].length=0,b.BIGUINT64[H].length=0,b.BIGINT64[H].length=0,b.UINT8C[H].length=0,g[H].length=0,A[H].length=0}},1731:function(l){l.exports=d;function d(n){this.roots=new Array(n),this.ranks=new Array(n);for(var u=0;u",W="",q=B.length,re=W.length,ie=z[0]===x||z[0]===L,le=0,he=-re;le>-1&&(le=U.indexOf(B,le),!(le===-1||(he=U.indexOf(W,le+q),he===-1)||he<=le));){for(var $=le;$=he)H[$]=null,U=U.substr(0,$)+" "+U.substr($+1);else if(H[$]!==null){var Z=H[$].indexOf(z[0]);Z===-1?H[$]+=z:ie&&(H[$]=H[$].substr(0,Z+1)+(1+parseInt(H[$][Z+1]))+H[$].substr(Z+2))}var K=le+q,Q=U.substr(K,he-K),ae=Q.indexOf(B);ae!==-1?le=ae:le=he+re}return H}function S(G,z,U){for(var H=z.textAlign||"start",B=z.textBaseline||"alphabetic",W=[1<<30,1<<30],q=[0,0],re=G.length,ie=0;ie/g,` +`):U=U.replace(/\/g," ");var q="",re=[];for(ne=0;ne-1?parseInt(Ye[1+Ze]):0,vt=Ke>-1?parseInt(Pe[1+Ke]):0;lt!==vt&&(Ve=Ve.replace(Fe(),"?px "),de*=Math.pow(.75,vt-lt),Ve=Ve.replace("?px ",Fe())),oe+=.25*Z*(vt-lt)}if(W.superscripts===!0){var mt=Ye.indexOf(x),Et=Pe.indexOf(x),et=mt>-1?parseInt(Ye[1+mt]):0,Ue=Et>-1?parseInt(Pe[1+Et]):0;et!==Ue&&(Ve=Ve.replace(Fe(),"?px "),de*=Math.pow(.75,Ue-et),Ve=Ve.replace("?px ",Fe())),oe-=.25*Z*(Ue-et)}if(W.bolds===!0){var Be=Ye.indexOf(g)>-1,rt=Pe.indexOf(g)>-1;!Be&&rt&&(ot?Ve=Ve.replace("italic ","italic bold "):Ve="bold "+Ve),Be&&!rt&&(Ve=Ve.replace("bold ",""))}if(W.italics===!0){var ot=Ye.indexOf(v)>-1,qe=Pe.indexOf(v)>-1;!ot&&qe&&(Ve="italic "+Ve),ot&&!qe&&(Ve=Ve.replace("italic ",""))}z.font=Ve}for(te=0;te<$;++te){var Me=he[te]+` +`;for(ce=0,oe=te*Z,de=H,Se="",ne=0;ne0&&(B=H.size),H.lineSpacing&&H.lineSpacing>0&&(W=H.lineSpacing),H.styletags&&H.styletags.breaklines&&(q.breaklines=!!H.styletags.breaklines),H.styletags&&H.styletags.bolds&&(q.bolds=!!H.styletags.bolds),H.styletags&&H.styletags.italics&&(q.italics=!!H.styletags.italics),H.styletags&&H.styletags.subscripts&&(q.subscripts=!!H.styletags.subscripts),H.styletags&&H.styletags.superscripts&&(q.superscripts=!!H.styletags.superscripts)),U.font=[H.fontStyle,H.fontVariant,H.fontWeight,B+"px",H.font].filter(function(ie){return ie}).join(" "),U.textAlign="start",U.textBaseline="alphabetic",U.direction="ltr";var re=f(z,U,G,B,W,q);return k(re,H,B)}},5346:function(l){(function(){if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function r(P){P.permitHostObjects___&&P.permitHostObjects___(r)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=r);var n=!1;if(typeof WeakMap=="function"){var u=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var a=new u,o=Object.freeze({});if(a.set(o,1),a.get(o)!==1)n=!0;else{l.exports=WeakMap;return}}}var c=Object.getOwnPropertyNames,s=Object.defineProperty,b=Object.isExtensible,g="weakmap:",A=g+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var v=new ArrayBuffer(25),h=new Uint8Array(v);crypto.getRandomValues(h),A=g+"rand:"+Array.prototype.map.call(h,function(P){return(P%36).toString(36)}).join("")+"___"}function x(P){return!(P.substr(0,g.length)==g&&P.substr(P.length-3)==="___")}if(s(Object,"getOwnPropertyNames",{value:function(E){return c(E).filter(x)}}),"getPropertyNames"in Object){var C=Object.getPropertyNames;s(Object,"getPropertyNames",{value:function(E){return C(E).filter(x)}})}function D(P){if(P!==Object(P))throw new TypeError("Not an object: "+P);var E=P[A];if(E&&E.key===P)return E;if(!!b(P)){E={key:P};try{return s(P,A,{value:E,writable:!1,enumerable:!1,configurable:!1}),E}catch{return}}}(function(){var P=Object.freeze;s(Object,"freeze",{value:function(G){return D(G),P(G)}});var E=Object.seal;s(Object,"seal",{value:function(G){return D(G),E(G)}});var k=Object.preventExtensions;s(Object,"preventExtensions",{value:function(G){return D(G),k(G)}})})();function L(P){return P.prototype=null,Object.freeze(P)}var w=!1;function M(){!w&&typeof console<"u"&&(w=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var S=0,f=function(){this instanceof f||M();var P=[],E=[],k=S++;function O(H,B){var W,q=D(H);return q?k in q?q[k]:B:(W=P.indexOf(H),W>=0?E[W]:B)}function G(H){var B=D(H);return B?k in B:P.indexOf(H)>=0}function z(H,B){var W,q=D(H);return q?q[k]=B:(W=P.indexOf(H),W>=0?E[W]=B:(W=P.length,E[W]=B,P[W]=H)),this}function U(H){var B=D(H),W,q;return B?k in B&&delete B[k]:(W=P.indexOf(H),W<0?!1:(q=P.length-1,P[W]=void 0,E[W]=E[q],P[W]=P[q],P.length=q,E.length=q,!0))}return Object.create(f.prototype,{get___:{value:L(O)},has___:{value:L(G)},set___:{value:L(z)},delete___:{value:L(U)}})};f.prototype=Object.create(Object.prototype,{get:{value:function(E,k){return this.get___(E,k)},writable:!0,configurable:!0},has:{value:function(E){return this.has___(E)},writable:!0,configurable:!0},set:{value:function(E,k){return this.set___(E,k)},writable:!0,configurable:!0},delete:{value:function(E){return this.delete___(E)},writable:!0,configurable:!0}}),typeof u=="function"?function(){n&&typeof Proxy<"u"&&(Proxy=void 0);function P(){this instanceof f||M();var E=new u,k=void 0,O=!1;function G(B,W){return k?E.has(B)?E.get(B):k.get___(B,W):E.get(B,W)}function z(B){return E.has(B)||(k?k.has___(B):!1)}var U;n?U=function(B,W){return E.set(B,W),E.has(B)||(k||(k=new f),k.set(B,W)),this}:U=function(B,W){if(O)try{E.set(B,W)}catch{k||(k=new f),k.set___(B,W)}else E.set(B,W);return this};function H(B){var W=!!E.delete(B);return k&&k.delete___(B)||W}return Object.create(f.prototype,{get___:{value:L(G)},has___:{value:L(z)},set___:{value:L(U)},delete___:{value:L(H)},permitHostObjects___:{value:L(function(B){if(B===r)O=!0;else throw new Error("bogus call to permitHostObjects___")})}})}P.prototype=f.prototype,l.exports=P,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),l.exports=f)})()},9222:function(l,d,r){var n=r(7178);l.exports=u;function u(){var a={};return function(o){if((typeof o!="object"||o===null)&&typeof o!="function")throw new Error("Weakmap-shim: Key must be object");var c=o.valueOf(a);return c&&c.identity===a?c:n(o,a)}}},7178:function(l){l.exports=d;function d(r,n){var u={identity:n},a=r.valueOf;return Object.defineProperty(r,"valueOf",{value:function(o){return o!==n?a.apply(this,arguments):u},writable:!0}),u}},4037:function(l,d,r){var n=r(9222);l.exports=u;function u(){var a=n();return{get:function(o,c){var s=a(o);return s.hasOwnProperty("value")?s.value:c},set:function(o,c){return a(o).value=c,this},has:function(o){return"value"in a(o)},delete:function(o){return delete a(o).value}}}},6183:function(l){function d(){return function(c,s,b,g,A,v){var h=c[0],x=b[0],C=[0],D=x;g|=0;var L=0,w=x;for(L=0;L=0!=S>=0&&A.push(C[0]+.5+.5*(M+S)/(M-S))}g+=w,++C[0]}}}function r(){return d()}var n=r;function u(c){var s={};return function(g,A,v){var h=g.dtype,x=g.order,C=[h,x.join()].join(),D=s[C];return D||(s[C]=D=c([h,x])),D(g.shape.slice(0),g.data,g.stride,g.offset|0,A,v)}}function a(c){return u(n.bind(void 0,c))}function o(c){return a({funcName:c.funcName})}l.exports=o({funcName:"zeroCrossings"})},9584:function(l,d,r){l.exports=u;var n=r(6183);function u(a,o){var c=[];return o=+o||0,n(a.hi(a.shape[0]-1),c,o),c}},6601:function(){}},t={};function y(l){var d=t[l];if(d!==void 0)return d.exports;var r=t[l]={id:l,loaded:!1,exports:{}};return m[l].call(r.exports,r,r.exports,y),r.loaded=!0,r.exports}(function(){y.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){y.nmd=function(l){return l.paths=[],l.children||(l.children=[]),l}}();var p=y(7386);return p}()})},12856:function(R,F,e){/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */function i(et,Ue){if(!(et instanceof Ue))throw new TypeError("Cannot call a class as a function")}function m(et,Ue){for(var Be=0;Be"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function u(et){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Be){return Be.__proto__||Object.getPrototypeOf(Be)},u(et)}function a(et){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ue){return typeof Ue}:function(Ue){return Ue&&typeof Symbol=="function"&&Ue.constructor===Symbol&&Ue!==Symbol.prototype?"symbol":typeof Ue},a(et)}var o=e(95341),c=e(95280),s=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;F.Buffer=v,F.SlowBuffer=E,F.INSPECT_MAX_BYTES=50;var b=2147483647;F.kMaxLength=b,v.TYPED_ARRAY_SUPPORT=g(),!v.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function g(){try{var et=new Uint8Array(1),Ue={foo:function(){return 42}};return Object.setPrototypeOf(Ue,Uint8Array.prototype),Object.setPrototypeOf(et,Ue),et.foo()===42}catch{return!1}}Object.defineProperty(v.prototype,"parent",{enumerable:!0,get:function(){if(!!v.isBuffer(this))return this.buffer}}),Object.defineProperty(v.prototype,"offset",{enumerable:!0,get:function(){if(!!v.isBuffer(this))return this.byteOffset}});function A(et){if(et>b)throw new RangeError('The value "'+et+'" is invalid for option "size"');var Ue=new Uint8Array(et);return Object.setPrototypeOf(Ue,v.prototype),Ue}function v(et,Ue,Be){if(typeof et=="number"){if(typeof Ue=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return D(et)}return h(et,Ue,Be)}v.poolSize=8192;function h(et,Ue,Be){if(typeof et=="string")return L(et,Ue);if(ArrayBuffer.isView(et))return M(et);if(et==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+a(et));if(Ke(et,ArrayBuffer)||et&&Ke(et.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ke(et,SharedArrayBuffer)||et&&Ke(et.buffer,SharedArrayBuffer)))return S(et,Ue,Be);if(typeof et=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var rt=et.valueOf&&et.valueOf();if(rt!=null&&rt!==et)return v.from(rt,Ue,Be);var ot=f(et);if(ot)return ot;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof et[Symbol.toPrimitive]=="function")return v.from(et[Symbol.toPrimitive]("string"),Ue,Be);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+a(et))}v.from=function(et,Ue,Be){return h(et,Ue,Be)},Object.setPrototypeOf(v.prototype,Uint8Array.prototype),Object.setPrototypeOf(v,Uint8Array);function x(et){if(typeof et!="number")throw new TypeError('"size" argument must be of type number');if(et<0)throw new RangeError('The value "'+et+'" is invalid for option "size"')}function C(et,Ue,Be){return x(et),et<=0?A(et):Ue!==void 0?typeof Be=="string"?A(et).fill(Ue,Be):A(et).fill(Ue):A(et)}v.alloc=function(et,Ue,Be){return C(et,Ue,Be)};function D(et){return x(et),A(et<0?0:P(et)|0)}v.allocUnsafe=function(et){return D(et)},v.allocUnsafeSlow=function(et){return D(et)};function L(et,Ue){if((typeof Ue!="string"||Ue==="")&&(Ue="utf8"),!v.isEncoding(Ue))throw new TypeError("Unknown encoding: "+Ue);var Be=k(et,Ue)|0,rt=A(Be),ot=rt.write(et,Ue);return ot!==Be&&(rt=rt.slice(0,ot)),rt}function w(et){for(var Ue=et.length<0?0:P(et.length)|0,Be=A(Ue),rt=0;rt=b)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+b.toString(16)+" bytes");return et|0}function E(et){return+et!=et&&(et=0),v.alloc(+et)}v.isBuffer=function(Ue){return Ue!=null&&Ue._isBuffer===!0&&Ue!==v.prototype},v.compare=function(Ue,Be){if(Ke(Ue,Uint8Array)&&(Ue=v.from(Ue,Ue.offset,Ue.byteLength)),Ke(Be,Uint8Array)&&(Be=v.from(Be,Be.offset,Be.byteLength)),!v.isBuffer(Ue)||!v.isBuffer(Be))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ue===Be)return 0;for(var rt=Ue.length,ot=Be.length,qe=0,Oe=Math.min(rt,ot);qeot.length?(v.isBuffer(Oe)||(Oe=v.from(Oe)),Oe.copy(ot,qe)):Uint8Array.prototype.set.call(ot,Oe,qe);else if(v.isBuffer(Oe))Oe.copy(ot,qe);else throw new TypeError('"list" argument must be an Array of Buffers');qe+=Oe.length}return ot};function k(et,Ue){if(v.isBuffer(et))return et.length;if(ArrayBuffer.isView(et)||Ke(et,ArrayBuffer))return et.byteLength;if(typeof et!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+a(et));var Be=et.length,rt=arguments.length>2&&arguments[2]===!0;if(!rt&&Be===0)return 0;for(var ot=!1;;)switch(Ue){case"ascii":case"latin1":case"binary":return Be;case"utf8":case"utf-8":return _e(et).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Be*2;case"hex":return Be>>>1;case"base64":return Ve(et).length;default:if(ot)return rt?-1:_e(et).length;Ue=(""+Ue).toLowerCase(),ot=!0}}v.byteLength=k;function O(et,Ue,Be){var rt=!1;if((Ue===void 0||Ue<0)&&(Ue=0),Ue>this.length||((Be===void 0||Be>this.length)&&(Be=this.length),Be<=0)||(Be>>>=0,Ue>>>=0,Be<=Ue))return"";for(et||(et="utf8");;)switch(et){case"hex":return Q(this,Ue,Be);case"utf8":case"utf-8":return le(this,Ue,Be);case"ascii":return Z(this,Ue,Be);case"latin1":case"binary":return K(this,Ue,Be);case"base64":return ie(this,Ue,Be);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae(this,Ue,Be);default:if(rt)throw new TypeError("Unknown encoding: "+et);et=(et+"").toLowerCase(),rt=!0}}v.prototype._isBuffer=!0;function G(et,Ue,Be){var rt=et[Ue];et[Ue]=et[Be],et[Be]=rt}v.prototype.swap16=function(){var Ue=this.length;if(Ue%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Be=0;BeBe&&(Ue+=" ... "),""},s&&(v.prototype[s]=v.prototype.inspect),v.prototype.compare=function(Ue,Be,rt,ot,qe){if(Ke(Ue,Uint8Array)&&(Ue=v.from(Ue,Ue.offset,Ue.byteLength)),!v.isBuffer(Ue))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+a(Ue));if(Be===void 0&&(Be=0),rt===void 0&&(rt=Ue?Ue.length:0),ot===void 0&&(ot=0),qe===void 0&&(qe=this.length),Be<0||rt>Ue.length||ot<0||qe>this.length)throw new RangeError("out of range index");if(ot>=qe&&Be>=rt)return 0;if(ot>=qe)return-1;if(Be>=rt)return 1;if(Be>>>=0,rt>>>=0,ot>>>=0,qe>>>=0,this===Ue)return 0;for(var Oe=qe-ot,Ce=rt-Be,pe=Math.min(Oe,Ce),be=this.slice(ot,qe),Re=Ue.slice(Be,rt),He=0;He2147483647?Be=2147483647:Be<-2147483648&&(Be=-2147483648),Be=+Be,lt(Be)&&(Be=ot?0:et.length-1),Be<0&&(Be=et.length+Be),Be>=et.length){if(ot)return-1;Be=et.length-1}else if(Be<0)if(ot)Be=0;else return-1;if(typeof Ue=="string"&&(Ue=v.from(Ue,rt)),v.isBuffer(Ue))return Ue.length===0?-1:U(et,Ue,Be,rt,ot);if(typeof Ue=="number")return Ue=Ue&255,typeof Uint8Array.prototype.indexOf=="function"?ot?Uint8Array.prototype.indexOf.call(et,Ue,Be):Uint8Array.prototype.lastIndexOf.call(et,Ue,Be):U(et,[Ue],Be,rt,ot);throw new TypeError("val must be string, number or Buffer")}function U(et,Ue,Be,rt,ot){var qe=1,Oe=et.length,Ce=Ue.length;if(rt!==void 0&&(rt=String(rt).toLowerCase(),rt==="ucs2"||rt==="ucs-2"||rt==="utf16le"||rt==="utf-16le")){if(et.length<2||Ue.length<2)return-1;qe=2,Oe/=2,Ce/=2,Be/=2}function pe(ct,bt){return qe===1?ct[bt]:ct.readUInt16BE(bt*qe)}var be;if(ot){var Re=-1;for(be=Be;beOe&&(Be=Oe-Ce),be=Be;be>=0;be--){for(var He=!0,st=0;stot&&(rt=ot)):rt=ot;var qe=Ue.length;rt>qe/2&&(rt=qe/2);var Oe;for(Oe=0;Oe>>0,isFinite(rt)?(rt=rt>>>0,ot===void 0&&(ot="utf8")):(ot=rt,rt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var qe=this.length-Be;if((rt===void 0||rt>qe)&&(rt=qe),Ue.length>0&&(rt<0||Be<0)||Be>this.length)throw new RangeError("Attempt to write outside buffer bounds");ot||(ot="utf8");for(var Oe=!1;;)switch(ot){case"hex":return H(this,Ue,Be,rt);case"utf8":case"utf-8":return B(this,Ue,Be,rt);case"ascii":case"latin1":case"binary":return W(this,Ue,Be,rt);case"base64":return q(this,Ue,Be,rt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,Ue,Be,rt);default:if(Oe)throw new TypeError("Unknown encoding: "+ot);ot=(""+ot).toLowerCase(),Oe=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ie(et,Ue,Be){return Ue===0&&Be===et.length?o.fromByteArray(et):o.fromByteArray(et.slice(Ue,Be))}function le(et,Ue,Be){Be=Math.min(et.length,Be);for(var rt=[],ot=Ue;ot239?4:qe>223?3:qe>191?2:1;if(ot+Ce<=Be){var pe=void 0,be=void 0,Re=void 0,He=void 0;switch(Ce){case 1:qe<128&&(Oe=qe);break;case 2:pe=et[ot+1],(pe&192)===128&&(He=(qe&31)<<6|pe&63,He>127&&(Oe=He));break;case 3:pe=et[ot+1],be=et[ot+2],(pe&192)===128&&(be&192)===128&&(He=(qe&15)<<12|(pe&63)<<6|be&63,He>2047&&(He<55296||He>57343)&&(Oe=He));break;case 4:pe=et[ot+1],be=et[ot+2],Re=et[ot+3],(pe&192)===128&&(be&192)===128&&(Re&192)===128&&(He=(qe&15)<<18|(pe&63)<<12|(be&63)<<6|Re&63,He>65535&&He<1114112&&(Oe=He))}}Oe===null?(Oe=65533,Ce=1):Oe>65535&&(Oe-=65536,rt.push(Oe>>>10&1023|55296),Oe=56320|Oe&1023),rt.push(Oe),ot+=Ce}return $(rt)}var he=4096;function $(et){var Ue=et.length;if(Ue<=he)return String.fromCharCode.apply(String,et);for(var Be="",rt=0;rtrt)&&(Be=rt);for(var ot="",qe=Ue;qert&&(Ue=rt),Be<0?(Be+=rt,Be<0&&(Be=0)):Be>rt&&(Be=rt),BeBe)throw new RangeError("Trying to access beyond buffer length")}v.prototype.readUintLE=v.prototype.readUIntLE=function(Ue,Be,rt){Ue=Ue>>>0,Be=Be>>>0,rt||fe(Ue,Be,this.length);for(var ot=this[Ue],qe=1,Oe=0;++Oe>>0,Be=Be>>>0,rt||fe(Ue,Be,this.length);for(var ot=this[Ue+--Be],qe=1;Be>0&&(qe*=256);)ot+=this[Ue+--Be]*qe;return ot},v.prototype.readUint8=v.prototype.readUInt8=function(Ue,Be){return Ue=Ue>>>0,Be||fe(Ue,1,this.length),this[Ue]},v.prototype.readUint16LE=v.prototype.readUInt16LE=function(Ue,Be){return Ue=Ue>>>0,Be||fe(Ue,2,this.length),this[Ue]|this[Ue+1]<<8},v.prototype.readUint16BE=v.prototype.readUInt16BE=function(Ue,Be){return Ue=Ue>>>0,Be||fe(Ue,2,this.length),this[Ue]<<8|this[Ue+1]},v.prototype.readUint32LE=v.prototype.readUInt32LE=function(Ue,Be){return Ue=Ue>>>0,Be||fe(Ue,4,this.length),(this[Ue]|this[Ue+1]<<8|this[Ue+2]<<16)+this[Ue+3]*16777216},v.prototype.readUint32BE=v.prototype.readUInt32BE=function(Ue,Be){return Ue=Ue>>>0,Be||fe(Ue,4,this.length),this[Ue]*16777216+(this[Ue+1]<<16|this[Ue+2]<<8|this[Ue+3])},v.prototype.readBigUInt64LE=mt(function(Ue){Ue=Ue>>>0,Ae(Ue,"offset");var Be=this[Ue],rt=this[Ue+7];(Be===void 0||rt===void 0)&&De(Ue,this.length-8);var ot=Be+this[++Ue]*Math.pow(2,8)+this[++Ue]*Math.pow(2,16)+this[++Ue]*Math.pow(2,24),qe=this[++Ue]+this[++Ue]*Math.pow(2,8)+this[++Ue]*Math.pow(2,16)+rt*Math.pow(2,24);return BigInt(ot)+(BigInt(qe)<>>0,Ae(Ue,"offset");var Be=this[Ue],rt=this[Ue+7];(Be===void 0||rt===void 0)&&De(Ue,this.length-8);var ot=Be*Math.pow(2,24)+this[++Ue]*Math.pow(2,16)+this[++Ue]*Math.pow(2,8)+this[++Ue],qe=this[++Ue]*Math.pow(2,24)+this[++Ue]*Math.pow(2,16)+this[++Ue]*Math.pow(2,8)+rt;return(BigInt(ot)<>>0,Be=Be>>>0,rt||fe(Ue,Be,this.length);for(var ot=this[Ue],qe=1,Oe=0;++Oe=qe&&(ot-=Math.pow(2,8*Be)),ot},v.prototype.readIntBE=function(Ue,Be,rt){Ue=Ue>>>0,Be=Be>>>0,rt||fe(Ue,Be,this.length);for(var ot=Be,qe=1,Oe=this[Ue+--ot];ot>0&&(qe*=256);)Oe+=this[Ue+--ot]*qe;return qe*=128,Oe>=qe&&(Oe-=Math.pow(2,8*Be)),Oe},v.prototype.readInt8=function(Ue,Be){return Ue=Ue>>>0,Be||fe(Ue,1,this.length),this[Ue]&128?(255-this[Ue]+1)*-1:this[Ue]},v.prototype.readInt16LE=function(Ue,Be){Ue=Ue>>>0,Be||fe(Ue,2,this.length);var rt=this[Ue]|this[Ue+1]<<8;return rt&32768?rt|4294901760:rt},v.prototype.readInt16BE=function(Ue,Be){Ue=Ue>>>0,Be||fe(Ue,2,this.length);var rt=this[Ue+1]|this[Ue]<<8;return rt&32768?rt|4294901760:rt},v.prototype.readInt32LE=function(Ue,Be){return Ue=Ue>>>0,Be||fe(Ue,4,this.length),this[Ue]|this[Ue+1]<<8|this[Ue+2]<<16|this[Ue+3]<<24},v.prototype.readInt32BE=function(Ue,Be){return Ue=Ue>>>0,Be||fe(Ue,4,this.length),this[Ue]<<24|this[Ue+1]<<16|this[Ue+2]<<8|this[Ue+3]},v.prototype.readBigInt64LE=mt(function(Ue){Ue=Ue>>>0,Ae(Ue,"offset");var Be=this[Ue],rt=this[Ue+7];(Be===void 0||rt===void 0)&&De(Ue,this.length-8);var ot=this[Ue+4]+this[Ue+5]*Math.pow(2,8)+this[Ue+6]*Math.pow(2,16)+(rt<<24);return(BigInt(ot)<>>0,Ae(Ue,"offset");var Be=this[Ue],rt=this[Ue+7];(Be===void 0||rt===void 0)&&De(Ue,this.length-8);var ot=(Be<<24)+this[++Ue]*Math.pow(2,16)+this[++Ue]*Math.pow(2,8)+this[++Ue];return(BigInt(ot)<>>0,Be||fe(Ue,4,this.length),c.read(this,Ue,!0,23,4)},v.prototype.readFloatBE=function(Ue,Be){return Ue=Ue>>>0,Be||fe(Ue,4,this.length),c.read(this,Ue,!1,23,4)},v.prototype.readDoubleLE=function(Ue,Be){return Ue=Ue>>>0,Be||fe(Ue,8,this.length),c.read(this,Ue,!0,52,8)},v.prototype.readDoubleBE=function(Ue,Be){return Ue=Ue>>>0,Be||fe(Ue,8,this.length),c.read(this,Ue,!1,52,8)};function te(et,Ue,Be,rt,ot,qe){if(!v.isBuffer(et))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ue>ot||Ueet.length)throw new RangeError("Index out of range")}v.prototype.writeUintLE=v.prototype.writeUIntLE=function(Ue,Be,rt,ot){if(Ue=+Ue,Be=Be>>>0,rt=rt>>>0,!ot){var qe=Math.pow(2,8*rt)-1;te(this,Ue,Be,rt,qe,0)}var Oe=1,Ce=0;for(this[Be]=Ue&255;++Ce>>0,rt=rt>>>0,!ot){var qe=Math.pow(2,8*rt)-1;te(this,Ue,Be,rt,qe,0)}var Oe=rt-1,Ce=1;for(this[Be+Oe]=Ue&255;--Oe>=0&&(Ce*=256);)this[Be+Oe]=Ue/Ce&255;return Be+rt},v.prototype.writeUint8=v.prototype.writeUInt8=function(Ue,Be,rt){return Ue=+Ue,Be=Be>>>0,rt||te(this,Ue,Be,1,255,0),this[Be]=Ue&255,Be+1},v.prototype.writeUint16LE=v.prototype.writeUInt16LE=function(Ue,Be,rt){return Ue=+Ue,Be=Be>>>0,rt||te(this,Ue,Be,2,65535,0),this[Be]=Ue&255,this[Be+1]=Ue>>>8,Be+2},v.prototype.writeUint16BE=v.prototype.writeUInt16BE=function(Ue,Be,rt){return Ue=+Ue,Be=Be>>>0,rt||te(this,Ue,Be,2,65535,0),this[Be]=Ue>>>8,this[Be+1]=Ue&255,Be+2},v.prototype.writeUint32LE=v.prototype.writeUInt32LE=function(Ue,Be,rt){return Ue=+Ue,Be=Be>>>0,rt||te(this,Ue,Be,4,4294967295,0),this[Be+3]=Ue>>>24,this[Be+2]=Ue>>>16,this[Be+1]=Ue>>>8,this[Be]=Ue&255,Be+4},v.prototype.writeUint32BE=v.prototype.writeUInt32BE=function(Ue,Be,rt){return Ue=+Ue,Be=Be>>>0,rt||te(this,Ue,Be,4,4294967295,0),this[Be]=Ue>>>24,this[Be+1]=Ue>>>16,this[Be+2]=Ue>>>8,this[Be+3]=Ue&255,Be+4};function ne(et,Ue,Be,rt,ot){Me(Ue,rt,ot,et,Be,7);var qe=Number(Ue&BigInt(4294967295));et[Be++]=qe,qe=qe>>8,et[Be++]=qe,qe=qe>>8,et[Be++]=qe,qe=qe>>8,et[Be++]=qe;var Oe=Number(Ue>>BigInt(32)&BigInt(4294967295));return et[Be++]=Oe,Oe=Oe>>8,et[Be++]=Oe,Oe=Oe>>8,et[Be++]=Oe,Oe=Oe>>8,et[Be++]=Oe,Be}function ce(et,Ue,Be,rt,ot){Me(Ue,rt,ot,et,Be,7);var qe=Number(Ue&BigInt(4294967295));et[Be+7]=qe,qe=qe>>8,et[Be+6]=qe,qe=qe>>8,et[Be+5]=qe,qe=qe>>8,et[Be+4]=qe;var Oe=Number(Ue>>BigInt(32)&BigInt(4294967295));return et[Be+3]=Oe,Oe=Oe>>8,et[Be+2]=Oe,Oe=Oe>>8,et[Be+1]=Oe,Oe=Oe>>8,et[Be]=Oe,Be+8}v.prototype.writeBigUInt64LE=mt(function(Ue){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ne(this,Ue,Be,BigInt(0),BigInt("0xffffffffffffffff"))}),v.prototype.writeBigUInt64BE=mt(function(Ue){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ce(this,Ue,Be,BigInt(0),BigInt("0xffffffffffffffff"))}),v.prototype.writeIntLE=function(Ue,Be,rt,ot){if(Ue=+Ue,Be=Be>>>0,!ot){var qe=Math.pow(2,8*rt-1);te(this,Ue,Be,rt,qe-1,-qe)}var Oe=0,Ce=1,pe=0;for(this[Be]=Ue&255;++Oe>0)-pe&255;return Be+rt},v.prototype.writeIntBE=function(Ue,Be,rt,ot){if(Ue=+Ue,Be=Be>>>0,!ot){var qe=Math.pow(2,8*rt-1);te(this,Ue,Be,rt,qe-1,-qe)}var Oe=rt-1,Ce=1,pe=0;for(this[Be+Oe]=Ue&255;--Oe>=0&&(Ce*=256);)Ue<0&&pe===0&&this[Be+Oe+1]!==0&&(pe=1),this[Be+Oe]=(Ue/Ce>>0)-pe&255;return Be+rt},v.prototype.writeInt8=function(Ue,Be,rt){return Ue=+Ue,Be=Be>>>0,rt||te(this,Ue,Be,1,127,-128),Ue<0&&(Ue=255+Ue+1),this[Be]=Ue&255,Be+1},v.prototype.writeInt16LE=function(Ue,Be,rt){return Ue=+Ue,Be=Be>>>0,rt||te(this,Ue,Be,2,32767,-32768),this[Be]=Ue&255,this[Be+1]=Ue>>>8,Be+2},v.prototype.writeInt16BE=function(Ue,Be,rt){return Ue=+Ue,Be=Be>>>0,rt||te(this,Ue,Be,2,32767,-32768),this[Be]=Ue>>>8,this[Be+1]=Ue&255,Be+2},v.prototype.writeInt32LE=function(Ue,Be,rt){return Ue=+Ue,Be=Be>>>0,rt||te(this,Ue,Be,4,2147483647,-2147483648),this[Be]=Ue&255,this[Be+1]=Ue>>>8,this[Be+2]=Ue>>>16,this[Be+3]=Ue>>>24,Be+4},v.prototype.writeInt32BE=function(Ue,Be,rt){return Ue=+Ue,Be=Be>>>0,rt||te(this,Ue,Be,4,2147483647,-2147483648),Ue<0&&(Ue=4294967295+Ue+1),this[Be]=Ue>>>24,this[Be+1]=Ue>>>16,this[Be+2]=Ue>>>8,this[Be+3]=Ue&255,Be+4},v.prototype.writeBigInt64LE=mt(function(Ue){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ne(this,Ue,Be,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),v.prototype.writeBigInt64BE=mt(function(Ue){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ce(this,Ue,Be,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function oe(et,Ue,Be,rt,ot,qe){if(Be+rt>et.length)throw new RangeError("Index out of range");if(Be<0)throw new RangeError("Index out of range")}function de(et,Ue,Be,rt,ot){return Ue=+Ue,Be=Be>>>0,ot||oe(et,Ue,Be,4),c.write(et,Ue,Be,rt,23,4),Be+4}v.prototype.writeFloatLE=function(Ue,Be,rt){return de(this,Ue,Be,!0,rt)},v.prototype.writeFloatBE=function(Ue,Be,rt){return de(this,Ue,Be,!1,rt)};function we(et,Ue,Be,rt,ot){return Ue=+Ue,Be=Be>>>0,ot||oe(et,Ue,Be,8),c.write(et,Ue,Be,rt,52,8),Be+8}v.prototype.writeDoubleLE=function(Ue,Be,rt){return we(this,Ue,Be,!0,rt)},v.prototype.writeDoubleBE=function(Ue,Be,rt){return we(this,Ue,Be,!1,rt)},v.prototype.copy=function(Ue,Be,rt,ot){if(!v.isBuffer(Ue))throw new TypeError("argument should be a Buffer");if(rt||(rt=0),!ot&&ot!==0&&(ot=this.length),Be>=Ue.length&&(Be=Ue.length),Be||(Be=0),ot>0&&ot=this.length)throw new RangeError("Index out of range");if(ot<0)throw new RangeError("sourceEnd out of bounds");ot>this.length&&(ot=this.length),Ue.length-Be>>0,rt=rt===void 0?this.length:rt>>>0,Ue||(Ue=0);var Oe;if(typeof Ue=="number")for(Oe=Be;OeMath.pow(2,32)?ot=Fe(String(Be)):typeof Be=="bigint"&&(ot=String(Be),(Be>Math.pow(BigInt(2),BigInt(32))||Be<-Math.pow(BigInt(2),BigInt(32)))&&(ot=Fe(ot)),ot+="n"),rt+=" It must be ".concat(Ue,". Received ").concat(ot),rt},RangeError);function Fe(et){for(var Ue="",Be=et.length,rt=et[0]==="-"?1:0;Be>=rt+4;Be-=3)Ue="_".concat(et.slice(Be-3,Be)).concat(Ue);return"".concat(et.slice(0,Be)).concat(Ue)}function Ie(et,Ue,Be){Ae(Ue,"offset"),(et[Ue]===void 0||et[Ue+Be]===void 0)&&De(Ue,et.length-(Be+1))}function Me(et,Ue,Be,rt,ot,qe){if(et>Be||et3?Ue===0||Ue===BigInt(0)?Ce=">= 0".concat(Oe," and < 2").concat(Oe," ** ").concat((qe+1)*8).concat(Oe):Ce=">= -(2".concat(Oe," ** ").concat((qe+1)*8-1).concat(Oe,") and < 2 ** ")+"".concat((qe+1)*8-1).concat(Oe):Ce=">= ".concat(Ue).concat(Oe," and <= ").concat(Be).concat(Oe),new Se.ERR_OUT_OF_RANGE("value",Ce,et)}Ie(rt,ot,qe)}function Ae(et,Ue){if(typeof et!="number")throw new Se.ERR_INVALID_ARG_TYPE(Ue,"number",et)}function De(et,Ue,Be){throw Math.floor(et)!==et?(Ae(et,Be),new Se.ERR_OUT_OF_RANGE(Be||"offset","an integer",et)):Ue<0?new Se.ERR_BUFFER_OUT_OF_BOUNDS:new Se.ERR_OUT_OF_RANGE(Be||"offset",">= ".concat(Be?1:0," and <= ").concat(Ue),et)}var ke=/[^+/0-9A-Za-z-_]/g;function We(et){if(et=et.split("=")[0],et=et.trim().replace(ke,""),et.length<2)return"";for(;et.length%4!==0;)et=et+"=";return et}function _e(et,Ue){Ue=Ue||1/0;for(var Be,rt=et.length,ot=null,qe=[],Oe=0;Oe55295&&Be<57344){if(!ot){if(Be>56319){(Ue-=3)>-1&&qe.push(239,191,189);continue}else if(Oe+1===rt){(Ue-=3)>-1&&qe.push(239,191,189);continue}ot=Be;continue}if(Be<56320){(Ue-=3)>-1&&qe.push(239,191,189),ot=Be;continue}Be=(ot-55296<<10|Be-56320)+65536}else ot&&(Ue-=3)>-1&&qe.push(239,191,189);if(ot=null,Be<128){if((Ue-=1)<0)break;qe.push(Be)}else if(Be<2048){if((Ue-=2)<0)break;qe.push(Be>>6|192,Be&63|128)}else if(Be<65536){if((Ue-=3)<0)break;qe.push(Be>>12|224,Be>>6&63|128,Be&63|128)}else if(Be<1114112){if((Ue-=4)<0)break;qe.push(Be>>18|240,Be>>12&63|128,Be>>6&63|128,Be&63|128)}else throw new Error("Invalid code point")}return qe}function Ye(et){for(var Ue=[],Be=0;Be>8,ot=Be%256,qe.push(ot),qe.push(rt);return qe}function Ve(et){return o.toByteArray(We(et))}function Ze(et,Ue,Be,rt){var ot;for(ot=0;ot=Ue.length||ot>=et.length);++ot)Ue[ot+Be]=et[ot];return ot}function Ke(et,Ue){return et instanceof Ue||et!=null&&et.constructor!=null&&et.constructor.name!=null&&et.constructor.name===Ue.name}function lt(et){return et!==et}var vt=function(){for(var et="0123456789abcdef",Ue=new Array(256),Be=0;Be<16;++Be)for(var rt=Be*16,ot=0;ot<16;++ot)Ue[rt+ot]=et[Be]+et[ot];return Ue}();function mt(et){return typeof BigInt>"u"?Et:et}function Et(){throw new Error("BigInt not supported")}},35791:function(R){R.exports=m,R.exports.isMobile=m,R.exports.default=m;var F=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,e=/CrOS/,i=/android|ipad|playbook|silk/i;function m(t){t||(t={});var y=t.ua;if(!y&&typeof navigator<"u"&&(y=navigator.userAgent),y&&y.headers&&typeof y.headers["user-agent"]=="string"&&(y=y.headers["user-agent"]),typeof y!="string")return!1;var p=F.test(y)&&!e.test(y)||!!t.tablet&&i.test(y);return!p&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&y.indexOf("Macintosh")!==-1&&y.indexOf("Safari")!==-1&&(p=!0),p}},86781:function(R,F,e){e.r(F),e.d(F,{sankeyCenter:function(){return u},sankeyCircular:function(){return P},sankeyJustify:function(){return n},sankeyLeft:function(){return d},sankeyRight:function(){return r}});var i=e(33064),m=e(15140),t=e(45879),y=e(2502),p=e.n(y);function l(Te){return Te.target.depth}function d(Te){return Te.depth}function r(Te,Fe){return Fe-1-Te.height}function n(Te,Fe){return Te.sourceLinks.length?Te.depth:Fe-1}function u(Te){return Te.targetLinks.length?Te.depth:Te.sourceLinks.length?(0,i.VV)(Te.sourceLinks,l)-1:0}function a(Te){return function(){return Te}}var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Te){return typeof Te}:function(Te){return Te&&typeof Symbol=="function"&&Te.constructor===Symbol&&Te!==Symbol.prototype?"symbol":typeof Te};function c(Te,Fe){return b(Te.source,Fe.source)||Te.index-Fe.index}function s(Te,Fe){return b(Te.target,Fe.target)||Te.index-Fe.index}function b(Te,Fe){return Te.partOfCycle===Fe.partOfCycle?Te.y0-Fe.y0:Te.circularLinkType==="top"||Fe.circularLinkType==="bottom"?-1:1}function g(Te){return Te.value}function A(Te){return(Te.y0+Te.y1)/2}function v(Te){return A(Te.source)}function h(Te){return A(Te.target)}function x(Te){return Te.index}function C(Te){return Te.nodes}function D(Te){return Te.links}function L(Te,Fe){var Ie=Te.get(Fe);if(!Ie)throw new Error("missing: "+Fe);return Ie}function w(Te,Fe){return Fe(Te)}var M=25,S=10,f=.3;function P(){var Te=0,Fe=0,Ie=1,Me=1,Ae=24,De,ke=x,We=n,_e=C,Ye=D,Pe=32,Ve=2,Ze,Ke=null;function lt(){var ot={nodes:_e.apply(null,arguments),links:Ye.apply(null,arguments)};vt(ot),E(ot,ke,Ke),mt(ot),Ue(ot),k(ot,ke),Be(ot,Pe,ke),rt(ot);for(var qe=4,Oe=0;Oe"u"?"undefined":o(pe))!=="object"&&(pe=Oe.source=L(qe,pe)),(typeof be>"u"?"undefined":o(be))!=="object"&&(be=Oe.target=L(qe,be)),pe.sourceLinks.push(Oe),be.targetLinks.push(Oe)}),ot}function mt(ot){ot.nodes.forEach(function(qe){qe.partOfCycle=!1,qe.value=Math.max((0,i.Sm)(qe.sourceLinks,g),(0,i.Sm)(qe.targetLinks,g)),qe.sourceLinks.forEach(function(Oe){Oe.circular&&(qe.partOfCycle=!0,qe.circularLinkType=Oe.circularLinkType)}),qe.targetLinks.forEach(function(Oe){Oe.circular&&(qe.partOfCycle=!0,qe.circularLinkType=Oe.circularLinkType)})})}function Et(ot){var qe=0,Oe=0,Ce=0,pe=0,be=(0,i.Fp)(ot.nodes,function(Re){return Re.column});return ot.links.forEach(function(Re){Re.circular&&(Re.circularLinkType=="top"?qe=qe+Re.width:Oe=Oe+Re.width,Re.target.column==0&&(pe=pe+Re.width),Re.source.column==be&&(Ce=Ce+Re.width))}),qe=qe>0?qe+M+S:qe,Oe=Oe>0?Oe+M+S:Oe,Ce=Ce>0?Ce+M+S:Ce,pe=pe>0?pe+M+S:pe,{top:qe,bottom:Oe,left:pe,right:Ce}}function et(ot,qe){var Oe=(0,i.Fp)(ot.nodes,function(ct){return ct.column}),Ce=Ie-Te,pe=Me-Fe,be=Ce+qe.right+qe.left,Re=pe+qe.top+qe.bottom,He=Ce/be,st=pe/Re;return Te=Te*He+qe.left,Ie=qe.right==0?Ie:Ie*He,Fe=Fe*st+qe.top,Me=Me*st,ot.nodes.forEach(function(ct){ct.x0=Te+ct.column*((Ie-Te-Ae)/Oe),ct.x1=ct.x0+Ae}),st}function Ue(ot){var qe,Oe,Ce;for(qe=ot.nodes,Oe=[],Ce=0;qe.length;++Ce,qe=Oe,Oe=[])qe.forEach(function(pe){pe.depth=Ce,pe.sourceLinks.forEach(function(be){Oe.indexOf(be.target)<0&&!be.circular&&Oe.push(be.target)})});for(qe=ot.nodes,Oe=[],Ce=0;qe.length;++Ce,qe=Oe,Oe=[])qe.forEach(function(pe){pe.height=Ce,pe.targetLinks.forEach(function(be){Oe.indexOf(be.source)<0&&!be.circular&&Oe.push(be.source)})});ot.nodes.forEach(function(pe){pe.column=Math.floor(We.call(null,pe,Ce))})}function Be(ot,qe,Oe){var Ce=(0,m.b1)().key(function(ct){return ct.column}).sortKeys(i.j2).entries(ot.nodes).map(function(ct){return ct.values});Re(Oe),st();for(var pe=1,be=qe;be>0;--be)He(pe*=.99,Oe),st();function Re(ct){if(Ze){var bt=1/0;Ce.forEach(function(Ft){var tr=Me*Ze/(Ft.length+1);bt=tr0))if(Ft==0&&Gt==1)lr=tr.y1-tr.y0,tr.y0=Me/2-lr/2,tr.y1=Me/2+lr/2;else if(Ft==Lt-1&&Gt==1)lr=tr.y1-tr.y0,tr.y0=Me/2-lr/2,tr.y1=Me/2+lr/2;else{var Or=0,xt=(0,i.J6)(tr.sourceLinks,h),jt=(0,i.J6)(tr.targetLinks,v);xt&&jt?Or=(xt+jt)/2:Or=xt||jt;var Yt=(Or-A(tr))*ct;tr.y0+=Yt,tr.y1+=Yt}})})}function st(){Ce.forEach(function(ct){var bt,Lt,Ut=Fe,Gt=ct.length,Ft;for(ct.sort(b),Ft=0;Ft0&&(bt.y0+=Lt,bt.y1+=Lt),Ut=bt.y1+De;if(Lt=Ut-De-Me,Lt>0)for(Ut=bt.y0-=Lt,bt.y1-=Lt,Ft=Gt-2;Ft>=0;--Ft)bt=ct[Ft],Lt=bt.y1+De-Ut,Lt>0&&(bt.y0-=Lt,bt.y1-=Lt),Ut=bt.y0})}}function rt(ot){ot.nodes.forEach(function(qe){qe.sourceLinks.sort(s),qe.targetLinks.sort(c)}),ot.nodes.forEach(function(qe){var Oe=qe.y0,Ce=Oe,pe=qe.y1,be=pe;qe.sourceLinks.forEach(function(Re){Re.circular?(Re.y0=pe-Re.width/2,pe=pe-Re.width):(Re.y0=Oe+Re.width/2,Oe+=Re.width)}),qe.targetLinks.forEach(function(Re){Re.circular?(Re.y1=be-Re.width/2,be=be-Re.width):(Re.y1=Ce+Re.width/2,Ce+=Re.width)})})}return lt}function E(Te,Fe,Ie){var Me=0;if(Ie===null){for(var Ae=[],De=0;DeFe.source.column)}function z(Te,Fe){var Ie=0;Te.sourceLinks.forEach(function(Ae){Ie=Ae.circular&&!we(Ae,Fe)?Ie+1:Ie});var Me=0;return Te.targetLinks.forEach(function(Ae){Me=Ae.circular&&!we(Ae,Fe)?Me+1:Me}),Ie+Me}function U(Te){var Fe=Te.source.sourceLinks,Ie=0;Fe.forEach(function(De){Ie=De.circular?Ie+1:Ie});var Me=Te.target.targetLinks,Ae=0;return Me.forEach(function(De){Ae=De.circular?Ae+1:Ae}),!(Ie>1||Ae>1)}function H(Te,Fe,Ie){return Te.sort(q),Te.forEach(function(Me,Ae){var De=0;if(we(Me,Ie)&&U(Me))Me.circularPathData.verticalBuffer=De+Me.width/2;else{var ke=0;for(ke;keDe?We:De}Me.circularPathData.verticalBuffer=De+Me.width/2}}),Te}function B(Te,Fe,Ie,Me){var Ae=5,De=(0,i.VV)(Te.links,function(_e){return _e.source.y0});Te.links.forEach(function(_e){_e.circular&&(_e.circularPathData={})});var ke=Te.links.filter(function(_e){return _e.circularLinkType=="top"});H(ke,Fe,Me);var We=Te.links.filter(function(_e){return _e.circularLinkType=="bottom"});H(We,Fe,Me),Te.links.forEach(function(_e){if(_e.circular){if(_e.circularPathData.arcRadius=_e.width+S,_e.circularPathData.leftNodeBuffer=Ae,_e.circularPathData.rightNodeBuffer=Ae,_e.circularPathData.sourceWidth=_e.source.x1-_e.source.x0,_e.circularPathData.sourceX=_e.source.x0+_e.circularPathData.sourceWidth,_e.circularPathData.targetX=_e.target.x0,_e.circularPathData.sourceY=_e.y0,_e.circularPathData.targetY=_e.y1,we(_e,Me)&&U(_e))_e.circularPathData.leftSmallArcRadius=S+_e.width/2,_e.circularPathData.leftLargeArcRadius=S+_e.width/2,_e.circularPathData.rightSmallArcRadius=S+_e.width/2,_e.circularPathData.rightLargeArcRadius=S+_e.width/2,_e.circularLinkType=="bottom"?(_e.circularPathData.verticalFullExtent=_e.source.y1+M+_e.circularPathData.verticalBuffer,_e.circularPathData.verticalLeftInnerExtent=_e.circularPathData.verticalFullExtent-_e.circularPathData.leftLargeArcRadius,_e.circularPathData.verticalRightInnerExtent=_e.circularPathData.verticalFullExtent-_e.circularPathData.rightLargeArcRadius):(_e.circularPathData.verticalFullExtent=_e.source.y0-M-_e.circularPathData.verticalBuffer,_e.circularPathData.verticalLeftInnerExtent=_e.circularPathData.verticalFullExtent+_e.circularPathData.leftLargeArcRadius,_e.circularPathData.verticalRightInnerExtent=_e.circularPathData.verticalFullExtent+_e.circularPathData.rightLargeArcRadius);else{var Ye=_e.source.column,Pe=_e.circularLinkType,Ve=Te.links.filter(function(lt){return lt.source.column==Ye&<.circularLinkType==Pe});_e.circularLinkType=="bottom"?Ve.sort(ie):Ve.sort(re);var Ze=0;Ve.forEach(function(lt,vt){lt.circularLinkID==_e.circularLinkID&&(_e.circularPathData.leftSmallArcRadius=S+_e.width/2+Ze,_e.circularPathData.leftLargeArcRadius=S+_e.width/2+vt*Fe+Ze),Ze=Ze+lt.width}),Ye=_e.target.column,Ve=Te.links.filter(function(lt){return lt.target.column==Ye&<.circularLinkType==Pe}),_e.circularLinkType=="bottom"?Ve.sort(he):Ve.sort(le),Ze=0,Ve.forEach(function(lt,vt){lt.circularLinkID==_e.circularLinkID&&(_e.circularPathData.rightSmallArcRadius=S+_e.width/2+Ze,_e.circularPathData.rightLargeArcRadius=S+_e.width/2+vt*Fe+Ze),Ze=Ze+lt.width}),_e.circularLinkType=="bottom"?(_e.circularPathData.verticalFullExtent=Math.max(Ie,_e.source.y1,_e.target.y1)+M+_e.circularPathData.verticalBuffer,_e.circularPathData.verticalLeftInnerExtent=_e.circularPathData.verticalFullExtent-_e.circularPathData.leftLargeArcRadius,_e.circularPathData.verticalRightInnerExtent=_e.circularPathData.verticalFullExtent-_e.circularPathData.rightLargeArcRadius):(_e.circularPathData.verticalFullExtent=De-M-_e.circularPathData.verticalBuffer,_e.circularPathData.verticalLeftInnerExtent=_e.circularPathData.verticalFullExtent+_e.circularPathData.leftLargeArcRadius,_e.circularPathData.verticalRightInnerExtent=_e.circularPathData.verticalFullExtent+_e.circularPathData.rightLargeArcRadius)}_e.circularPathData.leftInnerExtent=_e.circularPathData.sourceX+_e.circularPathData.leftNodeBuffer,_e.circularPathData.rightInnerExtent=_e.circularPathData.targetX-_e.circularPathData.rightNodeBuffer,_e.circularPathData.leftFullExtent=_e.circularPathData.sourceX+_e.circularPathData.leftLargeArcRadius+_e.circularPathData.leftNodeBuffer,_e.circularPathData.rightFullExtent=_e.circularPathData.targetX-_e.circularPathData.rightLargeArcRadius-_e.circularPathData.rightNodeBuffer}if(_e.circular)_e.path=W(_e);else{var Ke=(0,t.h5)().source(function(lt){var vt=lt.source.x0+(lt.source.x1-lt.source.x0),mt=lt.y0;return[vt,mt]}).target(function(lt){var vt=lt.target.x0,mt=lt.y1;return[vt,mt]});_e.path=Ke(_e)}})}function W(Te){var Fe="";return Te.circularLinkType=="top"?Fe="M"+Te.circularPathData.sourceX+" "+Te.circularPathData.sourceY+" L"+Te.circularPathData.leftInnerExtent+" "+Te.circularPathData.sourceY+" A"+Te.circularPathData.leftLargeArcRadius+" "+Te.circularPathData.leftSmallArcRadius+" 0 0 0 "+Te.circularPathData.leftFullExtent+" "+(Te.circularPathData.sourceY-Te.circularPathData.leftSmallArcRadius)+" L"+Te.circularPathData.leftFullExtent+" "+Te.circularPathData.verticalLeftInnerExtent+" A"+Te.circularPathData.leftLargeArcRadius+" "+Te.circularPathData.leftLargeArcRadius+" 0 0 0 "+Te.circularPathData.leftInnerExtent+" "+Te.circularPathData.verticalFullExtent+" L"+Te.circularPathData.rightInnerExtent+" "+Te.circularPathData.verticalFullExtent+" A"+Te.circularPathData.rightLargeArcRadius+" "+Te.circularPathData.rightLargeArcRadius+" 0 0 0 "+Te.circularPathData.rightFullExtent+" "+Te.circularPathData.verticalRightInnerExtent+" L"+Te.circularPathData.rightFullExtent+" "+(Te.circularPathData.targetY-Te.circularPathData.rightSmallArcRadius)+" A"+Te.circularPathData.rightLargeArcRadius+" "+Te.circularPathData.rightSmallArcRadius+" 0 0 0 "+Te.circularPathData.rightInnerExtent+" "+Te.circularPathData.targetY+" L"+Te.circularPathData.targetX+" "+Te.circularPathData.targetY:Fe="M"+Te.circularPathData.sourceX+" "+Te.circularPathData.sourceY+" L"+Te.circularPathData.leftInnerExtent+" "+Te.circularPathData.sourceY+" A"+Te.circularPathData.leftLargeArcRadius+" "+Te.circularPathData.leftSmallArcRadius+" 0 0 1 "+Te.circularPathData.leftFullExtent+" "+(Te.circularPathData.sourceY+Te.circularPathData.leftSmallArcRadius)+" L"+Te.circularPathData.leftFullExtent+" "+Te.circularPathData.verticalLeftInnerExtent+" A"+Te.circularPathData.leftLargeArcRadius+" "+Te.circularPathData.leftLargeArcRadius+" 0 0 1 "+Te.circularPathData.leftInnerExtent+" "+Te.circularPathData.verticalFullExtent+" L"+Te.circularPathData.rightInnerExtent+" "+Te.circularPathData.verticalFullExtent+" A"+Te.circularPathData.rightLargeArcRadius+" "+Te.circularPathData.rightLargeArcRadius+" 0 0 1 "+Te.circularPathData.rightFullExtent+" "+Te.circularPathData.verticalRightInnerExtent+" L"+Te.circularPathData.rightFullExtent+" "+(Te.circularPathData.targetY+Te.circularPathData.rightSmallArcRadius)+" A"+Te.circularPathData.rightLargeArcRadius+" "+Te.circularPathData.rightSmallArcRadius+" 0 0 1 "+Te.circularPathData.rightInnerExtent+" "+Te.circularPathData.targetY+" L"+Te.circularPathData.targetX+" "+Te.circularPathData.targetY,Fe}function q(Te,Fe){return $(Te)==$(Fe)?Te.circularLinkType=="bottom"?ie(Te,Fe):re(Te,Fe):$(Fe)-$(Te)}function re(Te,Fe){return Te.y0-Fe.y0}function ie(Te,Fe){return Fe.y0-Te.y0}function le(Te,Fe){return Te.y1-Fe.y1}function he(Te,Fe){return Fe.y1-Te.y1}function $(Te){return Te.target.column-Te.source.column}function Z(Te){return Te.target.x0-Te.source.x1}function K(Te,Fe){var Ie=O(Te),Me=Z(Fe)/Math.tan(Ie),Ae=de(Te)=="up"?Te.y1+Me:Te.y1-Me;return Ae}function Q(Te,Fe){var Ie=O(Te),Me=Z(Fe)/Math.tan(Ie),Ae=de(Te)=="up"?Te.y1-Me:Te.y1+Me;return Ae}function ae(Te,Fe,Ie,Me){Te.links.forEach(function(Ae){if(!Ae.circular&&Ae.target.column-Ae.source.column>1){var De=Ae.source.column+1,ke=Ae.target.column-1,We=1,_e=ke-De+1;for(We=1;De<=ke;De++,We++)Te.nodes.forEach(function(Ye){if(Ye.column==De){var Pe=We/(_e+1),Ve=Math.pow(1-Pe,3),Ze=3*Pe*Math.pow(1-Pe,2),Ke=3*Math.pow(Pe,2)*(1-Pe),lt=Math.pow(Pe,3),vt=Ve*Ae.y0+Ze*Ae.y0+Ke*Ae.y1+lt*Ae.y1,mt=vt-Ae.width/2,Et=vt+Ae.width/2,et;mt>Ye.y0&&mtYe.y0&&EtYe.y1&&te(Ue,et,Fe,Ie)})):mtYe.y1&&(et=Et-Ye.y0+10,Ye=te(Ye,et,Fe,Ie),Te.nodes.forEach(function(Ue){w(Ue,Me)==w(Ye,Me)||Ue.column!=Ye.column||Ue.y0Ye.y1&&te(Ue,et,Fe,Ie)}))}})}})}function fe(Te,Fe){return Te.y0>Fe.y0&&Te.y0Fe.y0&&Te.y1Fe.y1}function te(Te,Fe,Ie,Me){return Te.y0+Fe>=Ie&&Te.y1+Fe<=Me&&(Te.y0=Te.y0+Fe,Te.y1=Te.y1+Fe,Te.targetLinks.forEach(function(Ae){Ae.y1=Ae.y1+Fe}),Te.sourceLinks.forEach(function(Ae){Ae.y0=Ae.y0+Fe})),Te}function ne(Te,Fe,Ie,Me){Te.nodes.forEach(function(Ae){Me&&Ae.y+(Ae.y1-Ae.y0)>Fe&&(Ae.y=Ae.y-(Ae.y+(Ae.y1-Ae.y0)-Fe));var De=Te.links.filter(function(_e){return w(_e.source,Ie)==w(Ae,Ie)}),ke=De.length;ke>1&&De.sort(function(_e,Ye){if(!_e.circular&&!Ye.circular){if(_e.target.column==Ye.target.column)return _e.y1-Ye.y1;if(oe(_e,Ye)){if(_e.target.column>Ye.target.column){var Pe=Q(Ye,_e);return _e.y1-Pe}if(Ye.target.column>_e.target.column){var Ve=Q(_e,Ye);return Ve-Ye.y1}}else return _e.y1-Ye.y1}if(_e.circular&&!Ye.circular)return _e.circularLinkType=="top"?-1:1;if(Ye.circular&&!_e.circular)return Ye.circularLinkType=="top"?1:-1;if(_e.circular&&Ye.circular)return _e.circularLinkType===Ye.circularLinkType&&_e.circularLinkType=="top"?_e.target.column===Ye.target.column?_e.target.y1-Ye.target.y1:Ye.target.column-_e.target.column:_e.circularLinkType===Ye.circularLinkType&&_e.circularLinkType=="bottom"?_e.target.column===Ye.target.column?Ye.target.y1-_e.target.y1:_e.target.column-Ye.target.column:_e.circularLinkType=="top"?-1:1});var We=Ae.y0;De.forEach(function(_e){_e.y0=We+_e.width/2,We=We+_e.width}),De.forEach(function(_e,Ye){if(_e.circularLinkType=="bottom"){var Pe=Ye+1,Ve=0;for(Pe;Pe1&&Ae.sort(function(We,_e){if(!We.circular&&!_e.circular){if(We.source.column==_e.source.column)return We.y0-_e.y0;if(oe(We,_e)){if(_e.source.column0?"up":"down"}function we(Te,Fe){return w(Te.source,Fe)==w(Te.target,Fe)}function Se(Te,Fe,Ie){var Me=Te.nodes,Ae=Te.links,De=!1,ke=!1;if(Ae.forEach(function(Ze){Ze.circularLinkType=="top"?De=!0:Ze.circularLinkType=="bottom"&&(ke=!0)}),De==!1||ke==!1){var We=(0,i.VV)(Me,function(Ze){return Ze.y0}),_e=(0,i.Fp)(Me,function(Ze){return Ze.y1}),Ye=_e-We,Pe=Ie-Fe,Ve=Pe/Ye;Me.forEach(function(Ze){var Ke=(Ze.y1-Ze.y0)*Ve;Ze.y0=(Ze.y0-We)*Ve,Ze.y1=Ze.y0+Ke}),Ae.forEach(function(Ze){Ze.y0=(Ze.y0-We)*Ve,Ze.y1=(Ze.y1-We)*Ve,Ze.width=Ze.width*Ve})}}},30838:function(R,F,e){e.r(F),e.d(F,{sankey:function(){return x},sankeyCenter:function(){return d},sankeyJustify:function(){return l},sankeyLeft:function(){return y},sankeyLinkHorizontal:function(){return w},sankeyRight:function(){return p}});var i=e(33064),m=e(15140);function t(M){return M.target.depth}function y(M){return M.depth}function p(M,S){return S-1-M.height}function l(M,S){return M.sourceLinks.length?M.depth:S-1}function d(M){return M.targetLinks.length?M.depth:M.sourceLinks.length?(0,i.VV)(M.sourceLinks,t)-1:0}function r(M){return function(){return M}}function n(M,S){return a(M.source,S.source)||M.index-S.index}function u(M,S){return a(M.target,S.target)||M.index-S.index}function a(M,S){return M.y0-S.y0}function o(M){return M.value}function c(M){return(M.y0+M.y1)/2}function s(M){return c(M.source)*M.value}function b(M){return c(M.target)*M.value}function g(M){return M.index}function A(M){return M.nodes}function v(M){return M.links}function h(M,S){var f=M.get(S);if(!f)throw new Error("missing: "+S);return f}function x(){var M=0,S=0,f=1,P=1,E=24,k=8,O=g,G=l,z=A,U=v,H=32,B=2/3;function W(){var $={nodes:z.apply(null,arguments),links:U.apply(null,arguments)};return q($),re($),ie($),le($),he($),$}W.update=function($){return he($),$},W.nodeId=function($){return arguments.length?(O=typeof $=="function"?$:r($),W):O},W.nodeAlign=function($){return arguments.length?(G=typeof $=="function"?$:r($),W):G},W.nodeWidth=function($){return arguments.length?(E=+$,W):E},W.nodePadding=function($){return arguments.length?(k=+$,W):k},W.nodes=function($){return arguments.length?(z=typeof $=="function"?$:r($),W):z},W.links=function($){return arguments.length?(U=typeof $=="function"?$:r($),W):U},W.size=function($){return arguments.length?(M=S=0,f=+$[0],P=+$[1],W):[f-M,P-S]},W.extent=function($){return arguments.length?(M=+$[0][0],f=+$[1][0],S=+$[0][1],P=+$[1][1],W):[[M,S],[f,P]]},W.iterations=function($){return arguments.length?(H=+$,W):H};function q($){$.nodes.forEach(function(K,Q){K.index=Q,K.sourceLinks=[],K.targetLinks=[]});var Z=(0,m.UI)($.nodes,O);$.links.forEach(function(K,Q){K.index=Q;var ae=K.source,fe=K.target;typeof ae!="object"&&(ae=K.source=h(Z,ae)),typeof fe!="object"&&(fe=K.target=h(Z,fe)),ae.sourceLinks.push(K),fe.targetLinks.push(K)})}function re($){$.nodes.forEach(function(Z){Z.value=Math.max((0,i.Sm)(Z.sourceLinks,o),(0,i.Sm)(Z.targetLinks,o))})}function ie($){var Z,K,Q;for(Z=$.nodes,K=[],Q=0;Z.length;++Q,Z=K,K=[])Z.forEach(function(fe){fe.depth=Q,fe.sourceLinks.forEach(function(te){K.indexOf(te.target)<0&&K.push(te.target)})});for(Z=$.nodes,K=[],Q=0;Z.length;++Q,Z=K,K=[])Z.forEach(function(fe){fe.height=Q,fe.targetLinks.forEach(function(te){K.indexOf(te.source)<0&&K.push(te.source)})});var ae=(f-M-E)/(Q-1);$.nodes.forEach(function(fe){fe.x1=(fe.x0=M+Math.max(0,Math.min(Q-1,Math.floor(G.call(null,fe,Q))))*ae)+E})}function le($){var Z=(0,m.b1)().key(function(ce){return ce.x0}).sortKeys(i.j2).entries($.nodes).map(function(ce){return ce.values});ae(),ne();for(var K=1,Q=H;Q>0;--Q)te(K*=.99),ne(),fe(K),ne();function ae(){var ce=(0,i.Fp)(Z,function(we){return we.length}),oe=B*(P-S)/(ce-1);k>oe&&(k=oe);var de=(0,i.VV)(Z,function(we){return(P-S-(we.length-1)*k)/(0,i.Sm)(we,o)});Z.forEach(function(we){we.forEach(function(Se,Te){Se.y1=(Se.y0=Te)+Se.value*de})}),$.links.forEach(function(we){we.width=we.value*de})}function fe(ce){Z.forEach(function(oe){oe.forEach(function(de){if(de.targetLinks.length){var we=((0,i.Sm)(de.targetLinks,s)/(0,i.Sm)(de.targetLinks,o)-c(de))*ce;de.y0+=we,de.y1+=we}})})}function te(ce){Z.slice().reverse().forEach(function(oe){oe.forEach(function(de){if(de.sourceLinks.length){var we=((0,i.Sm)(de.sourceLinks,b)/(0,i.Sm)(de.sourceLinks,o)-c(de))*ce;de.y0+=we,de.y1+=we}})})}function ne(){Z.forEach(function(ce){var oe,de,we=S,Se=ce.length,Te;for(ce.sort(a),Te=0;Te0&&(oe.y0+=de,oe.y1+=de),we=oe.y1+k;if(de=we-k-P,de>0)for(we=oe.y0-=de,oe.y1-=de,Te=Se-2;Te>=0;--Te)oe=ce[Te],de=oe.y1+k-we,de>0&&(oe.y0-=de,oe.y1-=de),we=oe.y0})}}function he($){$.nodes.forEach(function(Z){Z.sourceLinks.sort(u),Z.targetLinks.sort(n)}),$.nodes.forEach(function(Z){var K=Z.y0,Q=K;Z.sourceLinks.forEach(function(ae){ae.y0=K+ae.width/2,K+=ae.width}),Z.targetLinks.forEach(function(ae){ae.y1=Q+ae.width/2,Q+=ae.width})})}return W}var C=e(45879);function D(M){return[M.source.x1,M.y0]}function L(M){return[M.target.x0,M.y1]}function w(){return(0,C.h5)().source(D).target(L)}},39898:function(R,F,e){var i,m;(function(){var t={version:"3.8.0"},y=[].slice,p=function(ve){return y.call(ve)},l=self.document;function d(ve){return ve&&(ve.ownerDocument||ve.document||ve).documentElement}function r(ve){return ve&&(ve.ownerDocument&&ve.ownerDocument.defaultView||ve.document&&ve||ve.defaultView)}if(l)try{p(l.documentElement.childNodes)[0].nodeType}catch{p=function(Le){for(var Ge=Le.length,tt=new Array(Ge);Ge--;)tt[Ge]=Le[Ge];return tt}}if(Date.now||(Date.now=function(){return+new Date}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch{var n=this.Element.prototype,u=n.setAttribute,a=n.setAttributeNS,o=this.CSSStyleDeclaration.prototype,c=o.setProperty;n.setAttribute=function(Le,Ge){u.call(this,Le,Ge+"")},n.setAttributeNS=function(Le,Ge,tt){a.call(this,Le,Ge,tt+"")},o.setProperty=function(Le,Ge,tt){c.call(this,Le,Ge+"",tt)}}t.ascending=s;function s(ve,Le){return veLe?1:ve>=Le?0:NaN}t.descending=function(ve,Le){return Leve?1:Le>=ve?0:NaN},t.min=function(ve,Le){var Ge=-1,tt=ve.length,nt,it;if(arguments.length===1){for(;++Ge=it){nt=it;break}for(;++Geit&&(nt=it)}else{for(;++Ge=it){nt=it;break}for(;++Geit&&(nt=it)}return nt},t.max=function(ve,Le){var Ge=-1,tt=ve.length,nt,it;if(arguments.length===1){for(;++Ge=it){nt=it;break}for(;++Gent&&(nt=it)}else{for(;++Ge=it){nt=it;break}for(;++Gent&&(nt=it)}return nt},t.extent=function(ve,Le){var Ge=-1,tt=ve.length,nt,it,Nt;if(arguments.length===1){for(;++Ge=it){nt=Nt=it;break}for(;++Geit&&(nt=it),Nt=it){nt=Nt=it;break}for(;++Geit&&(nt=it),Nt1)return Nt/(Ht-1)},t.deviation=function(){var ve=t.variance.apply(this,arguments);return ve&&Math.sqrt(ve)};function A(ve){return{left:function(Le,Ge,tt,nt){for(arguments.length<3&&(tt=0),arguments.length<4&&(nt=Le.length);tt>>1;ve(Le[it],Ge)<0?tt=it+1:nt=it}return tt},right:function(Le,Ge,tt,nt){for(arguments.length<3&&(tt=0),arguments.length<4&&(nt=Le.length);tt>>1;ve(Le[it],Ge)>0?nt=it:tt=it+1}return tt}}}var v=A(s);t.bisectLeft=v.left,t.bisect=t.bisectRight=v.right,t.bisector=function(ve){return A(ve.length===1?function(Le,Ge){return s(ve(Le),Ge)}:ve)},t.shuffle=function(ve,Le,Ge){(tt=arguments.length)<3&&(Ge=ve.length,tt<2&&(Le=0));for(var tt=Ge-Le,nt,it;tt;)it=Math.random()*tt--|0,nt=ve[tt+Le],ve[tt+Le]=ve[it+Le],ve[it+Le]=nt;return ve},t.permute=function(ve,Le){for(var Ge=Le.length,tt=new Array(Ge);Ge--;)tt[Ge]=ve[Le[Ge]];return tt},t.pairs=function(ve){for(var Le=0,Ge=ve.length-1,tt=ve[0],nt=new Array(Ge<0?0:Ge);Le=0;)for(Nt=ve[Le],Ge=Nt.length;--Ge>=0;)it[--nt]=Nt[Ge];return it};var x=Math.abs;t.range=function(ve,Le,Ge){if(arguments.length<3&&(Ge=1,arguments.length<2&&(Le=ve,ve=0)),(Le-ve)/Ge===1/0)throw new Error("infinite range");var tt=[],nt=C(x(Ge)),it=-1,Nt;if(ve*=nt,Le*=nt,Ge*=nt,Ge<0)for(;(Nt=ve+Ge*++it)>Le;)tt.push(Nt/nt);else for(;(Nt=ve+Ge*++it)=Le.length)return nt?nt.call(ve,Ht):tt?Ht.sort(tt):Ht;for(var er=-1,Cr=Ht.length,Sr=Le[qt++],jr,tn,Rr,Hr=new L,Zr;++er=Le.length)return pt;var qt=[],er=Ge[Ht++];return pt.forEach(function(Cr,Sr){qt.push({key:Cr,values:Nt(Sr,Ht)})}),er?qt.sort(function(Cr,Sr){return er(Cr.key,Sr.key)}):qt}return ve.map=function(pt,Ht){return it(Ht,pt,0)},ve.entries=function(pt){return Nt(it(t.map,pt,0),0)},ve.key=function(pt){return Le.push(pt),ve},ve.sortKeys=function(pt){return Ge[Le.length-1]=pt,ve},ve.sortValues=function(pt){return tt=pt,ve},ve.rollup=function(pt){return nt=pt,ve},ve},t.set=function(ve){var Le=new z;if(ve)for(var Ge=0,tt=ve.length;Ge=0&&(tt=ve.slice(Ge+1),ve=ve.slice(0,Ge)),ve)return arguments.length<2?this[ve].on(tt):this[ve].on(tt,Le);if(arguments.length===2){if(Le==null)for(ve in this)this.hasOwnProperty(ve)&&this[ve].on(tt,null);return this}};function ie(ve){var Le=[],Ge=new L;function tt(){for(var nt=Le,it=-1,Nt=nt.length,pt;++it=0&&(Ge=ve.slice(0,Le))!=="xmlns"&&(ve=ve.slice(Le+1)),we.hasOwnProperty(Ge)?{space:we[Ge],local:ve}:ve}},ne.attr=function(ve,Le){if(arguments.length<2){if(typeof ve=="string"){var Ge=this.node();return ve=t.ns.qualify(ve),ve.local?Ge.getAttributeNS(ve.space,ve.local):Ge.getAttribute(ve)}for(Le in ve)this.each(Se(Le,ve[Le]));return this}return this.each(Se(ve,Le))};function Se(ve,Le){ve=t.ns.qualify(ve);function Ge(){this.removeAttribute(ve)}function tt(){this.removeAttributeNS(ve.space,ve.local)}function nt(){this.setAttribute(ve,Le)}function it(){this.setAttributeNS(ve.space,ve.local,Le)}function Nt(){var Ht=Le.apply(this,arguments);Ht==null?this.removeAttribute(ve):this.setAttribute(ve,Ht)}function pt(){var Ht=Le.apply(this,arguments);Ht==null?this.removeAttributeNS(ve.space,ve.local):this.setAttributeNS(ve.space,ve.local,Ht)}return Le==null?ve.local?tt:Ge:typeof Le=="function"?ve.local?pt:Nt:ve.local?it:nt}function Te(ve){return ve.trim().replace(/\s+/g," ")}ne.classed=function(ve,Le){if(arguments.length<2){if(typeof ve=="string"){var Ge=this.node(),tt=(ve=Ie(ve)).length,nt=-1;if(Le=Ge.classList){for(;++nt=0;)(it=Ge[tt])&&(nt&&nt!==it.nextSibling&&nt.parentNode.insertBefore(it,nt),nt=it);return this},ne.sort=function(ve){ve=Ve.apply(this,arguments);for(var Le=-1,Ge=this.length;++Le=Le&&(Le=nt+1);!(Ht=Nt[Le])&&++Le0&&(ve=ve.slice(0,nt));var Nt=Et.get(ve);Nt&&(ve=Nt,it=Ue);function pt(){var er=this[tt];er&&(this.removeEventListener(ve,er,er.$),delete this[tt])}function Ht(){var er=it(Le,p(arguments));pt.call(this),this.addEventListener(ve,this[tt]=er,er.$=Ge),er._=Le}function qt(){var er=new RegExp("^__on([^.]+)"+t.requote(ve)+"$"),Cr;for(var Sr in this)if(Cr=Sr.match(er)){var jr=this[Sr];this.removeEventListener(Cr[1],jr,jr.$),delete this[Sr]}}return nt?Le?Ht:pt:Le?q:qt}var Et=t.map({mouseenter:"mouseover",mouseleave:"mouseout"});l&&Et.forEach(function(ve){"on"+ve in l&&Et.remove(ve)});function et(ve,Le){return function(Ge){var tt=t.event;t.event=Ge,Le[0]=this.__data__;try{ve.apply(this,Le)}finally{t.event=tt}}}function Ue(ve,Le){var Ge=et(ve,Le);return function(tt){var nt=this,it=tt.relatedTarget;(!it||it!==nt&&!(it.compareDocumentPosition(nt)&8))&&Ge.call(nt,tt)}}var Be,rt=0;function ot(ve){var Le=".dragsuppress-"+ ++rt,Ge="click"+Le,tt=t.select(r(ve)).on("touchmove"+Le,le).on("dragstart"+Le,le).on("selectstart"+Le,le);if(Be==null&&(Be="onselectstart"in ve?!1:B(ve.style,"userSelect")),Be){var nt=d(ve).style,it=nt[Be];nt[Be]="none"}return function(Nt){if(tt.on(Le,null),Be&&(nt[Be]=it),Nt){var pt=function(){tt.on(Ge,null)};tt.on(Ge,function(){le(),pt()},!0),setTimeout(pt,0)}}}t.mouse=function(ve){return Oe(ve,he())};var qe=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Oe(ve,Le){Le.changedTouches&&(Le=Le.changedTouches[0]);var Ge=ve.ownerSVGElement||ve;if(Ge.createSVGPoint){var tt=Ge.createSVGPoint();if(qe<0){var nt=r(ve);if(nt.scrollX||nt.scrollY){Ge=t.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var it=Ge[0][0].getScreenCTM();qe=!(it.f||it.e),Ge.remove()}}return qe?(tt.x=Le.pageX,tt.y=Le.pageY):(tt.x=Le.clientX,tt.y=Le.clientY),tt=tt.matrixTransform(ve.getScreenCTM().inverse()),[tt.x,tt.y]}var Nt=ve.getBoundingClientRect();return[Le.clientX-Nt.left-ve.clientLeft,Le.clientY-Nt.top-ve.clientTop]}t.touch=function(ve,Le,Ge){if(arguments.length<3&&(Ge=Le,Le=he().changedTouches),Le){for(var tt=0,nt=Le.length,it;tt1?ct:ve<-1?-ct:Math.asin(ve)}function Ft(ve){return((ve=Math.exp(ve))-1/ve)/2}function tr(ve){return((ve=Math.exp(ve))+1/ve)/2}function lr(ve){return((ve=Math.exp(2*ve))-1)/(ve+1)}var Or=Math.SQRT2,xt=2,jt=4;t.interpolateZoom=function(ve,Le){var Ge=ve[0],tt=ve[1],nt=ve[2],it=Le[0],Nt=Le[1],pt=Le[2],Ht=it-Ge,qt=Nt-tt,er=Ht*Ht+qt*qt,Cr,Sr;if(er0&&(Un=Un.transition().duration(Nt)),Un.call(fn.event)}function Ma(){Hr&&Hr.domain(Rr.range().map(function(Un){return(Un-ve.x)/ve.k}).map(Rr.invert)),rn&&rn.domain(Zr.range().map(function(Un){return(Un-ve.y)/ve.k}).map(Zr.invert))}function Ta(Un){pt++||Un({type:"zoomstart"})}function Za(Un){Ma(),Un({type:"zoom",scale:ve.k,translate:[ve.x,ve.y]})}function Pa(Un){--pt||(Un({type:"zoomend"}),Ge=null)}function Va(){var Un=this,Ga=tn.of(Un,arguments),Ua=0,ri=t.select(r(Un)).on(qt,mo).on(er,Gi),ji=Xr(t.mouse(Un)),uo=ot(Un);Ot.call(Un),Ta(Ga);function mo(){Ua=1,Kn(t.mouse(Un),ji),Za(Ga)}function Gi(){ri.on(qt,null).on(er,null),uo(Ua),Pa(Ga)}}function fi(){var Un=this,Ga=tn.of(Un,arguments),Ua={},ri=0,ji,uo=".zoom-"+t.event.changedTouches[0].identifier,mo="touchmove"+uo,Gi="touchend"+uo,Pi=[],wa=t.select(Un),Da=ot(Un);vo(),Ta(Ga),wa.on(Ht,null).on(Sr,vo);function Wi(){var rs=t.touches(Un);return ji=ve.k,rs.forEach(function(Ji){Ji.identifier in Ua&&(Ua[Ji.identifier]=Xr(Ji))}),rs}function vo(){var rs=t.event.target;t.select(rs).on(mo,bs).on(Gi,Fo),Pi.push(rs);for(var Ji=t.event.changedTouches,Ds=0,zi=Ji.length;Ds1){var si=sl[0],Yi=sl[1],tv=si[0]-Yi[0],uh=si[1]-Yi[1];ri=tv*tv+uh*uh}}function bs(){var rs=t.touches(Un),Ji,Ds,zi,sl;Ot.call(Un);for(var Ls=0,si=rs.length;Ls1?1:Le,Ge=Ge<0?0:Ge>1?1:Ge,nt=Ge<=.5?Ge*(1+Le):Ge+Le-Ge*Le,tt=2*Ge-nt;function it(pt){return pt>360?pt-=360:pt<0&&(pt+=360),pt<60?tt+(nt-tt)*pt/60:pt<180?nt:pt<240?tt+(nt-tt)*(240-pt)/60:tt}function Nt(pt){return Math.round(it(pt)*255)}return new sr(Nt(ve+120),Nt(ve),Nt(ve-120))}t.hcl=Dt;function Dt(ve,Le,Ge){return this instanceof Dt?(this.h=+ve,this.c=+Le,void(this.l=+Ge)):arguments.length<2?ve instanceof Dt?new Dt(ve.h,ve.c,ve.l):ve instanceof Vt?It(ve.l,ve.a,ve.b):It((ve=Jr((ve=t.rgb(ve)).r,ve.g,ve.b)).l,ve.a,ve.b):new Dt(ve,Le,Ge)}var Mt=Dt.prototype=new ht;Mt.brighter=function(ve){return new Dt(this.h,this.c,Math.min(100,this.l+Kt*(arguments.length?ve:1)))},Mt.darker=function(ve){return new Dt(this.h,this.c,Math.max(0,this.l-Kt*(arguments.length?ve:1)))},Mt.rgb=function(){return zt(this.h,this.c,this.l).rgb()};function zt(ve,Le,Ge){return isNaN(ve)&&(ve=0),isNaN(Le)&&(Le=0),new Vt(Ge,Math.cos(ve*=bt)*Le,Math.sin(ve)*Le)}t.lab=Vt;function Vt(ve,Le,Ge){return this instanceof Vt?(this.l=+ve,this.a=+Le,void(this.b=+Ge)):arguments.length<2?ve instanceof Vt?new Vt(ve.l,ve.a,ve.b):ve instanceof Dt?zt(ve.h,ve.c,ve.l):Jr((ve=sr(ve)).r,ve.g,ve.b):new Vt(ve,Le,Ge)}var Kt=18,$t=.95047,ir=1,Mr=1.08883,Xe=Vt.prototype=new ht;Xe.brighter=function(ve){return new Vt(Math.min(100,this.l+Kt*(arguments.length?ve:1)),this.a,this.b)},Xe.darker=function(ve){return new Vt(Math.max(0,this.l-Kt*(arguments.length?ve:1)),this.a,this.b)},Xe.rgb=function(){return je(this.l,this.a,this.b)};function je(ve,Le,Ge){var tt=(ve+16)/116,nt=tt+Le/500,it=tt-Ge/200;return nt=_t(nt)*$t,tt=_t(tt)*ir,it=_t(it)*Mr,new sr(rr(3.2404542*nt-1.5371385*tt-.4985314*it),rr(-.969266*nt+1.8760108*tt+.041556*it),rr(.0556434*nt-.2040259*tt+1.0572252*it))}function It(ve,Le,Ge){return ve>0?new Dt(Math.atan2(Ge,Le)*Lt,Math.sqrt(Le*Le+Ge*Ge),ve):new Dt(NaN,NaN,ve)}function _t(ve){return ve>.206893034?ve*ve*ve:(ve-.13793103448275862)/7.787037}function Zt(ve){return ve>.008856?Math.pow(ve,.3333333333333333):7.787037*ve+.13793103448275862}function rr(ve){return Math.round(255*(ve<=.00304?12.92*ve:1.055*Math.pow(ve,.4166666666666667)-.055))}t.rgb=sr;function sr(ve,Le,Ge){return this instanceof sr?(this.r=~~ve,this.g=~~Le,void(this.b=~~Ge)):arguments.length<2?ve instanceof sr?new sr(ve.r,ve.g,ve.b):wr(""+ve,sr,St):new sr(ve,Le,Ge)}function nr(ve){return new sr(ve>>16,ve>>8&255,ve&255)}function Bt(ve){return nr(ve)+""}var hr=sr.prototype=new ht;hr.brighter=function(ve){ve=Math.pow(.7,arguments.length?ve:1);var Le=this.r,Ge=this.g,tt=this.b,nt=30;return!Le&&!Ge&&!tt?new sr(nt,nt,nt):(Le&&Le>4,tt=tt>>4|tt,nt=Ht&240,nt=nt>>4|nt,it=Ht&15,it=it<<4|it):ve.length===7&&(tt=(Ht&16711680)>>16,nt=(Ht&65280)>>8,it=Ht&255)),Le(tt,nt,it))}function vr(ve,Le,Ge){var tt=Math.min(ve/=255,Le/=255,Ge/=255),nt=Math.max(ve,Le,Ge),it=nt-tt,Nt,pt,Ht=(nt+tt)/2;return it?(pt=Ht<.5?it/(nt+tt):it/(2-nt-tt),ve==nt?Nt=(Le-Ge)/it+(Le0&&Ht<1?0:Nt),new ut(Nt,pt,Ht)}function Jr(ve,Le,Ge){ve=_r(ve),Le=_r(Le),Ge=_r(Ge);var tt=Zt((.4124564*ve+.3575761*Le+.1804375*Ge)/$t),nt=Zt((.2126729*ve+.7151522*Le+.072175*Ge)/ir),it=Zt((.0193339*ve+.119192*Le+.9503041*Ge)/Mr);return Vt(116*nt-16,500*(tt-nt),200*(nt-it))}function _r(ve){return(ve/=255)<=.04045?ve/12.92:Math.pow((ve+.055)/1.055,2.4)}function Br(ve){var Le=parseFloat(ve);return ve.charAt(ve.length-1)==="%"?Math.round(Le*2.55):Le}var wn=t.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});wn.forEach(function(ve,Le){wn.set(ve,nr(Le))});function Kr(ve){return typeof ve=="function"?ve:function(){return ve}}t.functor=Kr,t.xhr=Fn(U);function Fn(ve){return function(Le,Ge,tt){return arguments.length===2&&typeof Ge=="function"&&(tt=Ge,Ge=null),In(Le,Ge,ve,tt)}}function In(ve,Le,Ge,tt){var nt={},it=t.dispatch("beforesend","progress","load","error"),Nt={},pt=new XMLHttpRequest,Ht=null;self.XDomainRequest&&!("withCredentials"in pt)&&/^(http(s)?:)?\/\//.test(ve)&&(pt=new XDomainRequest),"onload"in pt?pt.onload=pt.onerror=qt:pt.onreadystatechange=function(){pt.readyState>3&&qt()};function qt(){var er=pt.status,Cr;if(!er&&cr(pt)||er>=200&&er<300||er===304){try{Cr=Ge.call(nt,pt)}catch(Sr){it.error.call(nt,Sr);return}it.load.call(nt,Cr)}else it.error.call(nt,pt)}return pt.onprogress=function(er){var Cr=t.event;t.event=er;try{it.progress.call(nt,pt)}finally{t.event=Cr}},nt.header=function(er,Cr){return er=(er+"").toLowerCase(),arguments.length<2?Nt[er]:(Cr==null?delete Nt[er]:Nt[er]=Cr+"",nt)},nt.mimeType=function(er){return arguments.length?(Le=er==null?null:er+"",nt):Le},nt.responseType=function(er){return arguments.length?(Ht=er,nt):Ht},nt.response=function(er){return Ge=er,nt},["get","post"].forEach(function(er){nt[er]=function(){return nt.send.apply(nt,[er].concat(p(arguments)))}}),nt.send=function(er,Cr,Sr){if(arguments.length===2&&typeof Cr=="function"&&(Sr=Cr,Cr=null),pt.open(er,ve,!0),Le!=null&&!("accept"in Nt)&&(Nt.accept=Le+",*/*"),pt.setRequestHeader)for(var jr in Nt)pt.setRequestHeader(jr,Nt[jr]);return Le!=null&&pt.overrideMimeType&&pt.overrideMimeType(Le),Ht!=null&&(pt.responseType=Ht),Sr!=null&&nt.on("error",Sr).on("load",function(tn){Sr(null,tn)}),it.beforesend.call(nt,pt),pt.send(Cr==null?null:Cr),nt},nt.abort=function(){return pt.abort(),nt},t.rebind(nt,it,"on"),tt==null?nt:nt.get(mr(tt))}function mr(ve){return ve.length===1?function(Le,Ge){ve(Le==null?Ge:null)}:ve}function cr(ve){var Le=ve.responseType;return Le&&Le!=="text"?ve.response:ve.responseText}t.dsv=function(ve,Le){var Ge=new RegExp('["'+ve+` +]`),tt=ve.charCodeAt(0);function nt(qt,er,Cr){arguments.length<3&&(Cr=er,er=null);var Sr=In(qt,Le,er==null?it:Nt(er),Cr);return Sr.row=function(jr){return arguments.length?Sr.response((er=jr)==null?it:Nt(jr)):er},Sr}function it(qt){return nt.parse(qt.responseText)}function Nt(qt){return function(er){return nt.parse(er.responseText,qt)}}nt.parse=function(qt,er){var Cr;return nt.parseRows(qt,function(Sr,jr){if(Cr)return Cr(Sr,jr-1);var tn=function(Rr){for(var Hr={},Zr=Sr.length,rn=0;rn=tn)return Sr;if(rn)return rn=!1,Cr;var Bn=Rr;if(qt.charCodeAt(Bn)===34){for(var Wn=Bn;Wn++24?(isFinite(Le)&&(clearTimeout(xn),xn=setTimeout(_n,Le)),un=0):(un=1,An(_n))}t.timer.flush=function(){Qn(),sa()};function Qn(){for(var ve=Date.now(),Le=zr;Le;)ve>=Le.t&&Le.c(ve-Le.t)&&(Le.c=null),Le=Le.n;return ve}function sa(){for(var ve,Le=zr,Ge=1/0;Le;)Le.c?(Le.t=0;--pt)Rr.push(nt[qt[Cr[pt]][2]]);for(pt=+jr;pt1&&Ut(ve[Ge[tt-2]],ve[Ge[tt-1]],ve[nt])<=0;)--tt;Ge[tt++]=nt}return Ge.slice(0,tt)}function Nr(ve,Le){return ve[0]-Le[0]||ve[1]-Le[1]}t.geom.polygon=function(ve){return K(ve,sn),ve};var sn=t.geom.polygon.prototype=[];sn.area=function(){for(var ve=-1,Le=this.length,Ge,tt=this[Le-1],nt=0;++vepe)pt=pt.L;else if(Nt=Le-cn(pt,Ge),Nt>pe){if(!pt.R){tt=pt;break}pt=pt.R}else{it>-pe?(tt=pt.P,nt=pt):Nt>-pe?(tt=pt,nt=pt.N):tt=nt=pt;break}var Ht=on(ve);if(Gn.insert(tt,Ht),!(!tt&&!nt)){if(tt===nt){Yn(tt),nt=on(tt.site),Gn.insert(Ht,nt),Ht.edge=nt.edge=la(tt.site,Ht.site),On(tt),On(nt);return}if(!nt){Ht.edge=la(tt.site,Ht.site);return}Yn(tt),Yn(nt);var qt=tt.site,er=qt.x,Cr=qt.y,Sr=ve.x-er,jr=ve.y-Cr,tn=nt.site,Rr=tn.x-er,Hr=tn.y-Cr,Zr=2*(Sr*Hr-jr*Rr),rn=Sr*Sr+jr*jr,fn=Rr*Rr+Hr*Hr,Xr={x:(Hr*rn-jr*fn)/Zr+er,y:(Sr*fn-Rr*rn)/Zr+Cr};ya(nt.edge,qt,tn,Xr),Ht.edge=la(qt,ve,null,Xr),nt.edge=la(ve,tn,null,Xr),On(tt),On(nt)}}function Mn(ve,Le){var Ge=ve.site,tt=Ge.x,nt=Ge.y,it=nt-Le;if(!it)return tt;var Nt=ve.P;if(!Nt)return-1/0;Ge=Nt.site;var pt=Ge.x,Ht=Ge.y,qt=Ht-Le;if(!qt)return pt;var er=pt-tt,Cr=1/it-1/qt,Sr=er/qt;return Cr?(-Sr+Math.sqrt(Sr*Sr-2*Cr*(er*er/(-2*qt)-Ht+qt/2+nt-it/2)))/Cr+tt:(tt+pt)/2}function cn(ve,Le){var Ge=ve.N;if(Ge)return Mn(Ge,Le);var tt=ve.site;return tt.y===Le?tt.x:1/0}function Pr(ve){this.site=ve,this.edges=[]}Pr.prototype.prepare=function(){for(var ve=this.edges,Le=ve.length,Ge;Le--;)Ge=ve[Le].edge,(!Ge.b||!Ge.a)&&ve.splice(Le,1);return ve.sort(Ir),ve.length};function Er(ve){for(var Le=ve[0][0],Ge=ve[1][0],tt=ve[0][1],nt=ve[1][1],it,Nt,pt,Ht,qt=Ln,er=qt.length,Cr,Sr,jr,tn,Rr,Hr;er--;)if(Cr=qt[er],!(!Cr||!Cr.prepare()))for(jr=Cr.edges,tn=jr.length,Sr=0;Srpe||x(Ht-Nt)>pe)&&(jr.splice(Sr,0,new Po(ua(Cr.site,Hr,x(pt-Le)pe?{x:Le,y:x(it-Le)pe?{x:x(Nt-nt)pe?{x:Ge,y:x(it-Ge)pe?{x:x(Nt-tt)=-be)){var Sr=Ht*Ht+qt*qt,jr=er*er+Hr*Hr,tn=(Hr*Sr-qt*jr)/Cr,Rr=(Ht*jr-er*Sr)/Cr,Hr=Rr+pt,Zr=Xt.pop()||new dn;Zr.arc=ve,Zr.site=nt,Zr.x=tn+Nt,Zr.y=Hr+Math.sqrt(tn*tn+Rr*Rr),Zr.cy=Hr,ve.circle=Zr;for(var rn=null,fn=ai._;fn;)if(Zr.y0)){if(Rr/=jr,jr<0){if(Rr0){if(Rr>Sr)return;Rr>Cr&&(Cr=Rr)}if(Rr=Ge-pt,!(!jr&&Rr<0)){if(Rr/=jr,jr<0){if(Rr>Sr)return;Rr>Cr&&(Cr=Rr)}else if(jr>0){if(Rr0)){if(Rr/=tn,tn<0){if(Rr0){if(Rr>Sr)return;Rr>Cr&&(Cr=Rr)}if(Rr=tt-Ht,!(!tn&&Rr<0)){if(Rr/=tn,tn<0){if(Rr>Sr)return;Rr>Cr&&(Cr=Rr)}else if(tn>0){if(Rr0&&(nt.a={x:pt+Cr*jr,y:Ht+Cr*tn}),Sr<1&&(nt.b={x:pt+Sr*jr,y:Ht+Sr*tn}),nt}}}}}}function kn(ve){for(var Le=Dn,Ge=gn(ve[0][0],ve[0][1],ve[1][0],ve[1][1]),tt=Le.length,nt;tt--;)nt=Le[tt],(!ea(nt,ve)||!Ge(nt)||x(nt.a.x-nt.b.x)=it)return;if(er>Sr){if(!tt)tt={x:tn,y:Nt};else if(tt.y>=pt)return;Ge={x:tn,y:pt}}else{if(!tt)tt={x:tn,y:pt};else if(tt.y1)if(er>Sr){if(!tt)tt={x:(Nt-Zr)/Hr,y:Nt};else if(tt.y>=pt)return;Ge={x:(pt-Zr)/Hr,y:pt}}else{if(!tt)tt={x:(pt-Zr)/Hr,y:pt};else if(tt.y=it)return;Ge={x:it,y:Hr*it+Zr}}else{if(!tt)tt={x:it,y:Hr*it+Zr};else if(tt.x=er&&Zr.x<=Sr&&Zr.y>=Cr&&Zr.y<=jr?[[er,jr],[Sr,jr],[Sr,Cr],[er,Cr]]:[];rn.point=Ht[Rr]}),qt}function pt(Ht){return Ht.map(function(qt,er){return{x:Math.round(tt(qt,er)/pe)*pe,y:Math.round(nt(qt,er)/pe)*pe,i:er}})}return Nt.links=function(Ht){return pi(pt(Ht)).edges.filter(function(qt){return qt.l&&qt.r}).map(function(qt){return{source:Ht[qt.l.i],target:Ht[qt.r.i]}})},Nt.triangles=function(Ht){var qt=[];return pi(pt(Ht)).cells.forEach(function(er,Cr){for(var Sr=er.site,jr=er.edges.sort(Ir),tn=-1,Rr=jr.length,Hr,Zr=jr[Rr-1].edge,rn=Zr.l===Sr?Zr.r:Zr.l;++tnfn&&(fn=er.x),er.y>Xr&&(Xr=er.y),jr.push(er.x),tn.push(er.y);else for(Rr=0;Rrfn&&(fn=Bn),Wn>Xr&&(Xr=Wn),jr.push(Bn),tn.push(Wn)}var Kn=fn-Zr,ia=Xr-rn;Kn>ia?Xr=rn+Kn:fn=Zr+ia;function Ma(Pa,Va,fi,gi,Di,Un,Ga,Ua){if(!(isNaN(fi)||isNaN(gi)))if(Pa.leaf){var ri=Pa.x,ji=Pa.y;if(ri!=null)if(x(ri-fi)+x(ji-gi)<.01)Ta(Pa,Va,fi,gi,Di,Un,Ga,Ua);else{var uo=Pa.point;Pa.x=Pa.y=Pa.point=null,Ta(Pa,uo,ri,ji,Di,Un,Ga,Ua),Ta(Pa,Va,fi,gi,Di,Un,Ga,Ua)}else Pa.x=fi,Pa.y=gi,Pa.point=Va}else Ta(Pa,Va,fi,gi,Di,Un,Ga,Ua)}function Ta(Pa,Va,fi,gi,Di,Un,Ga,Ua){var ri=(Di+Ga)*.5,ji=(Un+Ua)*.5,uo=fi>=ri,mo=gi>=ji,Gi=mo<<1|uo;Pa.leaf=!1,Pa=Pa.nodes[Gi]||(Pa.nodes[Gi]=pf()),uo?Di=ri:Ga=ri,mo?Un=ji:Ua=ji,Ma(Pa,Va,fi,gi,Di,Un,Ga,Ua)}var Za=pf();if(Za.add=function(Pa){Ma(Za,Pa,+Cr(Pa,++Rr),+Sr(Pa,Rr),Zr,rn,fn,Xr)},Za.visit=function(Pa){eo(Pa,Za,Zr,rn,fn,Xr)},Za.find=function(Pa){return gf(Za,Pa[0],Pa[1],Zr,rn,fn,Xr)},Rr=-1,Le==null){for(;++Rrit||Sr>Nt||jr=Bn,ia=Ge>=Wn,Ma=ia<<1|Kn,Ta=Ma+4;MaGe&&(it=Le.slice(Ge,it),pt[Nt]?pt[Nt]+=it:pt[++Nt]=it),(tt=tt[0])===(nt=nt[0])?pt[Nt]?pt[Nt]+=nt:pt[++Nt]=nt:(pt[++Nt]=null,Ht.push({i:Nt,x:ys(tt,nt)})),Ge=el.lastIndex;return Ge=0&&!(tt=t.interpolators[Ge](ve,Le)););return tt}t.interpolators=[function(ve,Le){var Ge=typeof Le;return(Ge==="string"?wn.has(Le.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Le)?ms:jo:Le instanceof ht?ms:Array.isArray(Le)?Oo:Ge==="object"&&isNaN(Le)?So:ys)(ve,Le)}],t.interpolateArray=Oo;function Oo(ve,Le){var Ge=[],tt=[],nt=ve.length,it=Le.length,Nt=Math.min(ve.length,Le.length),pt;for(pt=0;pt=0?ve.slice(0,Le):ve,tt=Le>=0?ve.slice(Le+1):"in";return Ge=tl.get(Ge)||kh,tt=zo.get(tt)||U,Uc(tt(Ge.apply(null,y.call(arguments,1))))};function Uc(ve){return function(Le){return Le<=0?0:Le>=1?1:ve(Le)}}function Ml(ve){return function(Le){return 1-ve(1-Le)}}function rl(ve){return function(Le){return .5*(Le<.5?ve(2*Le):2-ve(2-2*Le))}}function Hc(ve){return ve*ve}function Vc(ve){return ve*ve*ve}function jv(ve){if(ve<=0)return 0;if(ve>=1)return 1;var Le=ve*ve,Ge=Le*ve;return 4*(ve<.5?Ge:3*(ve-Le)+Ge-.75)}function mf(ve){return function(Le){return Math.pow(Le,ve)}}function $v(ve){return 1-Math.cos(ve*ct)}function Kv(ve){return Math.pow(2,10*(ve-1))}function Jv(ve){return 1-Math.sqrt(1-ve*ve)}function Gc(ve,Le){var Ge;return arguments.length<2&&(Le=.45),arguments.length?Ge=Le/He*Math.asin(1/ve):(ve=1,Ge=Le/4),function(tt){return 1+ve*Math.pow(2,-10*tt)*Math.sin((tt-Ge)*He/Le)}}function Qv(ve){return ve||(ve=1.70158),function(Le){return Le*Le*((ve+1)*Le-ve)}}function qv(ve){return ve<.36363636363636365?7.5625*ve*ve:ve<.7272727272727273?7.5625*(ve-=.5454545454545454)*ve+.75:ve<.9090909090909091?7.5625*(ve-=.8181818181818182)*ve+.9375:7.5625*(ve-=.9545454545454546)*ve+.984375}t.interpolateHcl=Bh;function Bh(ve,Le){ve=t.hcl(ve),Le=t.hcl(Le);var Ge=ve.h,tt=ve.c,nt=ve.l,it=Le.h-Ge,Nt=Le.c-tt,pt=Le.l-nt;return isNaN(Nt)&&(Nt=0,tt=isNaN(tt)?Le.c:tt),isNaN(it)?(it=0,Ge=isNaN(Ge)?Le.h:Ge):it>180?it-=360:it<-180&&(it+=360),function(Ht){return zt(Ge+it*Ht,tt+Nt*Ht,nt+pt*Ht)+""}}t.interpolateHsl=ed;function ed(ve,Le){ve=t.hsl(ve),Le=t.hsl(Le);var Ge=ve.h,tt=ve.s,nt=ve.l,it=Le.h-Ge,Nt=Le.s-tt,pt=Le.l-nt;return isNaN(Nt)&&(Nt=0,tt=isNaN(tt)?Le.s:tt),isNaN(it)?(it=0,Ge=isNaN(Ge)?Le.h:Ge):it>180?it-=360:it<-180&&(it+=360),function(Ht){return St(Ge+it*Ht,tt+Nt*Ht,nt+pt*Ht)+""}}t.interpolateLab=td;function td(ve,Le){ve=t.lab(ve),Le=t.lab(Le);var Ge=ve.l,tt=ve.a,nt=ve.b,it=Le.l-Ge,Nt=Le.a-tt,pt=Le.b-nt;return function(Ht){return je(Ge+it*Ht,tt+Nt*Ht,nt+pt*Ht)+""}}t.interpolateRound=Wc;function Wc(ve,Le){return Le-=ve,function(Ge){return Math.round(ve+Le*Ge)}}t.transform=function(ve){var Le=l.createElementNS(t.ns.prefix.svg,"g");return(t.transform=function(Ge){if(Ge!=null){Le.setAttribute("transform",Ge);var tt=Le.transform.baseVal.consolidate()}return new fu(tt?tt.matrix:rd)})(ve)};function fu(ve){var Le=[ve.a,ve.b],Ge=[ve.c,ve.d],tt=Iu(Le),nt=cu(Le,Ge),it=Iu(tc(Ge,Le,-nt))||0;Le[0]*Ge[1]180?Le+=360:Le-ve>180&&(ve+=360),tt.push({i:Ge.push(Sl(Ge)+"rotate(",null,")")-2,x:ys(ve,Le)})):Le&&Ge.push(Sl(Ge)+"rotate("+Le+")")}function nd(ve,Le,Ge,tt){ve!==Le?tt.push({i:Ge.push(Sl(Ge)+"skewX(",null,")")-2,x:ys(ve,Le)}):Le&&Ge.push(Sl(Ge)+"skewX("+Le+")")}function Cs(ve,Le,Ge,tt){if(ve[0]!==Le[0]||ve[1]!==Le[1]){var nt=Ge.push(Sl(Ge)+"scale(",null,",",null,")");tt.push({i:nt-4,x:ys(ve[0],Le[0])},{i:nt-2,x:ys(ve[1],Le[1])})}else(Le[0]!==1||Le[1]!==1)&&Ge.push(Sl(Ge)+"scale("+Le+")")}function hu(ve,Le){var Ge=[],tt=[];return ve=t.transform(ve),Le=t.transform(Le),Uh(ve.translate,Le.translate,Ge,tt),Yc(ve.rotate,Le.rotate,Ge,tt),nd(ve.skew,Le.skew,Ge,tt),Cs(ve.scale,Le.scale,Ge,tt),ve=Le=null,function(nt){for(var it=-1,Nt=tt.length,pt;++it0?it=Xr:(Ge.c=null,Ge.t=NaN,Ge=null,Le.end({type:"end",alpha:it=0})):Xr>0&&(Le.start({type:"start",alpha:it=Xr}),Ge=bn(ve.tick)),ve):it},ve.start=function(){var Xr,Bn=jr.length,Wn=tn.length,Kn=tt[0],ia=tt[1],Ma,Ta;for(Xr=0;Xr=0;)it.push(er=qt[Ht]),er.parent=pt,er.depth=pt.depth+1;Ge&&(pt.value=0),pt.children=qt}else Ge&&(pt.value=+Ge.call(tt,pt,pt.depth)||0),delete pt.children;return Ro(nt,function(Cr){var Sr,jr;ve&&(Sr=Cr.children)&&Sr.sort(ve),Ge&&(jr=Cr.parent)&&(jr.value+=Cr.value)}),Nt}return tt.sort=function(nt){return arguments.length?(ve=nt,tt):ve},tt.children=function(nt){return arguments.length?(Le=nt,tt):Le},tt.value=function(nt){return arguments.length?(Ge=nt,tt):Ge},tt.revalue=function(nt){return Ge&&(Bu(nt,function(it){it.children&&(it.value=0)}),Ro(nt,function(it){var Nt;it.children||(it.value=+Ge.call(tt,it,it.depth)||0),(Nt=it.parent)&&(Nt.value+=it.value)})),nt},tt};function ku(ve,Le){return t.rebind(ve,Le,"sort","children","value"),ve.nodes=ve,ve.links=id,ve}function Bu(ve,Le){for(var Ge=[ve];(ve=Ge.pop())!=null;)if(Le(ve),(nt=ve.children)&&(tt=nt.length))for(var tt,nt;--tt>=0;)Ge.push(nt[tt])}function Ro(ve,Le){for(var Ge=[ve],tt=[];(ve=Ge.pop())!=null;)if(tt.push(ve),(Nt=ve.children)&&(it=Nt.length))for(var nt=-1,it,Nt;++ntnt&&(nt=pt),tt.push(pt)}for(Nt=0;Nttt&&(Ge=Le,tt=nt);return Ge}function Gh(ve){return ve.reduce(ks,0)}function ks(ve,Le){return ve+Le[1]}t.layout.histogram=function(){var ve=!0,Le=Number,Ge=qc,tt=Uu;function nt(it,Sr){for(var pt=[],Ht=it.map(Le,this),qt=Ge.call(this,Ht,Sr),er=tt.call(this,qt,Ht,Sr),Cr,Sr=-1,jr=Ht.length,tn=er.length-1,Rr=ve?1:1/jr,Hr;++Sr0)for(Sr=-1;++Sr=qt[0]&&Hr<=qt[1]&&(Cr=pt[t.bisect(er,Hr,1,tn)-1],Cr.y+=Rr,Cr.push(it[Sr]));return pt}return nt.value=function(it){return arguments.length?(Le=it,nt):Le},nt.range=function(it){return arguments.length?(Ge=Kr(it),nt):Ge},nt.bins=function(it){return arguments.length?(tt=typeof it=="number"?function(Nt){return vu(Nt,it)}:Kr(it),nt):tt},nt.frequency=function(it){return arguments.length?(ve=!!it,nt):ve},nt};function Uu(ve,Le){return vu(ve,Math.ceil(Math.log(Le.length)/Math.LN2+1))}function vu(ve,Le){for(var Ge=-1,tt=+ve[0],nt=(ve[1]-tt)/Le,it=[];++Ge<=Le;)it[Ge]=nt*Ge+tt;return it}function qc(ve){return[t.min(ve),t.max(ve)]}t.layout.pack=function(){var ve=t.layout.hierarchy().sort(co),Le=0,Ge=[1,1],tt;function nt(it,Nt){var pt=ve.call(this,it,Nt),Ht=pt[0],qt=Ge[0],er=Ge[1],Cr=tt==null?Math.sqrt:typeof tt=="function"?tt:function(){return tt};if(Ht.x=Ht.y=0,Ro(Ht,function(jr){jr.r=+Cr(jr.value)}),Ro(Ht,Dl),Le){var Sr=Le*(tt?1:Math.max(2*Ht.r/qt,2*Ht.r/er))/2;Ro(Ht,function(jr){jr.r+=Sr}),Ro(Ht,Dl),Ro(Ht,function(jr){jr.r-=Sr})}return Xl(Ht,qt/2,er/2,tt?1:1/Math.max(2*Ht.r/qt,2*Ht.r/er)),pt}return nt.size=function(it){return arguments.length?(Ge=it,nt):Ge},nt.radius=function(it){return arguments.length?(tt=it==null||typeof it=="function"?it:+it,nt):tt},nt.padding=function(it){return arguments.length?(Le=+it,nt):Le},ku(nt,ve)};function co(ve,Le){return ve.value-Le.value}function wf(ve,Le){var Ge=ve._pack_next;ve._pack_next=Le,Le._pack_prev=ve,Le._pack_next=Ge,Ge._pack_prev=Le}function us(ve,Le){ve._pack_next=Le,Le._pack_prev=ve}function Cl(ve,Le){var Ge=Le.x-ve.x,tt=Le.y-ve.y,nt=ve.r+Le.r;return .999*nt*nt>Ge*Ge+tt*tt}function Dl(ve){if(!(Le=ve.children)||!(Sr=Le.length))return;var Le,Ge=1/0,tt=-1/0,nt=1/0,it=-1/0,Nt,pt,Ht,qt,er,Cr,Sr;function jr(Xr){Ge=Math.min(Xr.x-Xr.r,Ge),tt=Math.max(Xr.x+Xr.r,tt),nt=Math.min(Xr.y-Xr.r,nt),it=Math.max(Xr.y+Xr.r,it)}if(Le.forEach(Yl),Nt=Le[0],Nt.x=-Nt.r,Nt.y=0,jr(Nt),Sr>1&&(pt=Le[1],pt.x=pt.r,pt.y=0,jr(pt),Sr>2))for(Ht=Le[2],Bs(Nt,pt,Ht),jr(Ht),wf(Nt,Ht),Nt._pack_prev=Ht,wf(Ht,pt),pt=Nt._pack_next,qt=3;qtHr.x&&(Hr=Bn),Bn.depth>Zr.depth&&(Zr=Bn)});var rn=Le(Rr,Hr)/2-Rr.x,fn=Ge[0]/(Hr.x+Le(Hr,Rr)/2+rn),Xr=Ge[1]/(Zr.depth||1);Bu(jr,function(Bn){Bn.x=(Bn.x+rn)*fn,Bn.y=Bn.depth*Xr})}return Sr}function it(er){for(var Cr={A:null,children:[er]},Sr=[Cr],jr;(jr=Sr.pop())!=null;)for(var tn=jr.children,Rr,Hr=0,Zr=tn.length;Hr0&&(oc(sd(Rr,er,Sr),er,Bn),Zr+=Bn,rn+=Bn),fn+=Rr.m,Zr+=jr.m,Xr+=Hr.m,rn+=tn.m;Rr&&!Tf(tn)&&(tn.t=Rr,tn.m+=fn-rn),jr&&!Af(Hr)&&(Hr.t=jr,Hr.m+=Zr-Xr,Sr=er)}return Sr}function qt(er){er.x*=Ge[0],er.y=er.depth*Ge[1]}return nt.separation=function(er){return arguments.length?(Le=er,nt):Le},nt.size=function(er){return arguments.length?(tt=(Ge=er)==null?qt:null,nt):tt?null:Ge},nt.nodeSize=function(er){return arguments.length?(tt=(Ge=er)==null?null:qt,nt):tt?Ge:null},ku(nt,ve)};function al(ve,Le){return ve.parent==Le.parent?1:2}function Af(ve){var Le=ve.children;return Le.length?Le[0]:ve.t}function Tf(ve){var Le=ve.children,Ge;return(Ge=Le.length)?Le[Ge-1]:ve.t}function oc(ve,Le,Ge){var tt=Ge/(Le.i-ve.i);Le.c-=tt,Le.s+=Ge,ve.c+=tt,Le.z+=Ge,Le.m+=Ge}function od(ve){for(var Le=0,Ge=0,tt=ve.children,nt=tt.length,it;--nt>=0;)it=tt[nt],it.z+=Le,it.m+=Le,Le+=it.s+(Ge+=it.c)}function sd(ve,Le,Ge){return ve.a.parent===Le.parent?ve.a:Ge}t.layout.cluster=function(){var ve=t.layout.hierarchy().sort(null).value(null),Le=al,Ge=[1,1],tt=!1;function nt(it,Nt){var pt=ve.call(this,it,Nt),Ht=pt[0],qt,er=0;Ro(Ht,function(Rr){var Hr=Rr.children;Hr&&Hr.length?(Rr.x=ud(Hr),Rr.y=ld(Hr)):(Rr.x=qt?er+=Le(Rr,qt):0,Rr.y=0,qt=Rr)});var Cr=sc(Ht),Sr=Wh(Ht),jr=Cr.x-Le(Cr,Sr)/2,tn=Sr.x+Le(Sr,Cr)/2;return Ro(Ht,tt?function(Rr){Rr.x=(Rr.x-Ht.x)*Ge[0],Rr.y=(Ht.y-Rr.y)*Ge[1]}:function(Rr){Rr.x=(Rr.x-jr)/(tn-jr)*Ge[0],Rr.y=(1-(Ht.y?Rr.y/Ht.y:1))*Ge[1]}),pt}return nt.separation=function(it){return arguments.length?(Le=it,nt):Le},nt.size=function(it){return arguments.length?(tt=(Ge=it)==null,nt):tt?null:Ge},nt.nodeSize=function(it){return arguments.length?(tt=(Ge=it)!=null,nt):tt?Ge:null},ku(nt,ve)};function ld(ve){return 1+t.max(ve,function(Le){return Le.y})}function ud(ve){return ve.reduce(function(Le,Ge){return Le+Ge.x},0)/ve.length}function sc(ve){var Le=ve.children;return Le&&Le.length?sc(Le[0]):ve}function Wh(ve){var Le=ve.children,Ge;return Le&&(Ge=Le.length)?Wh(Le[Ge-1]):ve}t.layout.treemap=function(){var ve=t.layout.hierarchy(),Le=Math.round,Ge=[1,1],tt=null,nt=Hu,it=!1,Nt,pt="squarify",Ht=.5*(1+Math.sqrt(5));function qt(Rr,Hr){for(var Zr=-1,rn=Rr.length,fn,Xr;++Zr0;)rn.push(Xr=fn[ia-1]),rn.area+=Xr.area,pt!=="squarify"||(Wn=Sr(rn,Kn))<=Bn?(fn.pop(),Bn=Wn):(rn.area-=rn.pop().area,jr(rn,Kn,Zr,!1),Kn=Math.min(Zr.dx,Zr.dy),rn.length=rn.area=0,Bn=1/0);rn.length&&(jr(rn,Kn,Zr,!0),rn.length=rn.area=0),Hr.forEach(er)}}function Cr(Rr){var Hr=Rr.children;if(Hr&&Hr.length){var Zr=nt(Rr),rn=Hr.slice(),fn,Xr=[];for(qt(rn,Zr.dx*Zr.dy/Rr.value),Xr.area=0;fn=rn.pop();)Xr.push(fn),Xr.area+=fn.area,fn.z!=null&&(jr(Xr,fn.z?Zr.dx:Zr.dy,Zr,!rn.length),Xr.length=Xr.area=0);Hr.forEach(Cr)}}function Sr(Rr,Hr){for(var Zr=Rr.area,rn,fn=0,Xr=1/0,Bn=-1,Wn=Rr.length;++Bnfn&&(fn=rn));return Zr*=Zr,Hr*=Hr,Zr?Math.max(Hr*fn*Ht/Zr,Zr/(Hr*Xr*Ht)):1/0}function jr(Rr,Hr,Zr,rn){var fn=-1,Xr=Rr.length,Bn=Zr.x,Wn=Zr.y,Kn=Hr?Le(Rr.area/Hr):0,ia;if(Hr==Zr.dx){for((rn||Kn>Zr.dy)&&(Kn=Zr.dy);++fnZr.dx)&&(Kn=Zr.dx);++fn1);return ve+Le*tt*Math.sqrt(-2*Math.log(it)/it)}},logNormal:function(){var ve=t.random.normal.apply(t,arguments);return function(){return Math.exp(ve())}},bates:function(ve){var Le=t.random.irwinHall(ve);return function(){return Le()/ve}},irwinHall:function(ve){return function(){for(var Le=0,Ge=0;Ge2?Yh:du,qt=tt?_u:yf;return nt=Ht(ve,Le,qt,Ge),it=Ht(Le,ve,qt,Tl),pt}function pt(Ht){return nt(Ht)}return pt.invert=function(Ht){return it(Ht)},pt.domain=function(Ht){return arguments.length?(ve=Ht.map(Number),Nt()):ve},pt.range=function(Ht){return arguments.length?(Le=Ht,Nt()):Le},pt.rangeRound=function(Ht){return pt.range(Ht).interpolate(Wc)},pt.clamp=function(Ht){return arguments.length?(tt=Ht,Nt()):tt},pt.interpolate=function(Ht){return arguments.length?(Ge=Ht,Nt()):Ge},pt.ticks=function(Ht){return il(ve,Ht)},pt.tickFormat=function(Ht,qt){return d3_scale_linearTickFormat(ve,Ht,qt)},pt.nice=function(Ht){return jl(ve,Ht),Nt()},pt.copy=function(){return Zh(ve,Le,Ge,tt)},Nt()}function eh(ve,Le){return t.rebind(ve,Le,"range","rangeRound","interpolate","clamp")}function jl(ve,Le){return Sf(ve,lc(ho(ve,Le)[2])),Sf(ve,lc(ho(ve,Le)[2])),ve}function ho(ve,Le){Le==null&&(Le=10);var Ge=fs(ve),tt=Ge[1]-Ge[0],nt=Math.pow(10,Math.floor(Math.log(tt/Le)/Math.LN10)),it=Le/tt*nt;return it<=.15?nt*=10:it<=.35?nt*=5:it<=.75&&(nt*=2),Ge[0]=Math.ceil(Ge[0]/nt)*nt,Ge[1]=Math.floor(Ge[1]/nt)*nt+nt*.5,Ge[2]=nt,Ge}function il(ve,Le){return t.range.apply(t,ho(ve,Le))}t.scale.log=function(){return th(t.scale.linear().domain([0,1]),10,!0,[1,10])};function th(ve,Le,Ge,tt){function nt(pt){return(Ge?Math.log(pt<0?0:pt):-Math.log(pt>0?0:-pt))/Math.log(Le)}function it(pt){return Ge?Math.pow(Le,pt):-Math.pow(Le,-pt)}function Nt(pt){return ve(nt(pt))}return Nt.invert=function(pt){return it(ve.invert(pt))},Nt.domain=function(pt){return arguments.length?(Ge=pt[0]>=0,ve.domain((tt=pt.map(Number)).map(nt)),Nt):tt},Nt.base=function(pt){return arguments.length?(Le=+pt,ve.domain(tt.map(nt)),Nt):Le},Nt.nice=function(){var pt=Sf(tt.map(nt),Ge?Math:Xh);return ve.domain(pt),tt=pt.map(it),Nt},Nt.ticks=function(){var pt=fs(tt),Ht=[],qt=pt[0],er=pt[1],Cr=Math.floor(nt(qt)),Sr=Math.ceil(nt(er)),jr=Le%1?2:Le;if(isFinite(Sr-Cr)){if(Ge){for(;Cr0;tn--)Ht.push(it(Cr)*tn);for(Cr=0;Ht[Cr]er;Sr--);Ht=Ht.slice(Cr,Sr)}return Ht},Nt.copy=function(){return th(ve.copy(),Le,Ge,tt)},eh(Nt,ve)}var Xh={floor:function(ve){return-Math.ceil(-ve)},ceil:function(ve){return-Math.floor(-ve)}};t.scale.pow=function(){return pu(t.scale.linear(),1,[0,1])};function pu(ve,Le,Ge){var tt=uc(Le),nt=uc(1/Le);function it(Nt){return ve(tt(Nt))}return it.invert=function(Nt){return nt(ve.invert(Nt))},it.domain=function(Nt){return arguments.length?(ve.domain((Ge=Nt.map(Number)).map(tt)),it):Ge},it.ticks=function(Nt){return il(Ge,Nt)},it.tickFormat=function(Nt,pt){return d3_scale_linearTickFormat(Ge,Nt,pt)},it.nice=function(Nt){return it.domain(jl(Ge,Nt))},it.exponent=function(Nt){return arguments.length?(tt=uc(Le=Nt),nt=uc(1/Le),ve.domain(Ge.map(tt)),it):Le},it.copy=function(){return pu(ve.copy(),Le,Ge)},eh(it,ve)}function uc(ve){return function(Le){return Le<0?-Math.pow(-Le,ve):Math.pow(Le,ve)}}t.scale.sqrt=function(){return t.scale.pow().exponent(.5)},t.scale.ordinal=function(){return Us([],{t:"range",a:[[]]})};function Us(ve,Le){var Ge,tt,nt;function it(pt){return tt[((Ge.get(pt)||(Le.t==="range"?Ge.set(pt,ve.push(pt)):NaN))-1)%tt.length]}function Nt(pt,Ht){return t.range(ve.length).map(function(qt){return pt+Ht*qt})}return it.domain=function(pt){if(!arguments.length)return ve;ve=[],Ge=new L;for(var Ht=-1,qt=pt.length,er;++Ht0?Ge[it-1]:ve[0],itSr?0:1;if(er=st)return Ht(er,tn)+(qt?Ht(qt,1-tn):"")+"Z";var Rr,Hr,Zr,rn,fn=0,Xr=0,Bn,Wn,Kn,ia,Ma,Ta,Za,Pa,Va=[];if((rn=(+Nt.apply(this,arguments)||0)/2)&&(Zr=tt===$l?Math.sqrt(qt*qt+er*er):+tt.apply(this,arguments),tn||(Xr*=-1),er&&(Xr=Gt(Zr/er*Math.sin(rn))),qt&&(fn=Gt(Zr/qt*Math.sin(rn)))),er){Bn=er*Math.cos(Cr+Xr),Wn=er*Math.sin(Cr+Xr),Kn=er*Math.cos(Sr-Xr),ia=er*Math.sin(Sr-Xr);var fi=Math.abs(Sr-Cr-2*Xr)<=Re?0:1;if(Xr&&Nl(Bn,Wn,Kn,ia)===tn^fi){var gi=(Cr+Sr)/2;Bn=er*Math.cos(gi),Wn=er*Math.sin(gi),Kn=ia=null}}else Bn=Wn=0;if(qt){Ma=qt*Math.cos(Sr-fn),Ta=qt*Math.sin(Sr-fn),Za=qt*Math.cos(Cr+fn),Pa=qt*Math.sin(Cr+fn);var Di=Math.abs(Cr-Sr+2*fn)<=Re?0:1;if(fn&&Nl(Ma,Ta,Za,Pa)===1-tn^Di){var Un=(Cr+Sr)/2;Ma=qt*Math.cos(Un),Ta=qt*Math.sin(Un),Za=Pa=null}}else Ma=Ta=0;if(jr>pe&&(Rr=Math.min(Math.abs(er-qt)/2,+Ge.apply(this,arguments)))>.001){Hr=qt0?0:1}function Kl(ve,Le,Ge,tt,nt){var it=ve[0]-Le[0],Nt=ve[1]-Le[1],pt=(nt?tt:-tt)/Math.sqrt(it*it+Nt*Nt),Ht=pt*Nt,qt=-pt*it,er=ve[0]+Ht,Cr=ve[1]+qt,Sr=Le[0]+Ht,jr=Le[1]+qt,tn=(er+Sr)/2,Rr=(Cr+jr)/2,Hr=Sr-er,Zr=jr-Cr,rn=Hr*Hr+Zr*Zr,fn=Ge-tt,Xr=er*jr-Sr*Cr,Bn=(Zr<0?-1:1)*Math.sqrt(Math.max(0,fn*fn*rn-Xr*Xr)),Wn=(Xr*Zr-Hr*Bn)/rn,Kn=(-Xr*Hr-Zr*Bn)/rn,ia=(Xr*Zr+Hr*Bn)/rn,Ma=(-Xr*Hr+Zr*Bn)/rn,Ta=Wn-tn,Za=Kn-Rr,Pa=ia-tn,Va=Ma-Rr;return Ta*Ta+Za*Za>Pa*Pa+Va*Va&&(Wn=ia,Kn=Ma),[[Wn-Ht,Kn-qt],[Wn*Ge/fn,Kn*Ge/fn]]}function mu(){return!0}function yu(ve){var Le=aa,Ge=fa,tt=mu,nt=xs,it=nt.key,Nt=.7;function pt(Ht){var qt=[],er=[],Cr=-1,Sr=Ht.length,jr,tn=Kr(Le),Rr=Kr(Ge);function Hr(){qt.push("M",nt(ve(er),Nt))}for(;++Cr1?ve.join("L"):ve+"Z"}function xu(ve){return ve.join("L")+"Z"}function $h(ve){for(var Le=0,Ge=ve.length,tt=ve[0],nt=[tt[0],",",tt[1]];++Le1&&nt.push("H",tt[0]),nt.join("")}function Wu(ve){for(var Le=0,Ge=ve.length,tt=ve[0],nt=[tt[0],",",tt[1]];++Le1){pt=Le[1],it=ve[Ht],Ht++,tt+="C"+(nt[0]+Nt[0])+","+(nt[1]+Nt[1])+","+(it[0]-pt[0])+","+(it[1]-pt[1])+","+it[0]+","+it[1];for(var qt=2;qt9&&(it=Ge*3/Math.sqrt(it),Nt[pt]=it*tt,Nt[pt+1]=it*nt));for(pt=-1;++pt<=Ht;)it=(ve[Math.min(Ht,pt+1)][0]-ve[Math.max(0,pt-1)][0])/(6*(1+Nt[pt]*Nt[pt])),Le.push([it||0,Nt[pt]*it||0]);return Le}function sh(ve){return ve.length<3?xs(ve):ve[0]+Jl(ve,Qh(ve))}t.svg.line.radial=function(){var ve=yu(lh);return ve.radius=ve.x,delete ve.x,ve.angle=ve.y,delete ve.y,ve};function lh(ve){for(var Le,Ge=-1,tt=ve.length,nt,it;++GeRe)+",1 "+Cr}function qt(er,Cr,Sr,jr){return"Q 0,0 "+jr}return it.radius=function(er){return arguments.length?(Ge=Kr(er),it):Ge},it.source=function(er){return arguments.length?(ve=Kr(er),it):ve},it.target=function(er){return arguments.length?(Le=Kr(er),it):Le},it.startAngle=function(er){return arguments.length?(tt=Kr(er),it):tt},it.endAngle=function(er){return arguments.length?(nt=Kr(er),it):nt},it};function qh(ve){return ve.radius}t.svg.diagonal=function(){var ve=gc,Le=Lf,Ge=Pf;function tt(nt,it){var Nt=ve.call(this,nt,it),pt=Le.call(this,nt,it),Ht=(Nt.y+pt.y)/2,qt=[Nt,{x:Nt.x,y:Ht},{x:pt.x,y:Ht},pt];return qt=qt.map(Ge),"M"+qt[0]+"C"+qt[1]+" "+qt[2]+" "+qt[3]}return tt.source=function(nt){return arguments.length?(ve=Kr(nt),tt):ve},tt.target=function(nt){return arguments.length?(Le=Kr(nt),tt):Le},tt.projection=function(nt){return arguments.length?(Ge=nt,tt):Ge},tt};function Pf(ve){return[ve.x,ve.y]}t.svg.diagonal.radial=function(){var ve=t.svg.diagonal(),Le=Pf,Ge=ve.projection;return ve.projection=function(tt){return arguments.length?Ge(ev(Le=tt)):Le},ve};function ev(ve){return function(){var Le=ve.apply(this,arguments),Ge=Le[0],tt=Le[1]-ct;return[Ge*Math.cos(tt),Ge*Math.sin(tt)]}}t.svg.symbol=function(){var ve=at,Le=Je;function Ge(tt,nt){return(yt.get(ve.call(this,tt,nt))||gt)(Le.call(this,tt,nt))}return Ge.type=function(tt){return arguments.length?(ve=Kr(tt),Ge):ve},Ge.size=function(tt){return arguments.length?(Le=Kr(tt),Ge):Le},Ge};function Je(){return 64}function at(){return"circle"}function gt(ve){var Le=Math.sqrt(ve/Re);return"M0,"+Le+"A"+Le+","+Le+" 0 1,1 0,"+-Le+"A"+Le+","+Le+" 0 1,1 0,"+Le+"Z"}var yt=t.map({circle:gt,cross:function(ve){var Le=Math.sqrt(ve/5)/2;return"M"+-3*Le+","+-Le+"H"+-Le+"V"+-3*Le+"H"+Le+"V"+-Le+"H"+3*Le+"V"+Le+"H"+Le+"V"+3*Le+"H"+-Le+"V"+Le+"H"+-3*Le+"Z"},diamond:function(ve){var Le=Math.sqrt(ve/(2*Pt)),Ge=Le*Pt;return"M0,"+-Le+"L"+Ge+",0 0,"+Le+" "+-Ge+",0Z"},square:function(ve){var Le=Math.sqrt(ve)/2;return"M"+-Le+","+-Le+"L"+Le+","+-Le+" "+Le+","+Le+" "+-Le+","+Le+"Z"},"triangle-down":function(ve){var Le=Math.sqrt(ve/Rt),Ge=Le*Rt/2;return"M0,"+Ge+"L"+Le+","+-Ge+" "+-Le+","+-Ge+"Z"},"triangle-up":function(ve){var Le=Math.sqrt(ve/Rt),Ge=Le*Rt/2;return"M0,"+-Ge+"L"+Le+","+Ge+" "+-Le+","+Ge+"Z"}});t.svg.symbolTypes=yt.keys();var Rt=Math.sqrt(3),Pt=Math.tan(30*bt);ne.transition=function(ve){for(var Le=Dr||++Tr,Ge=Tn(ve),tt=[],nt,it,Nt=Yr||{time:Date.now(),ease:jv,delay:0,duration:250},pt=-1,Ht=this.length;++pt0;)Cr[--rn].call(ve,Zr);if(Hr>=1)return Nt.event&&Nt.event.end.call(ve,ve.__data__,Le),--it.count?delete it[tt]:delete ve[Ge],1}Nt||(pt=nt.time,Ht=bn(Sr,0,pt),Nt=it[tt]={tween:new L,time:pt,timer:Ht,delay:nt.delay,duration:nt.duration,ease:nt.ease,index:Le},nt=null,++it.count)}t.svg.axis=function(){var ve=t.scale.linear(),Le=pa,Ge=6,tt=6,nt=3,it=[10],Nt=null,pt;function Ht(qt){qt.each(function(){var er=t.select(this),Cr=this.__chart__||ve,Sr=this.__chart__=ve.copy(),jr=Nt==null?Sr.ticks?Sr.ticks.apply(Sr,it):Sr.domain():Nt,tn=pt==null?Sr.tickFormat?Sr.tickFormat.apply(Sr,it):U:pt,Rr=er.selectAll(".tick").data(jr,Sr),Hr=Rr.enter().insert("g",".domain").attr("class","tick").style("opacity",pe),Zr=t.transition(Rr.exit()).style("opacity",pe).remove(),rn=t.transition(Rr.order()).style("opacity",1),fn=Math.max(Ge,0)+nt,Xr,Bn=Mf(Sr),Wn=er.selectAll(".domain").data([0]),Kn=(Wn.enter().append("path").attr("class","domain"),t.transition(Wn));Hr.append("line"),Hr.append("text");var ia=Hr.select("line"),Ma=rn.select("line"),Ta=Rr.select("text").text(tn),Za=Hr.select("text"),Pa=rn.select("text"),Va=Le==="top"||Le==="left"?-1:1,fi,gi,Di,Un;if(Le==="bottom"||Le==="top"?(Xr=Ia,fi="x",Di="y",gi="x2",Un="y2",Ta.attr("dy",Va<0?"0em":".71em").style("text-anchor","middle"),Kn.attr("d","M"+Bn[0]+","+Va*tt+"V0H"+Bn[1]+"V"+Va*tt)):(Xr=_a,fi="y",Di="x",gi="y2",Un="x2",Ta.attr("dy",".32em").style("text-anchor",Va<0?"end":"start"),Kn.attr("d","M"+Va*tt+","+Bn[0]+"H0V"+Bn[1]+"H"+Va*tt)),ia.attr(Un,Va*Ge),Za.attr(Di,Va*fn),Ma.attr(gi,0).attr(Un,Va*Ge),Pa.attr(fi,0).attr(Di,Va*fn),Sr.rangeBand){var Ga=Sr,Ua=Ga.rangeBand()/2;Cr=Sr=function(ri){return Ga(ri)+Ua}}else Cr.rangeBand?Cr=Sr:Zr.call(Xr,Sr,Cr);Hr.call(Xr,Cr,Sr),rn.call(Xr,Sr,Sr)})}return Ht.scale=function(qt){return arguments.length?(ve=qt,Ht):ve},Ht.orient=function(qt){return arguments.length?(Le=qt in Na?qt+"":pa,Ht):Le},Ht.ticks=function(){return arguments.length?(it=p(arguments),Ht):it},Ht.tickValues=function(qt){return arguments.length?(Nt=qt,Ht):Nt},Ht.tickFormat=function(qt){return arguments.length?(pt=qt,Ht):pt},Ht.tickSize=function(qt){var er=arguments.length;return er?(Ge=+qt,tt=+arguments[er-1],Ht):Ge},Ht.innerTickSize=function(qt){return arguments.length?(Ge=+qt,Ht):Ge},Ht.outerTickSize=function(qt){return arguments.length?(tt=+qt,Ht):tt},Ht.tickPadding=function(qt){return arguments.length?(nt=+qt,Ht):nt},Ht.tickSubdivide=function(){return arguments.length&&Ht},Ht};var pa="bottom",Na={top:1,right:1,bottom:1,left:1};function Ia(ve,Le,Ge){ve.attr("transform",function(tt){var nt=Le(tt);return"translate("+(isFinite(nt)?nt:Ge(tt))+",0)"})}function _a(ve,Le,Ge){ve.attr("transform",function(tt){var nt=Le(tt);return"translate(0,"+(isFinite(nt)?nt:Ge(tt))+")"})}t.svg.brush=function(){var ve=$(er,"brushstart","brush","brushend"),Le=null,Ge=null,tt=[0,0],nt=[0,0],it,Nt,pt=!0,Ht=!0,qt=Ai[0];function er(Rr){Rr.each(function(){var Hr=t.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",tn).on("touchstart.brush",tn),Zr=Hr.selectAll(".background").data([0]);Zr.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Hr.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var rn=Hr.selectAll(".resize").data(qt,U);rn.exit().remove(),rn.enter().append("g").attr("class",function(Wn){return"resize "+Wn}).style("cursor",function(Wn){return za[Wn]}).append("rect").attr("x",function(Wn){return/[ew]$/.test(Wn)?-3:null}).attr("y",function(Wn){return/^[ns]/.test(Wn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),rn.style("display",er.empty()?"none":null);var fn=t.transition(Hr),Xr=t.transition(Zr),Bn;Le&&(Bn=Mf(Le),Xr.attr("x",Bn[0]).attr("width",Bn[1]-Bn[0]),Sr(fn)),Ge&&(Bn=Mf(Ge),Xr.attr("y",Bn[0]).attr("height",Bn[1]-Bn[0]),jr(fn)),Cr(fn)})}er.event=function(Rr){Rr.each(function(){var Hr=ve.of(this,arguments),Zr={x:tt,y:nt,i:it,j:Nt},rn=this.__chart__||Zr;this.__chart__=Zr,Dr?t.select(this).transition().each("start.brush",function(){it=rn.i,Nt=rn.j,tt=rn.x,nt=rn.y,Hr({type:"brushstart"})}).tween("brush:brush",function(){var fn=Oo(tt,Zr.x),Xr=Oo(nt,Zr.y);return it=Nt=null,function(Bn){tt=Zr.x=fn(Bn),nt=Zr.y=Xr(Bn),Hr({type:"brush",mode:"resize"})}}).each("end.brush",function(){it=Zr.i,Nt=Zr.j,Hr({type:"brush",mode:"resize"}),Hr({type:"brushend"})}):(Hr({type:"brushstart"}),Hr({type:"brush",mode:"resize"}),Hr({type:"brushend"}))})};function Cr(Rr){Rr.selectAll(".resize").attr("transform",function(Hr){return"translate("+tt[+/e$/.test(Hr)]+","+nt[+/^s/.test(Hr)]+")"})}function Sr(Rr){Rr.select(".extent").attr("x",tt[0]),Rr.selectAll(".extent,.n>rect,.s>rect").attr("width",tt[1]-tt[0])}function jr(Rr){Rr.select(".extent").attr("y",nt[0]),Rr.selectAll(".extent,.e>rect,.w>rect").attr("height",nt[1]-nt[0])}function tn(){var Rr=this,Hr=t.select(t.event.target),Zr=ve.of(Rr,arguments),rn=t.select(Rr),fn=Hr.datum(),Xr=!/^(n|s)$/.test(fn)&&Le,Bn=!/^(e|w)$/.test(fn)&&Ge,Wn=Hr.classed("extent"),Kn=ot(Rr),ia,Ma=t.mouse(Rr),Ta,Za=t.select(r(Rr)).on("keydown.brush",fi).on("keyup.brush",gi);if(t.event.changedTouches?Za.on("touchmove.brush",Di).on("touchend.brush",Ga):Za.on("mousemove.brush",Di).on("mouseup.brush",Ga),rn.interrupt().selectAll("*").interrupt(),Wn)Ma[0]=tt[0]-Ma[0],Ma[1]=nt[0]-Ma[1];else if(fn){var Pa=+/w$/.test(fn),Va=+/^n/.test(fn);Ta=[tt[1-Pa]-Ma[0],nt[1-Va]-Ma[1]],Ma[0]=tt[Pa],Ma[1]=nt[Va]}else t.event.altKey&&(ia=Ma.slice());rn.style("pointer-events","none").selectAll(".resize").style("display",null),t.select("body").style("cursor",Hr.style("cursor")),Zr({type:"brushstart"}),Di();function fi(){t.event.keyCode==32&&(Wn||(ia=null,Ma[0]-=tt[1],Ma[1]-=nt[1],Wn=2),le())}function gi(){t.event.keyCode==32&&Wn==2&&(Ma[0]+=tt[1],Ma[1]+=nt[1],Wn=0,le())}function Di(){var Ua=t.mouse(Rr),ri=!1;Ta&&(Ua[0]+=Ta[0],Ua[1]+=Ta[1]),Wn||(t.event.altKey?(ia||(ia=[(tt[0]+tt[1])/2,(nt[0]+nt[1])/2]),Ma[0]=tt[+(Ua[0]>>1,x;b.dtype||(b.dtype="array"),typeof b.dtype=="string"?x=new(n(b.dtype))(h):b.dtype&&(x=b.dtype,Array.isArray(x)&&(x.length=h));for(var C=0;Cg||le>a){for(var Q=0;Qke||fe>We||te=ce)&&Ae!==De){var _e=D[Me];De===void 0&&(De=_e.length);for(var Ye=Ae;Ye=he&&Ve<=Z&&Ze>=$&&Ze<=K&&de.push(Pe)}var Ke=L[Me],lt=Ke[Ae*4+0],vt=Ke[Ae*4+1],mt=Ke[Ae*4+2],Et=Ke[Ae*4+3],et=Se(Ke,Ae+1),Ue=Ie*.5,Be=Me+1;we(Te,Fe,Ue,Be,lt,vt||mt||Et||et),we(Te,Fe+Ue,Ue,Be,vt,mt||Et||et),we(Te+Ue,Fe,Ue,Be,mt,Et||et),we(Te+Ue,Fe+Ue,Ue,Be,Et,et)}}}function Se(Te,Fe){for(var Ie=null,Me=0;Ie===null;)if(Ie=Te[Fe*4+Me],Me++,Me>Te.length)return null;return Ie}return de}function U(B,W,q,re,ie){for(var le=[],he=0;he0){n+=Math.abs(l(r[0]));for(var u=1;u2){for(b=0;b=0))throw new Error("precision must be a positive number");var P=Math.pow(10,f||0);return Math.round(S*P)/P}F.round=c;function s(S,f){f===void 0&&(f="kilometers");var P=F.factors[f];if(!P)throw new Error(f+" units is invalid");return S*P}F.radiansToLength=s;function b(S,f){f===void 0&&(f="kilometers");var P=F.factors[f];if(!P)throw new Error(f+" units is invalid");return S/P}F.lengthToRadians=b;function g(S,f){return v(b(S,f))}F.lengthToDegrees=g;function A(S){var f=S%360;return f<0&&(f+=360),f}F.bearingToAzimuth=A;function v(S){var f=S%(2*Math.PI);return f*180/Math.PI}F.radiansToDegrees=v;function h(S){var f=S%360;return f*Math.PI/180}F.degreesToRadians=h;function x(S,f,P){if(f===void 0&&(f="kilometers"),P===void 0&&(P="kilometers"),!(S>=0))throw new Error("length must be a positive number");return s(b(S,f),P)}F.convertLength=x;function C(S,f,P){if(f===void 0&&(f="meters"),P===void 0&&(P="kilometers"),!(S>=0))throw new Error("area must be a positive number");var E=F.areaFactors[f];if(!E)throw new Error("invalid original units");var k=F.areaFactors[P];if(!k)throw new Error("invalid final units");return S/E*k}F.convertArea=C;function D(S){return!isNaN(S)&&S!==null&&!Array.isArray(S)}F.isNumber=D;function L(S){return!!S&&S.constructor===Object}F.isObject=L;function w(S){if(!S)throw new Error("bbox is required");if(!Array.isArray(S))throw new Error("bbox must be an Array");if(S.length!==4&&S.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");S.forEach(function(f){if(!D(f))throw new Error("bbox must only contain numbers")})}F.validateBBox=w;function M(S){if(!S)throw new Error("id is required");if(["string","number"].indexOf(typeof S)===-1)throw new Error("id must be a number or a string")}F.validateId=M},60302:function(R,F,e){Object.defineProperty(F,"__esModule",{value:!0});var i=e(23132);function m(h,x,C){if(h!==null)for(var D,L,w,M,S,f,P,E=0,k=0,O,G=h.type,z=G==="FeatureCollection",U=G==="Feature",H=z?h.features.length:1,B=0;Bf||z>P||U>E){S=k,f=D,P=z,E=U,w=0;return}var H=i.lineString([S,k],C.properties);if(x(H,D,L,U,w)===!1)return!1;w++,S=k})===!1)return!1}}})}function s(h,x,C){var D=C,L=!1;return c(h,function(w,M,S,f,P){L===!1&&C===void 0?D=w:D=x(D,w,M,S,f,P),L=!0}),D}function b(h,x){if(!h)throw new Error("geojson is required");a(h,function(C,D,L){if(C.geometry!==null){var w=C.geometry.type,M=C.geometry.coordinates;switch(w){case"LineString":if(x(C,D,L,0,0)===!1)return!1;break;case"Polygon":for(var S=0;Sp[0]&&(y[0]=p[0]),y[1]>p[1]&&(y[1]=p[1]),y[2]=0))throw new Error("precision must be a positive number");var P=Math.pow(10,f||0);return Math.round(S*P)/P}F.round=c;function s(S,f){f===void 0&&(f="kilometers");var P=F.factors[f];if(!P)throw new Error(f+" units is invalid");return S*P}F.radiansToLength=s;function b(S,f){f===void 0&&(f="kilometers");var P=F.factors[f];if(!P)throw new Error(f+" units is invalid");return S/P}F.lengthToRadians=b;function g(S,f){return v(b(S,f))}F.lengthToDegrees=g;function A(S){var f=S%360;return f<0&&(f+=360),f}F.bearingToAzimuth=A;function v(S){var f=S%(2*Math.PI);return f*180/Math.PI}F.radiansToDegrees=v;function h(S){var f=S%360;return f*Math.PI/180}F.degreesToRadians=h;function x(S,f,P){if(f===void 0&&(f="kilometers"),P===void 0&&(P="kilometers"),!(S>=0))throw new Error("length must be a positive number");return s(b(S,f),P)}F.convertLength=x;function C(S,f,P){if(f===void 0&&(f="meters"),P===void 0&&(P="kilometers"),!(S>=0))throw new Error("area must be a positive number");var E=F.areaFactors[f];if(!E)throw new Error("invalid original units");var k=F.areaFactors[P];if(!k)throw new Error("invalid final units");return S/E*k}F.convertArea=C;function D(S){return!isNaN(S)&&S!==null&&!Array.isArray(S)}F.isNumber=D;function L(S){return!!S&&S.constructor===Object}F.isObject=L;function w(S){if(!S)throw new Error("bbox is required");if(!Array.isArray(S))throw new Error("bbox must be an Array");if(S.length!==4&&S.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");S.forEach(function(f){if(!D(f))throw new Error("bbox must only contain numbers")})}F.validateBBox=w;function M(S){if(!S)throw new Error("id is required");if(["string","number"].indexOf(typeof S)===-1)throw new Error("id must be a number or a string")}F.validateId=M},27138:function(R,F,e){Object.defineProperty(F,"__esModule",{value:!0});var i=e(94228);function m(h,x,C){if(h!==null)for(var D,L,w,M,S,f,P,E=0,k=0,O,G=h.type,z=G==="FeatureCollection",U=G==="Feature",H=z?h.features.length:1,B=0;Bf||z>P||U>E){S=k,f=D,P=z,E=U,w=0;return}var H=i.lineString([S,k],C.properties);if(x(H,D,L,U,w)===!1)return!1;w++,S=k})===!1)return!1}}})}function s(h,x,C){var D=C,L=!1;return c(h,function(w,M,S,f,P){L===!1&&C===void 0?D=w:D=x(D,w,M,S,f,P),L=!0}),D}function b(h,x){if(!h)throw new Error("geojson is required");a(h,function(C,D,L){if(C.geometry!==null){var w=C.geometry.type,M=C.geometry.coordinates;switch(w){case"LineString":if(x(C,D,L,0,0)===!1)return!1;break;case"Polygon":for(var S=0;S=0))throw new Error("precision must be a positive number");var H=Math.pow(10,U||0);return Math.round(z*H)/H}F.round=c;function s(z,U){U===void 0&&(U="kilometers");var H=F.factors[U];if(!H)throw new Error(U+" units is invalid");return z*H}F.radiansToLength=s;function b(z,U){U===void 0&&(U="kilometers");var H=F.factors[U];if(!H)throw new Error(U+" units is invalid");return z/H}F.lengthToRadians=b;function g(z,U){return v(b(z,U))}F.lengthToDegrees=g;function A(z){var U=z%360;return U<0&&(U+=360),U}F.bearingToAzimuth=A;function v(z){var U=z%(2*Math.PI);return U*180/Math.PI}F.radiansToDegrees=v;function h(z){var U=z%360;return U*Math.PI/180}F.degreesToRadians=h;function x(z,U,H){if(U===void 0&&(U="kilometers"),H===void 0&&(H="kilometers"),!(z>=0))throw new Error("length must be a positive number");return s(b(z,U),H)}F.convertLength=x;function C(z,U,H){if(U===void 0&&(U="meters"),H===void 0&&(H="kilometers"),!(z>=0))throw new Error("area must be a positive number");var B=F.areaFactors[U];if(!B)throw new Error("invalid original units");var W=F.areaFactors[H];if(!W)throw new Error("invalid final units");return z/B*W}F.convertArea=C;function D(z){return!isNaN(z)&&z!==null&&!Array.isArray(z)&&!/^\s*$/.test(z)}F.isNumber=D;function L(z){return!!z&&z.constructor===Object}F.isObject=L;function w(z){if(!z)throw new Error("bbox is required");if(!Array.isArray(z))throw new Error("bbox must be an Array");if(z.length!==4&&z.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");z.forEach(function(U){if(!D(U))throw new Error("bbox must only contain numbers")})}F.validateBBox=w;function M(z){if(!z)throw new Error("id is required");if(["string","number"].indexOf(typeof z)===-1)throw new Error("id must be a number or a string")}F.validateId=M;function S(){throw new Error("method has been renamed to `radiansToDegrees`")}F.radians2degrees=S;function f(){throw new Error("method has been renamed to `degreesToRadians`")}F.degrees2radians=f;function P(){throw new Error("method has been renamed to `lengthToDegrees`")}F.distanceToDegrees=P;function E(){throw new Error("method has been renamed to `lengthToRadians`")}F.distanceToRadians=E;function k(){throw new Error("method has been renamed to `radiansToLength`")}F.radiansToDistance=k;function O(){throw new Error("method has been renamed to `bearingToAzimuth`")}F.bearingToAngle=O;function G(){throw new Error("method has been renamed to `convertLength`")}F.convertDistance=G},88553:function(R,F,e){Object.defineProperty(F,"__esModule",{value:!0});var i=e(64182);function m(h,x,C){if(h!==null)for(var D,L,w,M,S,f,P,E=0,k=0,O,G=h.type,z=G==="FeatureCollection",U=G==="Feature",H=z?h.features.length:1,B=0;Bf||z>P||U>E){S=k,f=D,P=z,E=U,w=0;return}var H=i.lineString([S,k],C.properties);if(x(H,D,L,U,w)===!1)return!1;w++,S=k})===!1)return!1}}})}function s(h,x,C){var D=C,L=!1;return c(h,function(w,M,S,f,P){L===!1&&C===void 0?D=w:D=x(D,w,M,S,f,P),L=!0}),D}function b(h,x){if(!h)throw new Error("geojson is required");a(h,function(C,D,L){if(C.geometry!==null){var w=C.geometry.type,M=C.geometry.coordinates;switch(w){case"LineString":if(x(C,D,L,0,0)===!1)return!1;break;case"Polygon":for(var S=0;Sy&&(y=e[l]),e[l]1?le-1:0),$=1;$1?le-1:0),$=1;$1?le-1:0),$=1;$1?le-1:0),$=1;$"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function o(z,U,H){return a()?o=Reflect.construct:o=function(W,q,re){var ie=[null];ie.push.apply(ie,q);var le=Function.bind.apply(W,ie),he=new le;return re&&s(he,re.prototype),he},o.apply(null,arguments)}function c(z){return Function.toString.call(z).indexOf("[native code]")!==-1}function s(z,U){return s=Object.setPrototypeOf||function(B,W){return B.__proto__=W,B},s(z,U)}function b(z){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(H){return H.__proto__||Object.getPrototypeOf(H)},b(z)}function g(z){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?g=function(H){return typeof H}:g=function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},g(z)}var A=e(43827),v=A.inspect,h=e(79616),x=h.codes.ERR_INVALID_ARG_TYPE;function C(z,U,H){return(H===void 0||H>z.length)&&(H=z.length),z.substring(H-U.length,H)===U}function D(z,U){if(U=Math.floor(U),z.length==0||U==0)return"";var H=z.length*U;for(U=Math.floor(Math.log(U)/Math.log(2));U;)z+=z,U--;return z+=z.substring(0,H-z.length),z}var L="",w="",M="",S="",f={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},P=10;function E(z){var U=Object.keys(z),H=Object.create(Object.getPrototypeOf(z));return U.forEach(function(B){H[B]=z[B]}),Object.defineProperty(H,"message",{value:z.message}),H}function k(z){return v(z,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function O(z,U,H){var B="",W="",q=0,re="",ie=!1,le=k(z),he=le.split(` +`),$=k(U).split(` +`),Z=0,K="";if(H==="strictEqual"&&g(z)==="object"&&g(U)==="object"&&z!==null&&U!==null&&(H="strictEqualObject"),he.length===1&&$.length===1&&he[0]!==$[0]){var Q=he[0].length+$[0].length;if(Q<=P){if((g(z)!=="object"||z===null)&&(g(U)!=="object"||U===null)&&(z!==0||U!==0))return"".concat(f[H],` + +`)+"".concat(he[0]," !== ").concat($[0],` +`)}else if(H!=="strictEqualObject"){var ae=i.stderr&&i.stderr.isTTY?i.stderr.columns:80;if(Q2&&(K=` + `.concat(D(" ",Z),"^"),Z=0)}}}for(var fe=he[he.length-1],te=$[$.length-1];fe===te&&(Z++<2?re=` + `.concat(fe).concat(re):B=fe,he.pop(),$.pop(),!(he.length===0||$.length===0));)fe=he[he.length-1],te=$[$.length-1];var ne=Math.max(he.length,$.length);if(ne===0){var ce=le.split(` +`);if(ce.length>30)for(ce[26]="".concat(L,"...").concat(S);ce.length>27;)ce.pop();return"".concat(f.notIdentical,` + +`).concat(ce.join(` +`),` +`)}Z>3&&(re=` +`.concat(L,"...").concat(S).concat(re),ie=!0),B!==""&&(re=` + `.concat(B).concat(re),B="");var oe=0,de=f[H]+` +`.concat(w,"+ actual").concat(S," ").concat(M,"- expected").concat(S),we=" ".concat(L,"...").concat(S," Lines skipped");for(Z=0;Z1&&Z>2&&(Se>4?(W+=` +`.concat(L,"...").concat(S),ie=!0):Se>3&&(W+=` + `.concat($[Z-2]),oe++),W+=` + `.concat($[Z-1]),oe++),q=Z,B+=` +`.concat(M,"-").concat(S," ").concat($[Z]),oe++;else if($.length1&&Z>2&&(Se>4?(W+=` +`.concat(L,"...").concat(S),ie=!0):Se>3&&(W+=` + `.concat(he[Z-2]),oe++),W+=` + `.concat(he[Z-1]),oe++),q=Z,W+=` +`.concat(w,"+").concat(S," ").concat(he[Z]),oe++;else{var Te=$[Z],Fe=he[Z],Ie=Fe!==Te&&(!C(Fe,",")||Fe.slice(0,-1)!==Te);Ie&&C(Te,",")&&Te.slice(0,-1)===Fe&&(Ie=!1,Fe+=","),Ie?(Se>1&&Z>2&&(Se>4?(W+=` +`.concat(L,"...").concat(S),ie=!0):Se>3&&(W+=` + `.concat(he[Z-2]),oe++),W+=` + `.concat(he[Z-1]),oe++),q=Z,W+=` +`.concat(w,"+").concat(S," ").concat(Fe),B+=` +`.concat(M,"-").concat(S," ").concat(Te),oe+=2):(W+=B,B="",(Se===1||Z===0)&&(W+=` + `.concat(Fe),oe++))}if(oe>20&&Z30)for(Z[26]="".concat(L,"...").concat(S);Z.length>27;)Z.pop();Z.length===1?B=d(this,b(U).call(this,"".concat($," ").concat(Z[0]))):B=d(this,b(U).call(this,"".concat($,` + +`).concat(Z.join(` +`),` +`)))}else{var K=k(ie),Q="",ae=f[q];q==="notDeepEqual"||q==="notEqual"?(K="".concat(f[q],` + +`).concat(K),K.length>1024&&(K="".concat(K.slice(0,1021),"..."))):(Q="".concat(k(le)),K.length>512&&(K="".concat(K.slice(0,509),"...")),Q.length>512&&(Q="".concat(Q.slice(0,509),"...")),q==="deepEqual"||q==="equal"?K="".concat(ae,` + +`).concat(K,` + +should equal + +`):Q=" ".concat(q," ").concat(Q)),B=d(this,b(U).call(this,"".concat(K).concat(Q)))}return Error.stackTraceLimit=he,B.generatedMessage=!W,Object.defineProperty(r(B),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),B.code="ERR_ASSERTION",B.actual=ie,B.expected=le,B.operator=q,Error.captureStackTrace&&Error.captureStackTrace(r(B),re),B.stack,B.name="AssertionError",d(B)}return l(U,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:v.custom,value:function(B,W){return v(this,m({},W,{customInspect:!1,depth:0}))}}]),U}(u(Error));R.exports=G},79616:function(R,F,e){function i(g){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?i=function(v){return typeof v}:i=function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},i(g)}function m(g,A){if(!(g instanceof A))throw new TypeError("Cannot call a class as a function")}function t(g,A){return A&&(i(A)==="object"||typeof A=="function")?A:y(g)}function y(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}function p(g){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},p(g)}function l(g,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(A&&A.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),A&&d(g,A)}function d(g,A){return d=Object.setPrototypeOf||function(h,x){return h.__proto__=x,h},d(g,A)}var r={},n,u;function a(g,A,v){v||(v=Error);function h(C,D,L){return typeof A=="string"?A:A(C,D,L)}var x=function(C){l(D,C);function D(L,w,M){var S;return m(this,D),S=t(this,p(D).call(this,h(L,w,M))),S.code=g,S}return D}(v);r[g]=x}function o(g,A){if(Array.isArray(g)){var v=g.length;return g=g.map(function(h){return String(h)}),v>2?"one of ".concat(A," ").concat(g.slice(0,v-1).join(", "),", or ")+g[v-1]:v===2?"one of ".concat(A," ").concat(g[0]," or ").concat(g[1]):"of ".concat(A," ").concat(g[0])}else return"of ".concat(A," ").concat(String(g))}function c(g,A,v){return g.substr(!v||v<0?0:+v,A.length)===A}function s(g,A,v){return(v===void 0||v>g.length)&&(v=g.length),g.substring(v-A.length,v)===A}function b(g,A,v){return typeof v!="number"&&(v=0),v+A.length>g.length?!1:g.indexOf(A,v)!==-1}a("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),a("ERR_INVALID_ARG_TYPE",function(g,A,v){n===void 0&&(n=e(32791)),n(typeof g=="string","'name' must be a string");var h;typeof A=="string"&&c(A,"not ")?(h="must not be",A=A.replace(/^not /,"")):h="must be";var x;if(s(g," argument"))x="The ".concat(g," ").concat(h," ").concat(o(A,"type"));else{var C=b(g,".")?"property":"argument";x='The "'.concat(g,'" ').concat(C," ").concat(h," ").concat(o(A,"type"))}return x+=". Received type ".concat(i(v)),x},TypeError),a("ERR_INVALID_ARG_VALUE",function(g,A){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";u===void 0&&(u=e(43827));var h=u.inspect(A);return h.length>128&&(h="".concat(h.slice(0,128),"...")),"The argument '".concat(g,"' ").concat(v,". Received ").concat(h)},TypeError),a("ERR_INVALID_RETURN_VALUE",function(g,A,v){var h;return v&&v.constructor&&v.constructor.name?h="instance of ".concat(v.constructor.name):h="type ".concat(i(v)),"Expected ".concat(g,' to be returned from the "').concat(A,'"')+" function but got ".concat(h,".")},TypeError),a("ERR_MISSING_ARGS",function(){for(var g=arguments.length,A=new Array(g),v=0;v0,"At least one arg needs to be specified");var h="The ",x=A.length;switch(A=A.map(function(C){return'"'.concat(C,'"')}),x){case 1:h+="".concat(A[0]," argument");break;case 2:h+="".concat(A[0]," and ").concat(A[1]," arguments");break;default:h+=A.slice(0,x-1).join(", "),h+=", and ".concat(A[x-1]," arguments");break}return"".concat(h," must be specified")},TypeError),R.exports.codes=r},74061:function(R,F,e){function i(Me,Ae){return y(Me)||t(Me,Ae)||m()}function m(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function t(Me,Ae){var De=[],ke=!0,We=!1,_e=void 0;try{for(var Ye=Me[Symbol.iterator](),Pe;!(ke=(Pe=Ye.next()).done)&&(De.push(Pe.value),!(Ae&&De.length===Ae));ke=!0);}catch(Ve){We=!0,_e=Ve}finally{try{!ke&&Ye.return!=null&&Ye.return()}finally{if(We)throw _e}}return De}function y(Me){if(Array.isArray(Me))return Me}function p(Me){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?p=function(De){return typeof De}:p=function(De){return De&&typeof Symbol=="function"&&De.constructor===Symbol&&De!==Symbol.prototype?"symbol":typeof De},p(Me)}var l=/a/g.flags!==void 0,d=function(Ae){var De=[];return Ae.forEach(function(ke){return De.push(ke)}),De},r=function(Ae){var De=[];return Ae.forEach(function(ke,We){return De.push([We,ke])}),De},n=Object.is?Object.is:e(64003),u=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},a=Number.isNaN?Number.isNaN:e(15567);function o(Me){return Me.call.bind(Me)}var c=o(Object.prototype.hasOwnProperty),s=o(Object.prototype.propertyIsEnumerable),b=o(Object.prototype.toString),g=e(43827).types,A=g.isAnyArrayBuffer,v=g.isArrayBufferView,h=g.isDate,x=g.isMap,C=g.isRegExp,D=g.isSet,L=g.isNativeError,w=g.isBoxedPrimitive,M=g.isNumberObject,S=g.isStringObject,f=g.isBooleanObject,P=g.isBigIntObject,E=g.isSymbolObject,k=g.isFloat32Array,O=g.isFloat64Array;function G(Me){if(Me.length===0||Me.length>10)return!0;for(var Ae=0;Ae57)return!0}return Me.length===10&&Me>=Math.pow(2,32)}function z(Me){return Object.keys(Me).filter(G).concat(u(Me).filter(Object.prototype.propertyIsEnumerable.bind(Me)))}/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */function U(Me,Ae){if(Me===Ae)return 0;for(var De=Me.length,ke=Ae.length,We=0,_e=Math.min(De,ke);We<_e;++We)if(Me[We]!==Ae[We]){De=Me[We],ke=Ae[We];break}return De0)throw new Error("Invalid string. Length must be a multiple of 4");var b=c.indexOf("=");b===-1&&(b=s);var g=b===s?0:4-b%4;return[b,g]}function d(c){var s=l(c),b=s[0],g=s[1];return(b+g)*3/4-g}function r(c,s,b){return(s+b)*3/4-b}function n(c){var s,b=l(c),g=b[0],A=b[1],v=new m(r(c,g,A)),h=0,x=A>0?g-4:g,C;for(C=0;C>16&255,v[h++]=s>>8&255,v[h++]=s&255;return A===2&&(s=i[c.charCodeAt(C)]<<2|i[c.charCodeAt(C+1)]>>4,v[h++]=s&255),A===1&&(s=i[c.charCodeAt(C)]<<10|i[c.charCodeAt(C+1)]<<4|i[c.charCodeAt(C+2)]>>2,v[h++]=s>>8&255,v[h++]=s&255),v}function u(c){return e[c>>18&63]+e[c>>12&63]+e[c>>6&63]+e[c&63]}function a(c,s,b){for(var g,A=[],v=s;vx?x:h+v));return g===1?(s=c[b-1],A.push(e[s>>2]+e[s<<4&63]+"==")):g===2&&(s=(c[b-2]<<8)+c[b-1],A.push(e[s>>10]+e[s>>4&63]+e[s<<2&63]+"=")),A.join("")}},91358:function(R){function F(p,l,d,r,n){for(var u=n+1;r<=n;){var a=r+n>>>1,o=p[a],c=d!==void 0?d(o,l):o-l;c>=0?(u=a,n=a-1):r=a+1}return u}function e(p,l,d,r,n){for(var u=n+1;r<=n;){var a=r+n>>>1,o=p[a],c=d!==void 0?d(o,l):o-l;c>0?(u=a,n=a-1):r=a+1}return u}function i(p,l,d,r,n){for(var u=r-1;r<=n;){var a=r+n>>>1,o=p[a],c=d!==void 0?d(o,l):o-l;c<0?(u=a,r=a+1):n=a-1}return u}function m(p,l,d,r,n){for(var u=r-1;r<=n;){var a=r+n>>>1,o=p[a],c=d!==void 0?d(o,l):o-l;c<=0?(u=a,r=a+1):n=a-1}return u}function t(p,l,d,r,n){for(;r<=n;){var u=r+n>>>1,a=p[u],o=d!==void 0?d(a,l):a-l;if(o===0)return u;o<=0?r=u+1:n=u-1}return-1}function y(p,l,d,r,n,u){return typeof d=="function"?u(p,l,d,r===void 0?0:r|0,n===void 0?p.length-1:n|0):u(p,l,void 0,d===void 0?0:d|0,r===void 0?p.length-1:r|0)}R.exports={ge:function(p,l,d,r,n){return y(p,l,d,r,n,F)},gt:function(p,l,d,r,n){return y(p,l,d,r,n,e)},lt:function(p,l,d,r,n){return y(p,l,d,r,n,i)},le:function(p,l,d,r,n){return y(p,l,d,r,n,m)},eq:function(p,l,d,r,n){return y(p,l,d,r,n,t)}}},13547:function(R,F){var e=32;F.INT_BITS=e,F.INT_MAX=2147483647,F.INT_MIN=-1<0)-(t<0)},F.abs=function(t){var y=t>>e-1;return(t^y)-y},F.min=function(t,y){return y^(t^y)&-(t65535)<<4,t>>>=y,p=(t>255)<<3,t>>>=p,y|=p,p=(t>15)<<2,t>>>=p,y|=p,p=(t>3)<<1,t>>>=p,y|=p,y|t>>1},F.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},F.popCount=function(t){return t=t-(t>>>1&1431655765),t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24};function i(t){var y=32;return t&=-t,t&&y--,t&65535&&(y-=16),t&16711935&&(y-=8),t&252645135&&(y-=4),t&858993459&&(y-=2),t&1431655765&&(y-=1),y}F.countTrailingZeros=i,F.nextPow2=function(t){return t+=t===0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t+1},F.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t-(t>>>1)},F.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,t&=15,27030>>>t&1};var m=new Array(256);(function(t){for(var y=0;y<256;++y){var p=y,l=y,d=7;for(p>>>=1;p;p>>>=1)l<<=1,l|=p&1,--d;t[y]=l<>>8&255]<<16|m[t>>>16&255]<<8|m[t>>>24&255]},F.interleave2=function(t,y){return t&=65535,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,y&=65535,y=(y|y<<8)&16711935,y=(y|y<<4)&252645135,y=(y|y<<2)&858993459,y=(y|y<<1)&1431655765,t|y<<1},F.deinterleave2=function(t,y){return t=t>>>y&1431655765,t=(t|t>>>1)&858993459,t=(t|t>>>2)&252645135,t=(t|t>>>4)&16711935,t=(t|t>>>16)&65535,t<<16>>16},F.interleave3=function(t,y,p){return t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,y&=1023,y=(y|y<<16)&4278190335,y=(y|y<<8)&251719695,y=(y|y<<4)&3272356035,y=(y|y<<2)&1227133513,t|=y<<1,p&=1023,p=(p|p<<16)&4278190335,p=(p|p<<8)&251719695,p=(p|p<<4)&3272356035,p=(p|p<<2)&1227133513,t|p<<2},F.deinterleave3=function(t,y){return t=t>>>y&1227133513,t=(t|t>>>2)&3272356035,t=(t|t>>>4)&251719695,t=(t|t>>>8)&4278190335,t=(t|t>>>16)&1023,t<<22>>22},F.nextCombination=function(t){var y=t|t-1;return y+1|(~y&-~y)-1>>>i(t)+1}},44781:function(R,F,e){var i=e(53435);R.exports=t;var m=1e20;function t(l,d){d||(d={});var r=d.cutoff==null?.25:d.cutoff,n=d.radius==null?8:d.radius,u=d.channel||0,a,o,c,s,b,g,A,v,h,x,C;if(ArrayBuffer.isView(l)||Array.isArray(l)){if(!d.width||!d.height)throw Error("For raw data width and height should be provided by options");a=d.width,o=d.height,s=l,d.stride?g=d.stride:g=Math.floor(l.length/a/o)}else window.HTMLCanvasElement&&l instanceof window.HTMLCanvasElement?(v=l,A=v.getContext("2d"),a=v.width,o=v.height,h=A.getImageData(0,0,a,o),s=h.data,g=4):window.CanvasRenderingContext2D&&l instanceof window.CanvasRenderingContext2D?(v=l.canvas,A=l,a=v.width,o=v.height,h=A.getImageData(0,0,a,o),s=h.data,g=4):window.ImageData&&l instanceof window.ImageData&&(h=l,a=l.width,o=l.height,s=h.data,g=4);if(c=Math.max(a,o),window.Uint8ClampedArray&&s instanceof window.Uint8ClampedArray||window.Uint8Array&&s instanceof window.Uint8Array)for(b=s,s=Array(a*o),x=0,C=b.length;x-1?m(d):d}},68222:function(R,F,e){var i=e(77575),m=e(68318),t=m("%Function.prototype.apply%"),y=m("%Function.prototype.call%"),p=m("%Reflect.apply%",!0)||i.call(y,t),l=m("%Object.getOwnPropertyDescriptor%",!0),d=m("%Object.defineProperty%",!0),r=m("%Math.max%");if(d)try{d({},"a",{value:1})}catch{d=null}R.exports=function(a){var o=p(i,y,arguments);if(l&&d){var c=l(o,"length");c.configurable&&d(o,"length",{value:1+r(0,a.length-(arguments.length-1))})}return o};var n=function(){return p(i,t,arguments)};d?d(R.exports,"apply",{value:n}):R.exports.apply=n},53435:function(R){R.exports=F;function F(e,i,m){return im?m:e:ei?i:e}},6475:function(R,F,e){var i=e(53435);R.exports=m,R.exports.to=m,R.exports.from=t;function m(y,p){p==null&&(p=!0);var l=y[0],d=y[1],r=y[2],n=y[3];n==null&&(n=p?1:255),p&&(l*=255,d*=255,r*=255,n*=255),l=i(l,0,255)&255,d=i(d,0,255)&255,r=i(r,0,255)&255,n=i(n,0,255)&255;var u=l*16777216+(d<<16)+(r<<8)+n;return u}function t(y,p){y=+y;var l=y>>>24,d=(y&16711680)>>>16,r=(y&65280)>>>8,n=y&255;return p===!1?[l,d,r,n]:[l/255,d/255,r/255,n/255]}},76857:function(R){R.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},25075:function(R,F,e){var i=e(36652),m=e(53435),t=e(90660);R.exports=function(l,d){(d==="float"||!d)&&(d="array"),d==="uint"&&(d="uint8"),d==="uint_clamped"&&(d="uint8_clamped");var r=t(d),n=new r(4),u=d!=="uint8"&&d!=="uint8_clamped";return(!l.length||typeof l=="string")&&(l=i(l),l[0]/=255,l[1]/=255,l[2]/=255),y(l)?(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3]!=null?l[3]:255,u&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(u?(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3]!=null?l[3]:1):(n[0]=m(Math.floor(l[0]*255),0,255),n[1]=m(Math.floor(l[1]*255),0,255),n[2]=m(Math.floor(l[2]*255),0,255),n[3]=l[3]==null?255:m(Math.floor(l[3]*255),0,255)),n)};function y(p){return!!(p instanceof Uint8Array||p instanceof Uint8ClampedArray||Array.isArray(p)&&(p[0]>1||p[0]===0)&&(p[1]>1||p[1]===0)&&(p[2]>1||p[2]===0)&&(!p[3]||p[3]>1))}},90736:function(R,F,e){var i=e(76857),m=e(10973),t=e(46775);R.exports=p;var y={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function p(l){var d,r=[],n=1,u;if(typeof l=="string")if(i[l])r=i[l].slice(),u="rgb";else if(l==="transparent")n=0,u="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(l)){var a=l.slice(1),o=a.length,c=o<=4;n=1,c?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],o===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],o===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),u="rgb"}else if(d=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(l)){var s=d[1],b=s==="rgb",a=s.replace(/a$/,"");u=a;var o=a==="cmyk"?4:a==="gray"?1:3;r=d[2].trim().split(/\s*,\s*/).map(function(h,x){if(/%$/.test(h))return x===o?parseFloat(h)/100:a==="rgb"?parseFloat(h)*255/100:parseFloat(h);if(a[x]==="h"){if(/deg$/.test(h))return parseFloat(h);if(y[h]!==void 0)return y[h]}return parseFloat(h)}),s===a&&r.push(1),n=b||r[o]===void 0?1:r[o],r=r.slice(0,o)}else l.length>10&&/[0-9](?:\s|\/)/.test(l)&&(r=l.match(/([0-9]+)/g).map(function(A){return parseFloat(A)}),u=l.match(/([a-z])/ig).join("").toLowerCase());else if(!isNaN(l))u="rgb",r=[l>>>16,(l&65280)>>>8,l&255];else if(m(l)){var g=t(l.r,l.red,l.R,null);g!==null?(u="rgb",r=[g,t(l.g,l.green,l.G),t(l.b,l.blue,l.B)]):(u="hsl",r=[t(l.h,l.hue,l.H),t(l.s,l.saturation,l.S),t(l.l,l.lightness,l.L,l.b,l.brightness)]),n=t(l.a,l.alpha,l.opacity,1),l.opacity!=null&&(n/=100)}else(Array.isArray(l)||e.g.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(l))&&(r=[l[0],l[1],l[2]],u="rgb",n=l.length===4?l[3]:1);return{space:u,values:r,alpha:n}}},36652:function(R,F,e){var i=e(90736),m=e(80009),t=e(53435);R.exports=function(p){var l,d=i(p);return d.space?(l=Array(3),l[0]=t(d.values[0],0,255),l[1]=t(d.values[1],0,255),l[2]=t(d.values[2],0,255),d.space[0]==="h"&&(l=m.rgb(l)),l.push(t(d.alpha,0,1)),l):[]}},80009:function(R,F,e){var i=e(6866);R.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(m){var t=m[0]/360,y=m[1]/100,p=m[2]/100,l,d,r,n,u;if(y===0)return u=p*255,[u,u,u];p<.5?d=p*(1+y):d=p+y-p*y,l=2*p-d,n=[0,0,0];for(var a=0;a<3;a++)r=t+.3333333333333333*-(a-1),r<0?r++:r>1&&r--,6*r<1?u=l+(d-l)*6*r:2*r<1?u=d:3*r<2?u=l+(d-l)*(.6666666666666666-r)*6:u=l,n[a]=u*255;return n}},i.hsl=function(m){var t=m[0]/255,y=m[1]/255,p=m[2]/255,l=Math.min(t,y,p),d=Math.max(t,y,p),r=d-l,n,u,a;return d===l?n=0:t===d?n=(y-p)/r:y===d?n=2+(p-t)/r:p===d&&(n=4+(t-y)/r),n=Math.min(n*60,360),n<0&&(n+=360),a=(l+d)/2,d===l?u=0:a<=.5?u=r/(d+l):u=r/(2-d-l),[n,u*100,a*100]}},6866:function(R){R.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},24138:function(R){R.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xE7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xE9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xE9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xE3)o.?tom(e|\xE9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},72791:function(R,F,e){R.exports={parse:e(41004),stringify:e(53313)}},63625:function(R,F,e){var i=e(40402);R.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||i.indexOf(t)!==-1}}},41004:function(R,F,e){var i=e(90448),m=e(38732),t=e(41901),y=e(15659),p=e(96209),l=e(83794),d=e(99011),r=e(63625).isSize;R.exports=u;var n=u.cache={};function u(o){if(typeof o!="string")throw new Error("Font argument must be a string.");if(n[o])return n[o];if(o==="")throw new Error("Cannot parse an empty string.");if(t.indexOf(o)!==-1)return n[o]={system:o};for(var c={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},s=d(o,/\s+/),b;b=s.shift();){if(m.indexOf(b)!==-1)return["style","variant","weight","stretch"].forEach(function(A){c[A]=b}),n[o]=c;if(p.indexOf(b)!==-1){c.style=b;continue}if(b==="normal"||b==="small-caps"){c.variant=b;continue}if(l.indexOf(b)!==-1){c.stretch=b;continue}if(y.indexOf(b)!==-1){c.weight=b;continue}if(r(b)){var g=d(b,"/");if(c.size=g[0],g[1]!=null?c.lineHeight=a(g[1]):s[0]==="/"&&(s.shift(),c.lineHeight=a(s.shift())),!s.length)throw new Error("Missing required font-family.");return c.family=d(s.join(" "),/\s*,\s*/).map(i),n[o]=c}throw new Error("Unknown or unsupported font token: "+b)}throw new Error("Missing required font-size.")}function a(o){var c=parseFloat(o);return c.toString()===o?c:o}},53313:function(R,F,e){var i=e(71299),m=e(63625).isSize,t=o(e(38732)),y=o(e(41901)),p=o(e(15659)),l=o(e(96209)),d=o(e(83794)),r={normal:1,"small-caps":1},n={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},u={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};R.exports=function(s){if(s=i(s,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),s.system)return s.system&&a(s.system,y),s.system;if(a(s.style,l),a(s.variant,r),a(s.weight,p),a(s.stretch,d),s.size==null&&(s.size=u.size),typeof s.size=="number"&&(s.size+="px"),!m)throw Error("Bad size value `"+s.size+"`");s.family||(s.family=u.family),Array.isArray(s.family)&&(s.family.length||(s.family=[u.family]),s.family=s.family.map(function(g){return n[g]?g:'"'+g+'"'}).join(", "));var b=[];return b.push(s.style),s.variant!==s.style&&b.push(s.variant),s.weight!==s.variant&&s.weight!==s.style&&b.push(s.weight),s.stretch!==s.weight&&s.stretch!==s.variant&&s.stretch!==s.style&&b.push(s.stretch),b.push(s.size+(s.lineHeight==null||s.lineHeight==="normal"||s.lineHeight+""=="1"?"":"/"+s.lineHeight)),b.push(s.family),b.filter(Boolean).join(" ")};function a(c,s){if(c&&!s[c]&&!t[c])throw Error("Unknown keyword `"+c+"`");return c}function o(c){for(var s={},b=0;bo?1:a>=o?0:NaN}function m(a){return a.length===1&&(a=t(a)),{left:function(o,c,s,b){for(s==null&&(s=0),b==null&&(b=o.length);s>>1;a(o[g],c)<0?s=g+1:b=g}return s},right:function(o,c,s,b){for(s==null&&(s=0),b==null&&(b=o.length);s>>1;a(o[g],c)>0?b=g:s=g+1}return s}}}function t(a){return function(o,c){return i(a(o),c)}}m(i);function y(a,o){var c=a.length,s=-1,b,g;if(o==null){for(;++s=b)for(g=b;++sg&&(g=b)}else for(;++s=b)for(g=b;++sg&&(g=b);return g}function p(a){return a===null?NaN:+a}function l(a,o){var c=a.length,s=c,b=-1,g,A=0;if(o==null)for(;++b=0;)for(A=a[o],c=A.length;--c>=0;)g[--b]=A[c];return g}function r(a,o){var c=a.length,s=-1,b,g;if(o==null){for(;++s=b)for(g=b;++sb&&(g=b)}else for(;++s=b)for(g=b;++sb&&(g=b);return g}function n(a,o,c){a=+a,o=+o,c=(b=arguments.length)<2?(o=a,a=0,1):b<3?1:+c;for(var s=-1,b=Math.max(0,Math.ceil((o-a)/c))|0,g=new Array(b);++s=o.length)return s!=null&&h.sort(s),b!=null?b(h):h;for(var L=-1,w=h.length,M=o[x++],S,f,P=y(),E,k=C();++Lo.length)return h;var C,D=c[x-1];return b!=null&&x>=o.length?C=h.entries():(C=[],h.each(function(L,w){C.push({key:w,values:v(L,x)})})),D!=null?C.sort(function(L,w){return D(L.key,w.key)}):C}return g={object:function(h){return A(h,0,l,d)},map:function(h){return A(h,0,r,n)},entries:function(h){return v(A(h,0,r,n),0)},key:function(h){return o.push(h),g},sortKeys:function(h){return c[o.length-1]=h,g},sortValues:function(h){return s=h,g},rollup:function(h){return b=h,g}}}function l(){return{}}function d(o,c,s){o[c]=s}function r(){return y()}function n(o,c,s){o.set(c,s)}function u(){}var a=y.prototype;u.prototype={constructor:u,has:a.has,add:function(o){return o+="",this[i+o]=o,this},remove:a.remove,clear:a.clear,values:a.keys,size:a.size,empty:a.empty,each:a.each}},49887:function(R,F,e){e.r(F),e.d(F,{forceCenter:function(){return i},forceCollide:function(){return P},forceLink:function(){return G},forceManyBody:function(){return Ye},forceRadial:function(){return Pe},forceSimulation:function(){return _e},forceX:function(){return Ve},forceY:function(){return Ze}});function i(Ke,lt){var vt;Ke==null&&(Ke=0),lt==null&&(lt=0);function mt(){var Et,et=vt.length,Ue,Be=0,rt=0;for(Et=0;Et=(Oe=(Be+ot)/2))?Be=Oe:ot=Oe,(He=vt>=(Ce=(rt+qe)/2))?rt=Ce:qe=Ce,Et=et,!(et=et[st=He<<1|Re]))return Et[st]=Ue,Ke;if(pe=+Ke._x.call(null,et.data),be=+Ke._y.call(null,et.data),lt===pe&&vt===be)return Ue.next=et,Et?Et[st]=Ue:Ke._root=Ue,Ke;do Et=Et?Et[st]=new Array(4):Ke._root=new Array(4),(Re=lt>=(Oe=(Be+ot)/2))?Be=Oe:ot=Oe,(He=vt>=(Ce=(rt+qe)/2))?rt=Ce:qe=Ce;while((st=He<<1|Re)===(ct=(be>=Ce)<<1|pe>=Oe));return Et[ct]=et,Et[st]=Ue,Ke}function l(Ke){var lt,vt,mt=Ke.length,Et,et,Ue=new Array(mt),Be=new Array(mt),rt=1/0,ot=1/0,qe=-1/0,Oe=-1/0;for(vt=0;vtqe&&(qe=Et),etOe&&(Oe=et));if(rt>qe||ot>Oe)return this;for(this.cover(rt,ot).cover(qe,Oe),vt=0;vtKe||Ke>=Et||mt>lt||lt>=et;)switch(ot=(ltqe||(Be=be.y0)>Oe||(rt=be.x1)=st)<<1|Ke>=He)&&(be=Ce[Ce.length-1],Ce[Ce.length-1]=Ce[Ce.length-1-Re],Ce[Ce.length-1-Re]=be)}else{var ct=Ke-+this._x.call(null,pe.data),bt=lt-+this._y.call(null,pe.data),Lt=ct*ct+bt*bt;if(Lt=(Ce=(Ue+rt)/2))?Ue=Ce:rt=Ce,(Re=Oe>=(pe=(Be+ot)/2))?Be=pe:ot=pe,lt=vt,!(vt=vt[He=Re<<1|be]))return this;if(!vt.length)break;(lt[He+1&3]||lt[He+2&3]||lt[He+3&3])&&(mt=lt,st=He)}for(;vt.data!==Ke;)if(Et=vt,!(vt=vt.next))return this;return(et=vt.next)&&delete vt.next,Et?(et?Et.next=et:delete Et.next,this):lt?(et?lt[He]=et:delete lt[He],(vt=lt[0]||lt[1]||lt[2]||lt[3])&&vt===(lt[3]||lt[2]||lt[1]||lt[0])&&!vt.length&&(mt?mt[st]=vt:this._root=vt),this):(this._root=et,this)}function c(Ke){for(var lt=0,vt=Ke.length;ltOe.index){var Or=Ce-Ft.x-Ft.vx,xt=pe-Ft.y-Ft.vy,jt=Or*Or+xt*xt;jtCe+lr||Utpe+lr||Gtrt.r&&(rt.r=rt[ot].r)}function Be(){if(!!lt){var rt,ot=lt.length,qe;for(vt=new Array(ot),rt=0;rt=0&&(mt=vt.slice(Et+1),vt=vt.slice(0,Et)),vt&&!lt.hasOwnProperty(vt))throw new Error("unknown type: "+vt);return{type:vt,name:mt}})}H.prototype=U.prototype={constructor:H,on:function(Ke,lt){var vt=this._,mt=B(Ke+"",vt),Et,et=-1,Ue=mt.length;if(arguments.length<2){for(;++et0)for(var vt=new Array(Et),mt=0,Et,et;mt=0&&Ke._call.call(null,lt),Ke=Ke._next;--ie}function Te(){ae=(Q=te.now())+fe,ie=le=0;try{Se()}finally{ie=0,Ie(),ae=0}}function Fe(){var Ke=te.now(),lt=Ke-Q;lt>$&&(fe-=lt,Q=Ke)}function Ie(){for(var Ke,lt=Z,vt,mt=1/0;lt;)lt._call?(mt>lt._time&&(mt=lt._time),Ke=lt,lt=lt._next):(vt=lt._next,lt._next=null,lt=Ke?Ke._next=vt:Z=vt);K=Ke,Me(mt)}function Me(Ke){if(!ie){le&&(le=clearTimeout(le));var lt=Ke-ae;lt>24?(Ke<1/0&&(le=setTimeout(Te,Ke-te.now()-fe)),he&&(he=clearInterval(he))):(he||(Q=te.now(),he=setInterval(Fe,$)),ie=1,ne(Te))}}function Ae(Ke){return Ke.x}function De(Ke){return Ke.y}var ke=10,We=Math.PI*(3-Math.sqrt(5));function _e(Ke){var lt,vt=1,mt=.001,Et=1-Math.pow(mt,1/300),et=0,Ue=.6,Be=(0,E.UI)(),rt=we(qe),ot=re("tick","end");Ke==null&&(Ke=[]);function qe(){Oe(),ot.call("tick",lt),vt1?(Re==null?Be.remove(be):Be.set(be,pe(Re)),lt):Be.get(be)},find:function(be,Re,He){var st=0,ct=Ke.length,bt,Lt,Ut,Gt,Ft;for(He==null?He=1/0:He*=He,st=0;st1?(ot.on(be,Re),lt):ot.on(be)}}}function Ye(){var Ke,lt,vt,mt=m(-30),Et,et=1,Ue=1/0,Be=.81;function rt(Ce){var pe,be=Ke.length,Re=D(Ke,Ae,De).visitAfter(qe);for(vt=Ce,pe=0;pe=Ue)return;(Ce.data!==lt||Ce.next)&&(He===0&&(He=t(),bt+=He*He),st===0&&(st=t(),bt+=st*st),bt=1e21?C.toLocaleString("en").replace(/,/g,""):C.toString(10)}function m(C,D){if((L=(C=D?C.toExponential(D-1):C.toExponential()).indexOf("e"))<0)return null;var L,w=C.slice(0,L);return[w.length>1?w[0]+w.slice(2):w,+C.slice(L+1)]}function t(C){return C=m(Math.abs(C)),C?C[1]:NaN}function y(C,D){return function(L,w){for(var M=L.length,S=[],f=0,P=C[0],E=0;M>0&&P>0&&(E+P+1>w&&(P=Math.max(1,w-E)),S.push(L.substring(M-=P,M+P)),!((E+=P+1)>w));)P=C[f=(f+1)%C.length];return S.reverse().join(D)}}function p(C){return function(D){return D.replace(/[0-9]/g,function(L){return C[+L]})}}var l=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function d(C){if(!(D=l.exec(C)))throw new Error("invalid format: "+C);var D;return new r({fill:D[1],align:D[2],sign:D[3],symbol:D[4],zero:D[5],width:D[6],comma:D[7],precision:D[8]&&D[8].slice(1),trim:D[9],type:D[10]})}d.prototype=r.prototype;function r(C){this.fill=C.fill===void 0?" ":C.fill+"",this.align=C.align===void 0?">":C.align+"",this.sign=C.sign===void 0?"-":C.sign+"",this.symbol=C.symbol===void 0?"":C.symbol+"",this.zero=!!C.zero,this.width=C.width===void 0?void 0:+C.width,this.comma=!!C.comma,this.precision=C.precision===void 0?void 0:+C.precision,this.trim=!!C.trim,this.type=C.type===void 0?"":C.type+""}r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function n(C){e:for(var D=C.length,L=1,w=-1,M;L0&&(w=0);break}return w>0?C.slice(0,w)+C.slice(M+1):C}var u;function a(C,D){var L=m(C,D);if(!L)return C+"";var w=L[0],M=L[1],S=M-(u=Math.max(-8,Math.min(8,Math.floor(M/3)))*3)+1,f=w.length;return S===f?w:S>f?w+new Array(S-f+1).join("0"):S>0?w.slice(0,S)+"."+w.slice(S):"0."+new Array(1-S).join("0")+m(C,Math.max(0,D+S-1))[0]}function o(C,D){var L=m(C,D);if(!L)return C+"";var w=L[0],M=L[1];return M<0?"0."+new Array(-M).join("0")+w:w.length>M+1?w.slice(0,M+1)+"."+w.slice(M+1):w+new Array(M-w.length+2).join("0")}var c={"%":function(C,D){return(C*100).toFixed(D)},b:function(C){return Math.round(C).toString(2)},c:function(C){return C+""},d:i,e:function(C,D){return C.toExponential(D)},f:function(C,D){return C.toFixed(D)},g:function(C,D){return C.toPrecision(D)},o:function(C){return Math.round(C).toString(8)},p:function(C,D){return o(C*100,D)},r:o,s:a,X:function(C){return Math.round(C).toString(16).toUpperCase()},x:function(C){return Math.round(C).toString(16)}};function s(C){return C}var b=Array.prototype.map,g=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function A(C){var D=C.grouping===void 0||C.thousands===void 0?s:y(b.call(C.grouping,Number),C.thousands+""),L=C.currency===void 0?"":C.currency[0]+"",w=C.currency===void 0?"":C.currency[1]+"",M=C.decimal===void 0?".":C.decimal+"",S=C.numerals===void 0?s:p(b.call(C.numerals,String)),f=C.percent===void 0?"%":C.percent+"",P=C.minus===void 0?"-":C.minus+"",E=C.nan===void 0?"NaN":C.nan+"";function k(G){G=d(G);var z=G.fill,U=G.align,H=G.sign,B=G.symbol,W=G.zero,q=G.width,re=G.comma,ie=G.precision,le=G.trim,he=G.type;he==="n"?(re=!0,he="g"):c[he]||(ie===void 0&&(ie=12),le=!0,he="g"),(W||z==="0"&&U==="=")&&(W=!0,z="0",U="=");var $=B==="$"?L:B==="#"&&/[boxX]/.test(he)?"0"+he.toLowerCase():"",Z=B==="$"?w:/[%p]/.test(he)?f:"",K=c[he],Q=/[defgprs%]/.test(he);ie=ie===void 0?6:/[gprs]/.test(he)?Math.max(1,Math.min(21,ie)):Math.max(0,Math.min(20,ie));function ae(fe){var te=$,ne=Z,ce,oe,de;if(he==="c")ne=K(fe)+ne,fe="";else{fe=+fe;var we=fe<0||1/fe<0;if(fe=isNaN(fe)?E:K(Math.abs(fe),ie),le&&(fe=n(fe)),we&&+fe==0&&H!=="+"&&(we=!1),te=(we?H==="("?H:P:H==="-"||H==="("?"":H)+te,ne=(he==="s"?g[8+u/3]:"")+ne+(we&&H==="("?")":""),Q){for(ce=-1,oe=fe.length;++cede||de>57){ne=(de===46?M+fe.slice(ce+1):fe.slice(ce))+ne,fe=fe.slice(0,ce);break}}}re&&!W&&(fe=D(fe,1/0));var Se=te.length+fe.length+ne.length,Te=Se>1)+te+fe+ne+Te.slice(Se);break;default:fe=Te+te+fe+ne;break}return S(fe)}return ae.toString=function(){return G+""},ae}function O(G,z){var U=k((G=d(G),G.type="f",G)),H=Math.max(-8,Math.min(8,Math.floor(t(z)/3)))*3,B=Math.pow(10,-H),W=g[8+H/3];return function(q){return U(B*q)+W}}return{format:k,formatPrefix:O}}var v,h;x({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function x(C){return v=A(C),h=v.format,v.formatPrefix,v}},65704:function(R,F,e){e.r(F),e.d(F,{geoAiry:function(){return W},geoAiryRaw:function(){return B},geoAitoff:function(){return re},geoAitoffRaw:function(){return q},geoArmadillo:function(){return le},geoArmadilloRaw:function(){return ie},geoAugust:function(){return $},geoAugustRaw:function(){return he},geoBaker:function(){return ae},geoBakerRaw:function(){return Q},geoBerghaus:function(){return ne},geoBerghausRaw:function(){return te},geoBertin1953:function(){return Ie},geoBertin1953Raw:function(){return Fe},geoBoggs:function(){return Pe},geoBoggsRaw:function(){return Ye},geoBonne:function(){return vt},geoBonneRaw:function(){return lt},geoBottomley:function(){return Et},geoBottomleyRaw:function(){return mt},geoBromley:function(){return Ue},geoBromleyRaw:function(){return et},geoChamberlin:function(){return Re},geoChamberlinAfrica:function(){return be},geoChamberlinRaw:function(){return Ce},geoCollignon:function(){return st},geoCollignonRaw:function(){return He},geoCraig:function(){return bt},geoCraigRaw:function(){return ct},geoCraster:function(){return Gt},geoCrasterRaw:function(){return Ut},geoCylindricalEqualArea:function(){return tr},geoCylindricalEqualAreaRaw:function(){return Ft},geoCylindricalStereographic:function(){return Or},geoCylindricalStereographicRaw:function(){return lr},geoEckert1:function(){return jt},geoEckert1Raw:function(){return xt},geoEckert2:function(){return br},geoEckert2Raw:function(){return Yt},geoEckert3:function(){return ht},geoEckert3Raw:function(){return dr},geoEckert4:function(){return wt},geoEckert4Raw:function(){return ut},geoEckert5:function(){return Dt},geoEckert5Raw:function(){return St},geoEckert6:function(){return zt},geoEckert6Raw:function(){return Mt},geoEisenlohr:function(){return $t},geoEisenlohrRaw:function(){return Kt},geoFahey:function(){return Xe},geoFaheyRaw:function(){return Mr},geoFoucaut:function(){return It},geoFoucautRaw:function(){return je},geoFoucautSinusoidal:function(){return Zt},geoFoucautSinusoidalRaw:function(){return _t},geoGilbert:function(){return hr},geoGingery:function(){return Jr},geoGingeryRaw:function(){return pr},geoGinzburg4:function(){return wn},geoGinzburg4Raw:function(){return Br},geoGinzburg5:function(){return Fn},geoGinzburg5Raw:function(){return Kr},geoGinzburg6:function(){return mr},geoGinzburg6Raw:function(){return In},geoGinzburg8:function(){return zr},geoGinzburg8Raw:function(){return cr},geoGinzburg9:function(){return un},geoGinzburg9Raw:function(){return kr},geoGringorten:function(){return Qn},geoGringortenQuincuncial:function(){return fd},geoGringortenRaw:function(){return An},geoGuyou:function(){return pn},geoGuyouRaw:function(){return Nr},geoHammer:function(){return we},geoHammerRaw:function(){return oe},geoHammerRetroazimuthal:function(){return Gn},geoHammerRetroazimuthalRaw:function(){return Dn},geoHealpix:function(){return cn},geoHealpixRaw:function(){return on},geoHill:function(){return Er},geoHillRaw:function(){return Pr},geoHomolosine:function(){return kn},geoHomolosineRaw:function(){return gn},geoHufnagel:function(){return ca},geoHufnagelRaw:function(){return ea},geoHyperelliptical:function(){return Po},geoHyperellipticalRaw:function(){return ya},geoInterrupt:function(){return ts},geoInterruptedBoggs:function(){return pi},geoInterruptedHomolosine:function(){return Fu},geoInterruptedMollweide:function(){return ls},geoInterruptedMollweideHemispheres:function(){return pf},geoInterruptedQuarticAuthalic:function(){return Zc},geoInterruptedSinuMollweide:function(){return gf},geoInterruptedSinusoidal:function(){return So},geoKavrayskiy7:function(){return jo},geoKavrayskiy7Raw:function(){return ys},geoLagrange:function(){return el},geoLagrangeRaw:function(){return Es},geoLarrivee:function(){return kh},geoLarriveeRaw:function(){return Oo},geoLaskowski:function(){return zo},geoLaskowskiRaw:function(){return tl},geoLittrow:function(){return Ml},geoLittrowRaw:function(){return Uc},geoLoximuthal:function(){return Hc},geoLoximuthalRaw:function(){return rl},geoMiller:function(){return jv},geoMillerRaw:function(){return Vc},geoModifiedStereographic:function(){return fu},geoModifiedStereographicAlaska:function(){return qv},geoModifiedStereographicGs48:function(){return Bh},geoModifiedStereographicGs50:function(){return ed},geoModifiedStereographicLee:function(){return Wc},geoModifiedStereographicMiller:function(){return td},geoModifiedStereographicRaw:function(){return mf},geoMollweide:function(){return ke},geoMollweideRaw:function(){return De},geoMtFlatPolarParabolic:function(){return rd},geoMtFlatPolarParabolicRaw:function(){return tc},geoMtFlatPolarQuartic:function(){return Uh},geoMtFlatPolarQuarticRaw:function(){return Sl},geoMtFlatPolarSinusoidal:function(){return nd},geoMtFlatPolarSinusoidalRaw:function(){return Yc},geoNaturalEarth:function(){return Cs.Z},geoNaturalEarth2:function(){return yf},geoNaturalEarth2Raw:function(){return hu},geoNaturalEarthRaw:function(){return Cs.K},geoNellHammer:function(){return nl},geoNellHammerRaw:function(){return _u},geoNicolosi:function(){return Wl},geoNicolosiRaw:function(){return Ou},geoPatterson:function(){return ad},geoPattersonRaw:function(){return nc},geoPeirceQuincuncial:function(){return Yh},geoPierceQuincuncial:function(){return Yh},geoPolyconic:function(){return id},geoPolyconicRaw:function(){return jc},geoPolyhedral:function(){return _i},geoPolyhedralButterfly:function(){return Cl},geoPolyhedralCollignon:function(){return Zl},geoPolyhedralWaterman:function(){return Xl},geoProject:function(){return ld},geoQuantize:function(){return Zh},geoQuincuncial:function(){return lc},geoRectangularPolyconic:function(){return jl},geoRectangularPolyconicRaw:function(){return eh},geoRobinson:function(){return th},geoRobinsonRaw:function(){return il},geoSatellite:function(){return uc},geoSatelliteRaw:function(){return pu},geoSinuMollweide:function(){return Yn},geoSinuMollweideRaw:function(){return On},geoSinusoidal:function(){return Ke},geoSinusoidalRaw:function(){return Ze},geoStitch:function(){return yu},geoTimes:function(){return xs},geoTimesRaw:function(){return cs},geoTwoPointAzimuthal:function(){return vc},geoTwoPointAzimuthalRaw:function(){return $h},geoTwoPointAzimuthalUsa:function(){return Wu},geoTwoPointEquidistant:function(){return ih},geoTwoPointEquidistantRaw:function(){return Kh},geoTwoPointEquidistantUsa:function(){return Hs},geoVanDerGrinten:function(){return Ef},geoVanDerGrinten2:function(){return hd},geoVanDerGrinten2Raw:function(){return Rl},geoVanDerGrinten3:function(){return dc},geoVanDerGrinten3Raw:function(){return oh},geoVanDerGrinten4:function(){return Jh},geoVanDerGrinten4Raw:function(){return $o},geoVanDerGrintenRaw:function(){return Jl},geoWagner:function(){return Df},geoWagner4:function(){return lh},geoWagner4Raw:function(){return sh},geoWagner6:function(){return gc},geoWagner6Raw:function(){return bu},geoWagner7:function(){return Ql},geoWagnerRaw:function(){return ol},geoWiechel:function(){return qh},geoWiechelRaw:function(){return Lf},geoWinkel3:function(){return ev},geoWinkel3Raw:function(){return Pf}});var i=e(15002),m=Math.abs,t=Math.atan,y=Math.atan2,p=Math.cos,l=Math.exp,d=Math.floor,r=Math.log,n=Math.max,u=Math.min,a=Math.pow,o=Math.round,c=Math.sign||function(Je){return Je>0?1:Je<0?-1:0},s=Math.sin,b=Math.tan,g=1e-6,A=1e-12,v=Math.PI,h=v/2,x=v/4,C=Math.SQRT1_2,D=k(2),L=k(v),w=v*2,M=180/v,S=v/180;function f(Je){return Je?Je/Math.sin(Je):1}function P(Je){return Je>1?h:Je<-1?-h:Math.asin(Je)}function E(Je){return Je>1?0:Je<-1?v:Math.acos(Je)}function k(Je){return Je>0?Math.sqrt(Je):0}function O(Je){return Je=l(2*Je),(Je-1)/(Je+1)}function G(Je){return(l(Je)-l(-Je))/2}function z(Je){return(l(Je)+l(-Je))/2}function U(Je){return r(Je+k(Je*Je+1))}function H(Je){return r(Je+k(Je*Je-1))}function B(Je){var at=b(Je/2),gt=2*r(p(Je/2))/(at*at);function yt(Rt,Pt){var Ot=p(Rt),fr=p(Pt),gr=s(Pt),ar=fr*Ot,Tr=-((1-ar?r((1+ar)/2)/(1-ar):-.5)+gt/(1+ar));return[Tr*fr*s(Rt),Tr*gr]}return yt.invert=function(Rt,Pt){var Ot=k(Rt*Rt+Pt*Pt),fr=-Je/2,gr=50,ar;if(!Ot)return[0,0];do{var Tr=fr/2,Dr=p(Tr),Yr=s(Tr),Qr=Yr/Dr,mn=-r(m(Dr));fr-=ar=(2/Qr*mn-gt*Qr-Ot)/(-mn/(Yr*Yr)+1-gt/(2*Dr*Dr))*(Dr<0?.7:1)}while(m(ar)>g&&--gr>0);var Tn=s(fr);return[y(Rt*Tn,Ot*p(fr)),P(Pt*Tn/Ot)]},yt}function W(){var Je=h,at=(0,i.r)(B),gt=at(Je);return gt.radius=function(yt){return arguments.length?at(Je=yt*S):Je*M},gt.scale(179.976).clipAngle(147)}function q(Je,at){var gt=p(at),yt=f(E(gt*p(Je/=2)));return[2*gt*s(Je)*yt,s(at)*yt]}q.invert=function(Je,at){if(!(Je*Je+4*at*at>v*v+g)){var gt=Je,yt=at,Rt=25;do{var Pt=s(gt),Ot=s(gt/2),fr=p(gt/2),gr=s(yt),ar=p(yt),Tr=s(2*yt),Dr=gr*gr,Yr=ar*ar,Qr=Ot*Ot,mn=1-Yr*fr*fr,Tn=mn?E(ar*fr)*k(Nn=1/mn):Nn=0,Nn,pa=2*Tn*ar*Ot-Je,Na=Tn*gr-at,Ia=Nn*(Yr*Qr+Tn*ar*fr*Dr),_a=Nn*(.5*Pt*Tr-Tn*2*gr*Ot),za=Nn*.25*(Tr*Ot-Tn*gr*Yr*Pt),Ai=Nn*(Dr*fr+Tn*Qr*ar),to=_a*za-Ai*Ia;if(!to)break;var Oi=(Na*_a-pa*Ai)/to,ve=(pa*za-Na*Ia)/to;gt-=Oi,yt-=ve}while((m(Oi)>g||m(ve)>g)&&--Rt>0);return[gt,yt]}};function re(){return(0,i.Z)(q).scale(152.63)}function ie(Je){var at=s(Je),gt=p(Je),yt=Je>=0?1:-1,Rt=b(yt*Je),Pt=(1+at-gt)/2;function Ot(fr,gr){var ar=p(gr),Tr=p(fr/=2);return[(1+ar)*s(fr),(yt*gr>-y(Tr,Rt)-.001?0:-yt*10)+Pt+s(gr)*gt-(1+ar)*at*Tr]}return Ot.invert=function(fr,gr){var ar=0,Tr=0,Dr=50;do{var Yr=p(ar),Qr=s(ar),mn=p(Tr),Tn=s(Tr),Nn=1+mn,pa=Nn*Qr-fr,Na=Pt+Tn*gt-Nn*at*Yr-gr,Ia=Nn*Yr/2,_a=-Qr*Tn,za=at*Nn*Qr/2,Ai=gt*mn+at*Yr*Tn,to=_a*za-Ai*Ia,Oi=(Na*_a-pa*Ai)/to/2,ve=(pa*za-Na*Ia)/to;m(ve)>2&&(ve/=2),ar-=Oi,Tr-=ve}while((m(Oi)>g||m(ve)>g)&&--Dr>0);return yt*Tr>-y(p(ar),Rt)-.001?[ar*2,Tr]:null},Ot}function le(){var Je=20*S,at=Je>=0?1:-1,gt=b(at*Je),yt=(0,i.r)(ie),Rt=yt(Je),Pt=Rt.stream;return Rt.parallel=function(Ot){return arguments.length?(gt=b((at=(Je=Ot*S)>=0?1:-1)*Je),yt(Je)):Je*M},Rt.stream=function(Ot){var fr=Rt.rotate(),gr=Pt(Ot),ar=(Rt.rotate([0,0]),Pt(Ot)),Tr=Rt.precision();return Rt.rotate(fr),gr.sphere=function(){ar.polygonStart(),ar.lineStart();for(var Dr=at*-180;at*Dr<180;Dr+=at*90)ar.point(Dr,at*90);if(Je)for(;at*(Dr-=3*at*Tr)>=-180;)ar.point(Dr,at*-y(p(Dr*S/2),gt)*M);ar.lineEnd(),ar.polygonEnd()},gr},Rt.scale(218.695).center([0,28.0974])}function he(Je,at){var gt=b(at/2),yt=k(1-gt*gt),Rt=1+yt*p(Je/=2),Pt=s(Je)*yt/Rt,Ot=gt/Rt,fr=Pt*Pt,gr=Ot*Ot;return[1.3333333333333333*Pt*(3+fr-3*gr),1.3333333333333333*Ot*(3+3*fr-gr)]}he.invert=function(Je,at){if(Je*=.375,at*=.375,!Je&&m(at)>1)return null;var gt=Je*Je,yt=at*at,Rt=1+gt+yt,Pt=k((Rt-k(Rt*Rt-4*at*at))/2),Ot=P(Pt)/3,fr=Pt?H(m(at/Pt))/3:U(m(Je))/3,gr=p(Ot),ar=z(fr),Tr=ar*ar-gr*gr;return[c(Je)*2*y(G(fr)*gr,.25-Tr),c(at)*2*y(ar*s(Ot),.25+Tr)]};function $(){return(0,i.Z)(he).scale(66.1603)}var Z=k(8),K=r(1+D);function Q(Je,at){var gt=m(at);return gtA&&--yt>0);return[Je/(p(gt)*(Z-1/s(gt))),c(at)*gt]};function ae(){return(0,i.Z)(Q).scale(112.314)}var fe=e(17889);function te(Je){var at=2*v/Je;function gt(yt,Rt){var Pt=(0,fe.N)(yt,Rt);if(m(yt)>h){var Ot=y(Pt[1],Pt[0]),fr=k(Pt[0]*Pt[0]+Pt[1]*Pt[1]),gr=at*o((Ot-h)/at)+h,ar=y(s(Ot-=gr),2-p(Ot));Ot=gr+P(v/fr*s(ar))-ar,Pt[0]=fr*p(Ot),Pt[1]=fr*s(Ot)}return Pt}return gt.invert=function(yt,Rt){var Pt=k(yt*yt+Rt*Rt);if(Pt>h){var Ot=y(Rt,yt),fr=at*o((Ot-h)/at)+h,gr=Ot>fr?-1:1,ar=Pt*p(fr-Ot),Tr=1/b(gr*E((ar-v)/k(v*(v-2*ar)+Pt*Pt)));Ot=fr+2*t((Tr+gr*k(Tr*Tr-3))/3),yt=Pt*p(Ot),Rt=Pt*s(Ot)}return fe.N.invert(yt,Rt)},gt}function ne(){var Je=5,at=(0,i.r)(te),gt=at(Je),yt=gt.stream,Rt=.01,Pt=-p(Rt*S),Ot=s(Rt*S);return gt.lobes=function(fr){return arguments.length?at(Je=+fr):Je},gt.stream=function(fr){var gr=gt.rotate(),ar=yt(fr),Tr=(gt.rotate([0,0]),yt(fr));return gt.rotate(gr),ar.sphere=function(){Tr.polygonStart(),Tr.lineStart();for(var Dr=0,Yr=360/Je,Qr=2*v/Je,mn=90-180/Je,Tn=h;Dr0&&m(Rt)>g);return yt<0?NaN:gt}function Te(Je,at,gt){return at===void 0&&(at=40),gt===void 0&&(gt=A),function(yt,Rt,Pt,Ot){var fr,gr,ar;Pt=Pt===void 0?0:+Pt,Ot=Ot===void 0?0:+Ot;for(var Tr=0;Trfr){Pt-=gr/=2,Ot-=ar/=2;continue}fr=mn;var Tn=(Pt>0?-1:1)*gt,Nn=(Ot>0?-1:1)*gt,pa=Je(Pt+Tn,Ot),Na=Je(Pt,Ot+Nn),Ia=(pa[0]-Dr[0])/Tn,_a=(pa[1]-Dr[1])/Tn,za=(Na[0]-Dr[0])/Nn,Ai=(Na[1]-Dr[1])/Nn,to=Ai*Ia-_a*za,Oi=(m(to)<.5?.5:1)/to;if(gr=(Qr*za-Yr*Ai)*Oi,ar=(Yr*_a-Qr*Ia)*Oi,Pt+=gr,Ot+=ar,m(gr)0&&(fr[1]*=1+gr/1.5*fr[0]*fr[0]),fr}return yt.invert=Te(yt),yt}function Ie(){return(0,i.Z)(Fe()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Me(Je,at){var gt=Je*s(at),yt=30,Rt;do at-=Rt=(at+s(at)-gt)/(1+p(at));while(m(Rt)>g&&--yt>0);return at/2}function Ae(Je,at,gt){function yt(Rt,Pt){return[Je*Rt*p(Pt=Me(gt,Pt)),at*s(Pt)]}return yt.invert=function(Rt,Pt){return Pt=P(Pt/at),[Rt/(Je*p(Pt)),P((2*Pt+s(2*Pt))/gt)]},yt}var De=Ae(D/h,D,v);function ke(){return(0,i.Z)(De).scale(169.529)}var We=2.00276,_e=1.11072;function Ye(Je,at){var gt=Me(v,at);return[We*Je/(1/p(at)+_e/p(gt)),(at+D*s(gt))/We]}Ye.invert=function(Je,at){var gt=We*at,yt=at<0?-x:x,Rt=25,Pt,Ot;do Ot=gt-D*s(yt),yt-=Pt=(s(2*yt)+2*yt-v*s(Ot))/(2*p(2*yt)+2+v*p(Ot)*D*p(yt));while(m(Pt)>g&&--Rt>0);return Ot=gt-D*s(yt),[Je*(1/p(Ot)+_e/p(yt))/We,Ot]};function Pe(){return(0,i.Z)(Ye).scale(160.857)}function Ve(Je){var at=0,gt=(0,i.r)(Je),yt=gt(at);return yt.parallel=function(Rt){return arguments.length?gt(at=Rt*S):at*M},yt}function Ze(Je,at){return[Je*p(at),at]}Ze.invert=function(Je,at){return[Je/p(at),at]};function Ke(){return(0,i.Z)(Ze).scale(152.63)}function lt(Je){if(!Je)return Ze;var at=1/b(Je);function gt(yt,Rt){var Pt=at+Je-Rt,Ot=Pt&&yt*p(Rt)/Pt;return[Pt*s(Ot),at-Pt*p(Ot)]}return gt.invert=function(yt,Rt){var Pt=k(yt*yt+(Rt=at-Rt)*Rt),Ot=at+Je-Pt;return[Pt/p(Ot)*y(yt,Rt),Ot]},gt}function vt(){return Ve(lt).scale(123.082).center([0,26.1441]).parallel(45)}function mt(Je){function at(gt,yt){var Rt=h-yt,Pt=Rt&>*Je*s(Rt)/Rt;return[Rt*s(Pt)/Je,h-Rt*p(Pt)]}return at.invert=function(gt,yt){var Rt=gt*Je,Pt=h-yt,Ot=k(Rt*Rt+Pt*Pt),fr=y(Rt,Pt);return[(Ot?Ot/s(Ot):1)*fr/Je,h-Ot]},at}function Et(){var Je=.5,at=(0,i.r)(mt),gt=at(Je);return gt.fraction=function(yt){return arguments.length?at(Je=+yt):Je},gt.scale(158.837)}var et=Ae(1,4/v,v);function Ue(){return(0,i.Z)(et).scale(152.63)}var Be=e(66624),rt=e(49386);function ot(Je,at,gt,yt,Rt,Pt){var Ot=p(Pt),fr;if(m(Je)>1||m(Pt)>1)fr=E(gt*Rt+at*yt*Ot);else{var gr=s(Je/2),ar=s(Pt/2);fr=2*P(k(gr*gr+at*yt*ar*ar))}return m(fr)>g?[fr,y(yt*s(Pt),at*Rt-gt*yt*Ot)]:[0,0]}function qe(Je,at,gt){return E((Je*Je+at*at-gt*gt)/(2*Je*at))}function Oe(Je){return Je-2*v*d((Je+v)/(2*v))}function Ce(Je,at,gt){for(var yt=[[Je[0],Je[1],s(Je[1]),p(Je[1])],[at[0],at[1],s(at[1]),p(at[1])],[gt[0],gt[1],s(gt[1]),p(gt[1])]],Rt=yt[2],Pt,Ot=0;Ot<3;++Ot,Rt=Pt)Pt=yt[Ot],Rt.v=ot(Pt[1]-Rt[1],Rt[3],Rt[2],Pt[3],Pt[2],Pt[0]-Rt[0]),Rt.point=[0,0];var fr=qe(yt[0].v[0],yt[2].v[0],yt[1].v[0]),gr=qe(yt[0].v[0],yt[1].v[0],yt[2].v[0]),ar=v-fr;yt[2].point[1]=0,yt[0].point[0]=-(yt[1].point[0]=yt[0].v[0]/2);var Tr=[yt[2].point[0]=yt[0].point[0]+yt[2].v[0]*p(fr),2*(yt[0].point[1]=yt[1].point[1]=yt[2].v[0]*s(fr))];function Dr(Yr,Qr){var mn=s(Qr),Tn=p(Qr),Nn=new Array(3),pa;for(pa=0;pa<3;++pa){var Na=yt[pa];if(Nn[pa]=ot(Qr-Na[1],Na[3],Na[2],Tn,mn,Yr-Na[0]),!Nn[pa][0])return Na.point;Nn[pa][1]=Oe(Nn[pa][1]-Na.v[1])}var Ia=Tr.slice();for(pa=0;pa<3;++pa){var _a=pa==2?0:pa+1,za=qe(yt[pa].v[0],Nn[pa][0],Nn[_a][0]);Nn[pa][1]<0&&(za=-za),pa?pa==1?(za=gr-za,Ia[0]-=Nn[pa][0]*p(za),Ia[1]-=Nn[pa][0]*s(za)):(za=ar-za,Ia[0]+=Nn[pa][0]*p(za),Ia[1]+=Nn[pa][0]*s(za)):(Ia[0]+=Nn[pa][0]*p(za),Ia[1]-=Nn[pa][0]*s(za))}return Ia[0]/=3,Ia[1]/=3,Ia}return Dr}function pe(Je){return Je[0]*=S,Je[1]*=S,Je}function be(){return Re([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Re(Je,at,gt){var yt=(0,Be.Z)({type:"MultiPoint",coordinates:[Je,at,gt]}),Rt=[-yt[0],-yt[1]],Pt=(0,rt.Z)(Rt),Ot=Ce(pe(Pt(Je)),pe(Pt(at)),pe(Pt(gt)));Ot.invert=Te(Ot);var fr=(0,i.Z)(Ot).rotate(Rt),gr=fr.center;return delete fr.rotate,fr.center=function(ar){return arguments.length?gr(Pt(ar)):Pt.invert(gr())},fr.clipAngle(90)}function He(Je,at){var gt=k(1-s(at));return[2/L*Je*gt,L*(1-gt)]}He.invert=function(Je,at){var gt=(gt=at/L-1)*gt;return[gt>0?Je*k(v/gt)/2:0,P(1-gt)]};function st(){return(0,i.Z)(He).scale(95.6464).center([0,30])}function ct(Je){var at=b(Je);function gt(yt,Rt){return[yt,(yt?yt/s(yt):1)*(s(Rt)*p(yt)-at*p(Rt))]}return gt.invert=at?function(yt,Rt){yt&&(Rt*=s(yt)/yt);var Pt=p(yt);return[yt,2*y(k(Pt*Pt+at*at-Rt*Rt)-Pt,at-Rt)]}:function(yt,Rt){return[yt,P(yt?Rt*b(yt)/yt:Rt)]},gt}function bt(){return Ve(ct).scale(249.828).clipAngle(90)}var Lt=k(3);function Ut(Je,at){return[Lt*Je*(2*p(2*at/3)-1)/L,Lt*L*s(at/3)]}Ut.invert=function(Je,at){var gt=3*P(at/(Lt*L));return[L*Je/(Lt*(2*p(2*gt/3)-1)),gt]};function Gt(){return(0,i.Z)(Ut).scale(156.19)}function Ft(Je){var at=p(Je);function gt(yt,Rt){return[yt*at,s(Rt)/at]}return gt.invert=function(yt,Rt){return[yt/at,P(Rt*at)]},gt}function tr(){return Ve(Ft).parallel(38.58).scale(195.044)}function lr(Je){var at=p(Je);function gt(yt,Rt){return[yt*at,(1+at)*b(Rt/2)]}return gt.invert=function(yt,Rt){return[yt/at,t(Rt/(1+at))*2]},gt}function Or(){return Ve(lr).scale(124.75)}function xt(Je,at){var gt=k(8/(3*v));return[gt*Je*(1-m(at)/v),gt*at]}xt.invert=function(Je,at){var gt=k(8/(3*v)),yt=at/gt;return[Je/(gt*(1-m(yt)/v)),yt]};function jt(){return(0,i.Z)(xt).scale(165.664)}function Yt(Je,at){var gt=k(4-3*s(m(at)));return[2/k(6*v)*Je*gt,c(at)*k(2*v/3)*(2-gt)]}Yt.invert=function(Je,at){var gt=2-m(at)/k(2*v/3);return[Je*k(6*v)/(2*gt),c(at)*P((4-gt*gt)/3)]};function br(){return(0,i.Z)(Yt).scale(165.664)}function dr(Je,at){var gt=k(v*(4+v));return[2/gt*Je*(1+k(1-4*at*at/(v*v))),4/gt*at]}dr.invert=function(Je,at){var gt=k(v*(4+v))/2;return[Je*gt/(1+k(1-at*at*(4+v)/(4*v))),at*gt/2]};function ht(){return(0,i.Z)(dr).scale(180.739)}function ut(Je,at){var gt=(2+h)*s(at);at/=2;for(var yt=0,Rt=1/0;yt<10&&m(Rt)>g;yt++){var Pt=p(at);at-=Rt=(at+s(at)*(Pt+2)-gt)/(2*Pt*(1+Pt))}return[2/k(v*(4+v))*Je*(1+p(at)),2*k(v/(4+v))*s(at)]}ut.invert=function(Je,at){var gt=at*k((4+v)/v)/2,yt=P(gt),Rt=p(yt);return[Je/(2/k(v*(4+v))*(1+Rt)),P((yt+gt*(Rt+2))/(2+h))]};function wt(){return(0,i.Z)(ut).scale(180.739)}function St(Je,at){return[Je*(1+p(at))/k(2+v),2*at/k(2+v)]}St.invert=function(Je,at){var gt=k(2+v),yt=at*gt/2;return[gt*Je/(1+p(yt)),yt]};function Dt(){return(0,i.Z)(St).scale(173.044)}function Mt(Je,at){for(var gt=(1+h)*s(at),yt=0,Rt=1/0;yt<10&&m(Rt)>g;yt++)at-=Rt=(at+s(at)-gt)/(1+p(at));return gt=k(2+v),[Je*(1+p(at))/gt,2*at/gt]}Mt.invert=function(Je,at){var gt=1+h,yt=k(gt/2);return[Je*2*yt/(1+p(at*=yt)),P((at+s(at))/gt)]};function zt(){return(0,i.Z)(Mt).scale(173.044)}var Vt=3+2*D;function Kt(Je,at){var gt=s(Je/=2),yt=p(Je),Rt=k(p(at)),Pt=p(at/=2),Ot=s(at)/(Pt+D*yt*Rt),fr=k(2/(1+Ot*Ot)),gr=k((D*Pt+(yt+gt)*Rt)/(D*Pt+(yt-gt)*Rt));return[Vt*(fr*(gr-1/gr)-2*r(gr)),Vt*(fr*Ot*(gr+1/gr)-2*t(Ot))]}Kt.invert=function(Je,at){if(!(Pt=he.invert(Je/1.2,at*1.065)))return null;var gt=Pt[0],yt=Pt[1],Rt=20,Pt;Je/=Vt,at/=Vt;do{var Ot=gt/2,fr=yt/2,gr=s(Ot),ar=p(Ot),Tr=s(fr),Dr=p(fr),Yr=p(yt),Qr=k(Yr),mn=Tr/(Dr+D*ar*Qr),Tn=mn*mn,Nn=k(2/(1+Tn)),pa=D*Dr+(ar+gr)*Qr,Na=D*Dr+(ar-gr)*Qr,Ia=pa/Na,_a=k(Ia),za=_a-1/_a,Ai=_a+1/_a,to=Nn*za-2*r(_a)-Je,Oi=Nn*mn*Ai-2*t(mn)-at,ve=Tr&&C*Qr*gr*Tn/Tr,Le=(D*ar*Dr+Qr)/(2*(Dr+D*ar*Qr)*(Dr+D*ar*Qr)*Qr),Ge=-.5*mn*Nn*Nn*Nn,tt=Ge*ve,nt=Ge*Le,it=(it=2*Dr+D*Qr*(ar-gr))*it*_a,Nt=(D*ar*Dr*Qr+Yr)/it,pt=-(D*gr*Tr)/(Qr*it),Ht=za*tt-2*Nt/_a+Nn*(Nt+Nt/Ia),qt=za*nt-2*pt/_a+Nn*(pt+pt/Ia),er=mn*Ai*tt-2*ve/(1+Tn)+Nn*Ai*ve+Nn*mn*(Nt-Nt/Ia),Cr=mn*Ai*nt-2*Le/(1+Tn)+Nn*Ai*Le+Nn*mn*(pt-pt/Ia),Sr=qt*er-Cr*Ht;if(!Sr)break;var jr=(Oi*qt-to*Cr)/Sr,tn=(to*er-Oi*Ht)/Sr;gt-=jr,yt=n(-h,u(h,yt-tn))}while((m(jr)>g||m(tn)>g)&&--Rt>0);return m(m(yt)-h)yt){var Dr=k(Tr),Yr=y(ar,gr),Qr=gt*o(Yr/gt),mn=Yr-Qr,Tn=Je*p(mn),Nn=(Je*s(mn)-mn*s(Tn))/(h-Tn),pa=wr(mn,Nn),Na=(v-Je)/vr(pa,Tn,v);gr=Dr;var Ia=50,_a;do gr-=_a=(Je+vr(pa,Tn,gr)*Na-Dr)/(pa(gr)*Na);while(m(_a)>g&&--Ia>0);ar=mn*s(gr),gryt){var gr=k(fr),ar=y(Ot,Pt),Tr=gt*o(ar/gt),Dr=ar-Tr;Pt=gr*p(Dr),Ot=gr*s(Dr);for(var Yr=Pt-h,Qr=s(Pt),mn=Ot/Qr,Tn=Ptg||m(mn)>g)&&--Tn>0);return[Dr,Yr]},gr}var Br=_r(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function wn(){return(0,i.Z)(Br).scale(149.995)}var Kr=_r(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Fn(){return(0,i.Z)(Kr).scale(153.93)}var In=_r(5/6*v,-.62636,-.0344,0,1.3493,-.05524,0,.045);function mr(){return(0,i.Z)(In).scale(130.945)}function cr(Je,at){var gt=Je*Je,yt=at*at;return[Je*(1-.162388*yt)*(.87-952426e-9*gt*gt),at*(1+yt/12)]}cr.invert=function(Je,at){var gt=Je,yt=at,Rt=50,Pt;do{var Ot=yt*yt;yt-=Pt=(yt*(1+Ot/12)-at)/(1+Ot/4)}while(m(Pt)>g&&--Rt>0);Rt=50,Je/=1-.162388*Ot;do{var fr=(fr=gt*gt)*fr;gt-=Pt=(gt*(.87-952426e-9*fr)-Je)/(.87-.00476213*fr)}while(m(Pt)>g&&--Rt>0);return[gt,yt]};function zr(){return(0,i.Z)(cr).scale(131.747)}var kr=_r(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function un(){return(0,i.Z)(kr).scale(131.087)}function xn(Je){var at=Je(h,0)[0]-Je(-h,0)[0];function gt(yt,Rt){var Pt=yt>0?-.5:.5,Ot=Je(yt+Pt*v,Rt);return Ot[0]-=Pt*at,Ot}return Je.invert&&(gt.invert=function(yt,Rt){var Pt=yt>0?-.5:.5,Ot=Je.invert(yt+Pt*at,Rt),fr=Ot[0]-Pt*v;return fr<-v?fr+=2*v:fr>v&&(fr-=2*v),Ot[0]=fr,Ot}),gt}function An(Je,at){var gt=c(Je),yt=c(at),Rt=p(at),Pt=p(Je)*Rt,Ot=s(Je)*Rt,fr=s(yt*at);Je=m(y(Ot,fr)),at=P(Pt),m(Je-h)>g&&(Je%=h);var gr=bn(Je>v/4?h-Je:Je,at);return Je>v/4&&(fr=gr[0],gr[0]=-gr[1],gr[1]=-fr),gr[0]*=gt,gr[1]*=-yt,gr}An.invert=function(Je,at){m(Je)>1&&(Je=c(Je)*2-Je),m(at)>1&&(at=c(at)*2-at);var gt=c(Je),yt=c(at),Rt=-gt*Je,Pt=-yt*at,Ot=Pt/Rt<1,fr=_n(Ot?Pt:Rt,Ot?Rt:Pt),gr=fr[0],ar=fr[1],Tr=p(ar);return Ot&&(gr=-h-gr),[gt*(y(s(gr)*Tr,-s(ar))+v),yt*P(p(gr)*Tr)]};function bn(Je,at){if(at===h)return[0,0];var gt=s(at),yt=gt*gt,Rt=yt*yt,Pt=1+Rt,Ot=1+3*Rt,fr=1-Rt,gr=P(1/k(Pt)),ar=fr+yt*Pt*gr,Tr=(1-gt)/ar,Dr=k(Tr),Yr=Tr*Pt,Qr=k(Yr),mn=Dr*fr,Tn,Nn;if(Je===0)return[0,-(mn+yt*Qr)];var pa=p(at),Na=1/pa,Ia=2*gt*pa,_a=(-3*yt+gr*Ot)*Ia,za=(-ar*pa-(1-gt)*_a)/(ar*ar),Ai=.5*za/Dr,to=fr*Ai-2*yt*Dr*Ia,Oi=yt*Pt*za+Tr*Ot*Ia,ve=-Na*Ia,Le=-Na*Oi,Ge=-2*Na*to,tt=4*Je/v,nt;if(Je>.222*v||at.175*v){if(Tn=(mn+yt*k(Yr*(1+Rt)-mn*mn))/(1+Rt),Je>v/4)return[Tn,Tn];var it=Tn,Nt=.5*Tn;Tn=.5*(Nt+it),Nn=50;do{var pt=k(Yr-Tn*Tn),Ht=Tn*(Ge+ve*pt)+Le*P(Tn/Qr)-tt;if(!Ht)break;Ht<0?Nt=Tn:it=Tn,Tn=.5*(Nt+it)}while(m(it-Nt)>g&&--Nn>0)}else{Tn=g,Nn=25;do{var qt=Tn*Tn,er=k(Yr-qt),Cr=Ge+ve*er,Sr=Tn*Cr+Le*P(Tn/Qr)-tt,jr=Cr+(Le-ve*qt)/er;Tn-=nt=er?Sr/jr:0}while(m(nt)>g&&--Nn>0)}return[Tn,-mn-yt*k(Yr-Tn*Tn)]}function _n(Je,at){for(var gt=0,yt=1,Rt=.5,Pt=50;;){var Ot=Rt*Rt,fr=k(Rt),gr=P(1/k(1+Ot)),ar=1-Ot+Rt*(1+Ot)*gr,Tr=(1-fr)/ar,Dr=k(Tr),Yr=Tr*(1+Ot),Qr=Dr*(1-Ot),mn=Yr-Je*Je,Tn=k(mn),Nn=at+Qr+Rt*Tn;if(m(yt-gt)0?gt=Rt:yt=Rt,Rt=.5*(gt+yt)}if(!Pt)return null;var pa=P(fr),Na=p(pa),Ia=1/Na,_a=2*fr*Na,za=(-3*Rt+gr*(1+3*Ot))*_a,Ai=(-ar*Na-(1-fr)*za)/(ar*ar),to=.5*Ai/Dr,Oi=(1-Ot)*to-2*Rt*Dr*_a,ve=-2*Ia*Oi,Le=-Ia*_a,Ge=-Ia*(Rt*(1+Ot)*Ai+Tr*(1+3*Ot)*_a);return[v/4*(Je*(ve+Le*Tn)+Ge*P(Je/k(Yr))),pa]}function Qn(){return(0,i.Z)(xn(An)).scale(239.75)}function sa(Je,at,gt){var yt,Rt,Pt;return Je?(yt=aa(Je,gt),at?(Rt=aa(at,1-gt),Pt=Rt[1]*Rt[1]+gt*yt[0]*yt[0]*Rt[0]*Rt[0],[[yt[0]*Rt[2]/Pt,yt[1]*yt[2]*Rt[0]*Rt[1]/Pt],[yt[1]*Rt[1]/Pt,-yt[0]*yt[2]*Rt[0]*Rt[2]/Pt],[yt[2]*Rt[1]*Rt[2]/Pt,-gt*yt[0]*yt[1]*Rt[0]/Pt]]):[[yt[0],0],[yt[1],0],[yt[2],0]]):(Rt=aa(at,1-gt),[[0,Rt[0]/Rt[1]],[1/Rt[1],0],[Rt[2]/Rt[1],0]])}function aa(Je,at){var gt,yt,Rt,Pt,Ot;if(at=1-g)return gt=(1-at)/4,yt=z(Je),Pt=O(Je),Rt=1/yt,Ot=yt*G(Je),[Pt+gt*(Ot-Je)/(yt*yt),Rt-gt*Pt*Rt*(Ot-Je),Rt+gt*Pt*Rt*(Ot+Je),2*t(l(Je))-h+gt*(Ot-Je)/yt];var fr=[1,0,0,0,0,0,0,0,0],gr=[k(at),0,0,0,0,0,0,0,0],ar=0;for(yt=k(1-at),Ot=1;m(gr[ar]/fr[ar])>g&&ar<8;)gt=fr[ar++],gr[ar]=(gt-yt)/2,fr[ar]=(gt+yt)/2,yt=k(gt*yt),Ot*=2;Rt=Ot*fr[ar]*Je;do Pt=gr[ar]*s(yt=Rt)/fr[ar],Rt=(P(Pt)+Rt)/2;while(--ar);return[s(Rt),Pt=p(Rt),Pt/p(Rt-yt),Rt]}function fa(Je,at,gt){var yt=m(Je),Rt=m(at),Pt=G(Rt);if(yt){var Ot=1/s(yt),fr=1/(b(yt)*b(yt)),gr=-(fr+gt*(Pt*Pt*Ot*Ot)-1+gt),ar=(gt-1)*fr,Tr=(-gr+k(gr*gr-4*ar))/2;return[ra(t(1/k(Tr)),gt)*c(Je),ra(t(k((Tr/fr-1)/gt)),1-gt)*c(at)]}return[0,ra(t(Pt),1-gt)*c(at)]}function ra(Je,at){if(!at)return Je;if(at===1)return r(b(Je/2+x));for(var gt=1,yt=k(1-at),Rt=k(at),Pt=0;m(Rt)>g;Pt++){if(Je%v){var Ot=t(yt*b(Je)/gt);Ot<0&&(Ot+=v),Je+=Ot+~~(Je/v)*v}else Je+=Je;Rt=(gt+yt)/2,yt=k(gt*yt),Rt=((gt=Rt)-yt)/2}return Je/(a(2,Pt)*gt)}function Nr(Je,at){var gt=(D-1)/(D+1),yt=k(1-gt*gt),Rt=ra(h,yt*yt),Pt=-1,Ot=r(b(v/4+m(at)/2)),fr=l(Pt*Ot)/k(gt),gr=sn(fr*p(Pt*Je),fr*s(Pt*Je)),ar=fa(gr[0],gr[1],yt*yt);return[-ar[1],(at>=0?1:-1)*(.5*Rt-ar[0])]}function sn(Je,at){var gt=Je*Je,yt=at+1,Rt=1-gt-at*at;return[.5*((Je>=0?h:-h)-y(Rt,2*Je)),-.25*r(Rt*Rt+4*gt)+.5*r(yt*yt+gt)]}function an(Je,at){var gt=at[0]*at[0]+at[1]*at[1];return[(Je[0]*at[0]+Je[1]*at[1])/gt,(Je[1]*at[0]-Je[0]*at[1])/gt]}Nr.invert=function(Je,at){var gt=(D-1)/(D+1),yt=k(1-gt*gt),Rt=ra(h,yt*yt),Pt=-1,Ot=sa(.5*Rt-at,-Je,yt*yt),fr=an(Ot[0],Ot[1]),gr=y(fr[1],fr[0])/Pt;return[gr,2*t(l(.5/Pt*r(gt*fr[0]*fr[0]+gt*fr[1]*fr[1])))-h]};function pn(){return(0,i.Z)(xn(Nr)).scale(151.496)}var Hn=e(7613);function Dn(Je){var at=s(Je),gt=p(Je),yt=Ln(Je);yt.invert=Ln(-Je);function Rt(Pt,Ot){var fr=yt(Pt,Ot);Pt=fr[0],Ot=fr[1];var gr=s(Ot),ar=p(Ot),Tr=p(Pt),Dr=E(at*gr+gt*ar*Tr),Yr=s(Dr),Qr=m(Yr)>g?Dr/Yr:1;return[Qr*gt*s(Pt),(m(Pt)>h?Qr:-Qr)*(at*ar-gt*gr*Tr)]}return Rt.invert=function(Pt,Ot){var fr=k(Pt*Pt+Ot*Ot),gr=-s(fr),ar=p(fr),Tr=fr*ar,Dr=-Ot*gr,Yr=fr*at,Qr=k(Tr*Tr+Dr*Dr-Yr*Yr),mn=y(Tr*Yr+Dr*Qr,Dr*Yr-Tr*Qr),Tn=(fr>h?-1:1)*y(Pt*gr,fr*p(mn)*ar+Ot*s(mn)*gr);return yt.invert(Tn,mn)},Rt}function Ln(Je){var at=s(Je),gt=p(Je);return function(yt,Rt){var Pt=p(Rt),Ot=p(yt)*Pt,fr=s(yt)*Pt,gr=s(Rt);return[y(fr,Ot*gt-gr*at),P(gr*gt+Ot*at)]}}function Gn(){var Je=0,at=(0,i.r)(Dn),gt=at(Je),yt=gt.rotate,Rt=gt.stream,Pt=(0,Hn.Z)();return gt.parallel=function(Ot){if(!arguments.length)return Je*M;var fr=gt.rotate();return at(Je=Ot*S).rotate(fr)},gt.rotate=function(Ot){return arguments.length?(yt.call(gt,[Ot[0],Ot[1]-Je*M]),Pt.center([-Ot[0],-Ot[1]]),gt):(Ot=yt.call(gt),Ot[1]+=Je*M,Ot)},gt.stream=function(Ot){return Ot=Rt(Ot),Ot.sphere=function(){Ot.polygonStart();var fr=.01,gr=Pt.radius(90-fr)().coordinates[0],ar=gr.length-1,Tr=-1,Dr;for(Ot.lineStart();++Tr=0;)Ot.point((Dr=gr[Tr])[0],Dr[1]);Ot.lineEnd(),Ot.polygonEnd()},Ot},gt.scale(79.4187).parallel(45).clipAngle(179.999)}var oa=e(33064),Fa=e(72736),ai=3,Xt=P(1-1/ai)*M,Ar=Ft(0);function on(Je){var at=Xt*S,gt=He(v,at)[0]-He(-v,at)[0],yt=Ar(0,at)[1],Rt=He(0,at)[1],Pt=L-Rt,Ot=w/Je,fr=4/w,gr=yt+Pt*Pt*4/w;function ar(Tr,Dr){var Yr,Qr=m(Dr);if(Qr>at){var mn=u(Je-1,n(0,d((Tr+v)/Ot)));Tr+=v*(Je-1)/Je-mn*Ot,Yr=He(Tr,Qr),Yr[0]=Yr[0]*w/gt-w*(Je-1)/(2*Je)+mn*w/Je,Yr[1]=yt+(Yr[1]-Rt)*4*Pt/w,Dr<0&&(Yr[1]=-Yr[1])}else Yr=Ar(Tr,Dr);return Yr[0]*=fr,Yr[1]/=gr,Yr}return ar.invert=function(Tr,Dr){Tr/=fr,Dr*=gr;var Yr=m(Dr);if(Yr>yt){var Qr=u(Je-1,n(0,d((Tr+v)/Ot)));Tr=(Tr+v*(Je-1)/Je-Qr*Ot)*gt/w;var mn=He.invert(Tr,.25*(Yr-yt)*w/Pt+Rt);return mn[0]-=v*(Je-1)/Je-Qr*Ot,Dr<0&&(mn[1]=-mn[1]),mn}return Ar.invert(Tr,Dr)},ar}function hn(Je,at){return[Je,at&1?90-g:Xt]}function vn(Je,at){return[Je,at&1?-90+g:-Xt]}function Pn(Je){return[Je[0]*(1-g),Je[1]]}function Mn(Je){var at=[].concat((0,oa.w6)(-180,180+Je/2,Je).map(hn),(0,oa.w6)(180,-180-Je/2,-Je).map(vn));return{type:"Polygon",coordinates:[Je===180?at.map(Pn):at]}}function cn(){var Je=4,at=(0,i.r)(on),gt=at(Je),yt=gt.stream;return gt.lobes=function(Rt){return arguments.length?at(Je=+Rt):Je},gt.stream=function(Rt){var Pt=gt.rotate(),Ot=yt(Rt),fr=(gt.rotate([0,0]),yt(Rt));return gt.rotate(Pt),Ot.sphere=function(){(0,Fa.Z)(Mn(180/Je),fr)},Ot},gt.scale(239.75)}function Pr(Je){var at=1+Je,gt=s(1/at),yt=P(gt),Rt=2*k(v/(Pt=v+4*yt*at)),Pt,Ot=.5*Rt*(at+k(Je*(2+Je))),fr=Je*Je,gr=at*at;function ar(Tr,Dr){var Yr=1-s(Dr),Qr,mn;if(Yr&&Yr<2){var Tn=h-Dr,Nn=25,pa;do{var Na=s(Tn),Ia=p(Tn),_a=yt+y(Na,at-Ia),za=1+gr-2*at*Ia;Tn-=pa=(Tn-fr*yt-at*Na+za*_a-.5*Yr*Pt)/(2*at*Na*_a)}while(m(pa)>A&&--Nn>0);Qr=Rt*k(za),mn=Tr*_a/v}else Qr=Rt*(Je+Yr),mn=Tr*yt/v;return[Qr*s(mn),Ot-Qr*p(mn)]}return ar.invert=function(Tr,Dr){var Yr=Tr*Tr+(Dr-=Ot)*Dr,Qr=(1+gr-Yr/(Rt*Rt))/(2*at),mn=E(Qr),Tn=s(mn),Nn=yt+y(Tn,at-Qr);return[P(Tr/k(Yr))*v/Nn,P(1-2*(mn-fr*yt-at*Tn+(1+gr-2*at*Qr)*Nn)/Pt)]},ar}function Er(){var Je=1,at=(0,i.r)(Pr),gt=at(Je);return gt.ratio=function(yt){return arguments.length?at(Je=+yt):Je},gt.scale(167.774).center([0,18.67])}var Ir=.7109889596207567,dn=.0528035274542;function On(Je,at){return at>-Ir?(Je=De(Je,at),Je[1]+=dn,Je):Ze(Je,at)}On.invert=function(Je,at){return at>-Ir?De.invert(Je,at-dn):Ze.invert(Je,at)};function Yn(){return(0,i.Z)(On).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function gn(Je,at){return m(at)>Ir?(Je=De(Je,at),Je[1]-=at>0?dn:-dn,Je):Ze(Je,at)}gn.invert=function(Je,at){return m(at)>Ir?De.invert(Je,at+(at>0?dn:-dn)):Ze.invert(Je,at)};function kn(){return(0,i.Z)(gn).scale(152.63)}function ea(Je,at,gt,yt){var Rt=k(4*v/(2*gt+(1+Je-at/2)*s(2*gt)+(Je+at)/2*s(4*gt)+at/2*s(6*gt))),Pt=k(yt*s(gt)*k((1+Je*p(2*gt)+at*p(4*gt))/(1+Je+at))),Ot=gt*gr(1);function fr(Dr){return k(1+Je*p(2*Dr)+at*p(4*Dr))}function gr(Dr){var Yr=Dr*gt;return(2*Yr+(1+Je-at/2)*s(2*Yr)+(Je+at)/2*s(4*Yr)+at/2*s(6*Yr))/gt}function ar(Dr){return fr(Dr)*s(Dr)}var Tr=function(Dr,Yr){var Qr=gt*Se(gr,Ot*s(Yr)/gt,Yr/v);isNaN(Qr)&&(Qr=gt*c(Yr));var mn=Rt*fr(Qr);return[mn*Pt*Dr/v*p(Qr),mn/Pt*s(Qr)]};return Tr.invert=function(Dr,Yr){var Qr=Se(ar,Yr*Pt/Rt);return[Dr*v/(p(Qr)*Rt*Pt*fr(Qr)),P(gt*gr(Qr/gt)/Ot)]},gt===0&&(Rt=k(yt/v),Tr=function(Dr,Yr){return[Dr*Rt,s(Yr)/Rt]},Tr.invert=function(Dr,Yr){return[Dr/Rt,P(Yr*Rt)]}),Tr}function ca(){var Je=1,at=0,gt=45*S,yt=2,Rt=(0,i.r)(ea),Pt=Rt(Je,at,gt,yt);return Pt.a=function(Ot){return arguments.length?Rt(Je=+Ot,at,gt,yt):Je},Pt.b=function(Ot){return arguments.length?Rt(Je,at=+Ot,gt,yt):at},Pt.psiMax=function(Ot){return arguments.length?Rt(Je,at,gt=+Ot*S,yt):gt*M},Pt.ratio=function(Ot){return arguments.length?Rt(Je,at,gt,yt=+Ot):yt},Pt.scale(180.739)}function la(Je,at,gt,yt,Rt,Pt,Ot,fr,gr,ar,Tr){if(Tr.nanEncountered)return NaN;var Dr,Yr,Qr,mn,Tn,Nn,pa,Na,Ia,_a;if(Dr=gt-at,Yr=Je(at+Dr*.25),Qr=Je(gt-Dr*.25),isNaN(Yr)){Tr.nanEncountered=!0;return}if(isNaN(Qr)){Tr.nanEncountered=!0;return}return mn=Dr*(yt+4*Yr+Rt)/12,Tn=Dr*(Rt+4*Qr+Pt)/12,Nn=mn+Tn,_a=(Nn-Ot)/15,ar>gr?(Tr.maxDepthCount++,Nn+_a):Math.abs(_a)>1;do gr[Nn]>Qr?Tn=Nn:mn=Nn,Nn=mn+Tn>>1;while(Nn>mn);var pa=gr[Nn+1]-gr[Nn];return pa&&(pa=(Qr-gr[Nn+1])/pa),(Nn+1+pa)/Ot}var Dr=2*Tr(1)/v*Pt/gt,Yr=function(Qr,mn){var Tn=Tr(m(s(mn))),Nn=yt(Tn)*Qr;return Tn/=Dr,[Nn,mn>=0?Tn:-Tn]};return Yr.invert=function(Qr,mn){var Tn;return mn*=Dr,m(mn)<1&&(Tn=c(mn)*P(Rt(m(mn))*Pt)),[Qr/yt(m(mn)),Tn]},Yr}function Po(){var Je=0,at=2.5,gt=1.183136,yt=(0,i.r)(ya),Rt=yt(Je,at,gt);return Rt.alpha=function(Pt){return arguments.length?yt(Je=+Pt,at,gt):Je},Rt.k=function(Pt){return arguments.length?yt(Je,at=+Pt,gt):at},Rt.gamma=function(Pt){return arguments.length?yt(Je,at,gt=+Pt):gt},Rt.scale(152.63)}function Xo(Je,at){return m(Je[0]-at[0])=0;--gr)gt=Je[1][gr],yt=gt[0][0],Rt=gt[0][1],Pt=gt[1][1],Ot=gt[2][0],fr=gt[2][1],at.push(es([[Ot-g,fr-g],[Ot-g,Pt+g],[yt+g,Pt+g],[yt+g,Rt-g]],30));return{type:"Polygon",coordinates:[(0,oa.TS)(at)]}}function ts(Je,at,gt){var yt,Rt;function Pt(gr,ar){for(var Tr=ar<0?-1:1,Dr=at[+(ar<0)],Yr=0,Qr=Dr.length-1;YrDr[Yr][2][0];++Yr);var mn=Je(gr-Dr[Yr][1][0],ar);return mn[0]+=Je(Dr[Yr][1][0],Tr*ar>Tr*Dr[Yr][0][1]?Dr[Yr][0][1]:ar)[0],mn}gt?Pt.invert=gt(Pt):Je.invert&&(Pt.invert=function(gr,ar){for(var Tr=Rt[+(ar<0)],Dr=at[+(ar<0)],Yr=0,Qr=Tr.length;Yrmn&&(Tn=Qr,Qr=mn,mn=Tn),[[Dr,Qr],[Yr,mn]]})}),Ot):at.map(function(ar){return ar.map(function(Tr){return[[Tr[0][0]*M,Tr[0][1]*M],[Tr[1][0]*M,Tr[1][1]*M],[Tr[2][0]*M,Tr[2][1]*M]]})})},at!=null&&Ot.lobes(at),Ot}var Bc=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function pi(){return ts(Ye,Bc).scale(160.857)}var df=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Fu(){return ts(gn,df).scale(152.63)}var No=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function ls(){return ts(De,No).scale(169.529)}var zh=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function pf(){return ts(De,zh).scale(169.529).rotate([20,0])}var eo=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function gf(){return ts(On,eo,Te).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var ms=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function So(){return ts(Ze,ms).scale(152.63).rotate([-20,0])}function ys(Je,at){return[3/w*Je*k(v*v/3-at*at),at]}ys.invert=function(Je,at){return[w/3*Je/k(v*v/3-at*at),at]};function jo(){return(0,i.Z)(ys).scale(158.837)}function Es(Je){function at(gt,yt){if(m(m(yt)-h)2)return null;gt/=2,yt/=2;var Pt=gt*gt,Ot=yt*yt,fr=2*yt/(1+Pt+Ot);return fr=a((1+fr)/(1-fr),1/Je),[y(2*gt,1-Pt-Ot)/Je,P((fr-1)/(fr+1))]},at}function el(){var Je=.5,at=(0,i.r)(Es),gt=at(Je);return gt.spacing=function(yt){return arguments.length?at(Je=+yt):Je},gt.scale(124.75)}var Tl=v/D;function Oo(Je,at){return[Je*(1+k(p(at)))/2,at/(p(at/2)*p(Je/6))]}Oo.invert=function(Je,at){var gt=m(Je),yt=m(at),Rt=g,Pt=h;ytg||m(Nn)>g)&&--Rt>0);return Rt&&[gt,yt]};function zo(){return(0,i.Z)(tl).scale(139.98)}function Uc(Je,at){return[s(Je)/p(at),b(at)*p(Je)]}Uc.invert=function(Je,at){var gt=Je*Je,yt=at*at,Rt=yt+1,Pt=gt+Rt,Ot=Je?C*k((Pt-k(Pt*Pt-4*gt))/gt):1/k(Rt);return[P(Je*Ot),c(at)*E(Ot)]};function Ml(){return(0,i.Z)(Uc).scale(144.049).clipAngle(89.999)}function rl(Je){var at=p(Je),gt=b(x+Je/2);function yt(Rt,Pt){var Ot=Pt-Je,fr=m(Ot)=0;)Tr=Je[ar],Dr=Tr[0]+fr*(Qr=Dr)-gr*Yr,Yr=Tr[1]+fr*Yr+gr*Qr;return Dr=fr*(Qr=Dr)-gr*Yr,Yr=fr*Yr+gr*Qr,[Dr,Yr]}return gt.invert=function(yt,Rt){var Pt=20,Ot=yt,fr=Rt;do{for(var gr=at,ar=Je[gr],Tr=ar[0],Dr=ar[1],Yr=0,Qr=0,mn;--gr>=0;)ar=Je[gr],Yr=Tr+Ot*(mn=Yr)-fr*Qr,Qr=Dr+Ot*Qr+fr*mn,Tr=ar[0]+Ot*(mn=Tr)-fr*Dr,Dr=ar[1]+Ot*Dr+fr*mn;Yr=Tr+Ot*(mn=Yr)-fr*Qr,Qr=Dr+Ot*Qr+fr*mn,Tr=Ot*(mn=Tr)-fr*Dr-yt,Dr=Ot*Dr+fr*mn-Rt;var Tn=Yr*Yr+Qr*Qr,Nn,pa;Ot-=Nn=(Tr*Yr+Dr*Qr)/Tn,fr-=pa=(Dr*Yr-Tr*Qr)/Tn}while(m(Nn)+m(pa)>g*g&&--Pt>0);if(Pt){var Na=k(Ot*Ot+fr*fr),Ia=2*t(Na*.5),_a=s(Ia);return[y(Ot*_a,Na*p(Ia)),Na?P(fr*_a/Na):0]}},gt}var $v=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Kv=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Jv=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Gc=[[.9245,0],[0,0],[.01943,0]],Qv=[[.721316,0],[0,0],[-.00881625,-.00617325]];function qv(){return fu($v,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Bh(){return fu(Kv,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function ed(){return fu(Jv,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function td(){return fu(Gc,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Wc(){return fu(Qv,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function fu(Je,at){var gt=(0,i.Z)(mf(Je)).rotate(at).clipAngle(90),yt=(0,rt.Z)(at),Rt=gt.center;return delete gt.rotate,gt.center=function(Pt){return arguments.length?Rt(yt(Pt)):yt.invert(Rt())},gt}var cu=k(6),Iu=k(7);function tc(Je,at){var gt=P(7*s(at)/(3*cu));return[cu*Je*(2*p(2*gt/3)-1)/Iu,9*s(gt/3)/Iu]}tc.invert=function(Je,at){var gt=3*P(at*Iu/9);return[Je*Iu/(cu*(2*p(2*gt/3)-1)),P(s(gt)*3*cu/7)]};function rd(){return(0,i.Z)(tc).scale(164.859)}function Sl(Je,at){for(var gt=(1+C)*s(at),yt=at,Rt=0,Pt;Rt<25&&(yt-=Pt=(s(yt/2)+s(yt)-gt)/(.5*p(yt/2)+p(yt)),!(m(Pt)A&&--yt>0);return Pt=gt*gt,Ot=Pt*Pt,fr=Pt*Ot,[Je/(.84719-.13063*Pt+fr*fr*(-.04515+.05494*Pt-.02326*Ot+.00331*fr)),gt]};function yf(){return(0,i.Z)(hu).scale(175.295)}function _u(Je,at){return[Je*(1+p(at))/2,2*(at-b(at/2))]}_u.invert=function(Je,at){for(var gt=at/2,yt=0,Rt=1/0;yt<10&&m(Rt)>g;++yt){var Pt=p(at/2);at-=Rt=(at-b(at/2)-gt)/(1-.5/(Pt*Pt))}return[2*Je/(1+p(at)),at]};function nl(){return(0,i.Z)(_u).scale(152.63)}var El=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Zc(){return ts(oe(1/0),El).rotate([20,0]).scale(152.63)}function Ou(Je,at){var gt=s(at),yt=p(at),Rt=c(Je);if(Je===0||m(at)===h)return[0,at];if(at===0)return[Je,0];if(m(Je)===h)return[Je*yt,h*gt];var Pt=v/(2*Je)-2*Je/v,Ot=2*at/v,fr=(1-Ot*Ot)/(gt-Ot),gr=Pt*Pt,ar=fr*fr,Tr=1+gr/ar,Dr=1+ar/gr,Yr=(Pt*gt/fr-Pt/2)/Tr,Qr=(ar*gt/gr+fr/2)/Dr,mn=Yr*Yr+yt*yt/Tr,Tn=Qr*Qr-(ar*gt*gt/gr+fr*gt-1)/Dr;return[h*(Yr+k(mn)*Rt),h*(Qr+k(Tn<0?0:Tn)*c(-at*Pt)*Rt)]}Ou.invert=function(Je,at){Je/=h,at/=h;var gt=Je*Je,yt=at*at,Rt=gt+yt,Pt=v*v;return[Je?(Rt-1+k((1-Rt)*(1-Rt)+4*gt))/(2*Je)*h:0,Se(function(Ot){return Rt*(v*s(Ot)-2*Ot)*v+4*Ot*Ot*(at-s(Ot))+2*v*Ot-Pt*at},0)]};function Wl(){return(0,i.Z)(Ou).scale(127.267)}var lo=1.0148,Xc=.23185,rc=-.14499,zu=.02406,Hh=lo,Vh=5*Xc,ku=7*rc,Bu=9*zu,Ro=1.790857183;function nc(Je,at){var gt=at*at;return[Je,at*(lo+gt*gt*(Xc+gt*(rc+zu*gt)))]}nc.invert=function(Je,at){at>Ro?at=Ro:at<-Ro&&(at=-Ro);var gt=at,yt;do{var Rt=gt*gt;gt-=yt=(gt*(lo+Rt*Rt*(Xc+Rt*(rc+zu*Rt)))-at)/(Hh+Rt*Rt*(Vh+Rt*(ku+Bu*Rt)))}while(m(yt)>g);return[Je,gt]};function ad(){return(0,i.Z)(nc).scale(139.319)}function jc(Je,at){if(m(at)g&&--Rt>0);return Ot=b(yt),[(m(at)=0;)if(yt=at[fr],gt[0]===yt[0]&>[1]===yt[1]){if(Pt)return[Pt,gt];Pt=gt}}}function vu(Je){for(var at=Je.length,gt=[],yt=Je[at-1],Rt=0;Rt0?[-yt[0],0]:[180-yt[0],180])};var at=us.map(function(gt){return{face:gt,project:Je(gt)}});return[-1,0,0,1,0,1,4,5].forEach(function(gt,yt){var Rt=at[gt];Rt&&(Rt.children||(Rt.children=[])).push(at[yt])}),_i(at[0],function(gt,yt){return at[gt<-v/2?yt<0?6:4:gt<0?yt<0?2:0:gtyt^Qr>yt&><(Yr-ar)*(yt-Tr)/(Qr-Tr)+ar&&(Rt=!Rt)}return Rt}function ld(Je,at){var gt=at.stream,yt;if(!gt)throw new Error("invalid projection");switch(Je&&Je.type){case"Feature":yt=sc;break;case"FeatureCollection":yt=ud;break;default:yt=Hu;break}return yt(Je,gt)}function ud(Je,at){return{type:"FeatureCollection",features:Je.features.map(function(gt){return sc(gt,at)})}}function sc(Je,at){return{type:"Feature",id:Je.id,properties:Je.properties,geometry:Hu(Je.geometry,at)}}function Wh(Je,at){return{type:"GeometryCollection",geometries:Je.geometries.map(function(gt){return Hu(gt,at)})}}function Hu(Je,at){if(!Je)return null;if(Je.type==="GeometryCollection")return Wh(Je,at);var gt;switch(Je.type){case"Point":gt=Mf;break;case"MultiPoint":gt=Mf;break;case"LineString":gt=du;break;case"MultiLineString":gt=du;break;case"Polygon":gt=Sf;break;case"MultiPolygon":gt=Sf;break;case"Sphere":gt=Sf;break;default:return null}return(0,Fa.Z)(Je,at(gt)),gt.result()}var ko=[],fs=[],Mf={point:function(Je,at){ko.push([Je,at])},result:function(){var Je=ko.length?ko.length<2?{type:"Point",coordinates:ko[0]}:{type:"MultiPoint",coordinates:ko}:null;return ko=[],Je}},du={lineStart:oc,point:function(Je,at){ko.push([Je,at])},lineEnd:function(){ko.length&&(fs.push(ko),ko=[])},result:function(){var Je=fs.length?fs.length<2?{type:"LineString",coordinates:fs[0]}:{type:"MultiLineString",coordinates:fs}:null;return fs=[],Je}},Sf={polygonStart:oc,lineStart:oc,point:function(Je,at){ko.push([Je,at])},lineEnd:function(){var Je=ko.length;if(Je){do ko.push(ko[0].slice());while(++Je<4);fs.push(ko),ko=[]}},polygonEnd:oc,result:function(){if(!fs.length)return null;var Je=[],at=[];return fs.forEach(function(gt){od(gt)?Je.push([gt]):at.push(gt)}),at.forEach(function(gt){var yt=gt[0];Je.some(function(Rt){if(sd(Rt[0],yt))return Rt.push(gt),!0})||Je.push([gt])}),fs=[],Je.length?Je.length>1?{type:"MultiPolygon",coordinates:Je}:{type:"Polygon",coordinates:Je[0]}:null}};function lc(Je){var at=Je(h,0)[0]-Je(-h,0)[0];function gt(yt,Rt){var Pt=m(yt)0?yt-v:yt+v,Rt),fr=(Ot[0]-Ot[1])*C,gr=(Ot[0]+Ot[1])*C;if(Pt)return[fr,gr];var ar=at*C,Tr=fr>0^gr>0?-1:1;return[Tr*fr-c(gr)*ar,Tr*gr-c(fr)*ar]}return Je.invert&&(gt.invert=function(yt,Rt){var Pt=(yt+Rt)*C,Ot=(Rt-yt)*C,fr=m(Pt)<.5*at&&m(Ot)<.5*at;if(!fr){var gr=at*C,ar=Pt>0^Ot>0?-1:1,Tr=-ar*yt+(Ot>0?1:-1)*gr,Dr=-ar*Rt+(Pt>0?1:-1)*gr;Pt=(-Tr-Dr)*C,Ot=(Tr-Dr)*C}var Yr=Je.invert(Pt,Ot);return fr||(Yr[0]+=Pt>0?v:-v),Yr}),(0,i.Z)(gt).rotate([-90,-90,45]).clipAngle(179.999)}function fd(){return lc(An).scale(176.423)}function Yh(){return lc(Nr).scale(111.48)}function Zh(Je,at){if(!(0<=(at=+at)&&at<=20))throw new Error("invalid digits");function gt(ar){var Tr=ar.length,Dr=2,Yr=new Array(Tr);for(Yr[0]=+ar[0].toFixed(at),Yr[1]=+ar[1].toFixed(at);Dr2||Qr[0]!=Tr[0]||Qr[1]!=Tr[1])&&(Dr.push(Qr),Tr=Qr)}return Dr.length===1&&ar.length>1&&Dr.push(gt(ar[ar.length-1])),Dr}function Pt(ar){return ar.map(Rt)}function Ot(ar){if(ar==null)return ar;var Tr;switch(ar.type){case"GeometryCollection":Tr={type:"GeometryCollection",geometries:ar.geometries.map(Ot)};break;case"Point":Tr={type:"Point",coordinates:gt(ar.coordinates)};break;case"MultiPoint":Tr={type:ar.type,coordinates:yt(ar.coordinates)};break;case"LineString":Tr={type:ar.type,coordinates:Rt(ar.coordinates)};break;case"MultiLineString":case"Polygon":Tr={type:ar.type,coordinates:Pt(ar.coordinates)};break;case"MultiPolygon":Tr={type:"MultiPolygon",coordinates:ar.coordinates.map(Pt)};break;default:return ar}return ar.bbox!=null&&(Tr.bbox=ar.bbox),Tr}function fr(ar){var Tr={type:"Feature",properties:ar.properties,geometry:Ot(ar.geometry)};return ar.id!=null&&(Tr.id=ar.id),ar.bbox!=null&&(Tr.bbox=ar.bbox),Tr}if(Je!=null)switch(Je.type){case"Feature":return fr(Je);case"FeatureCollection":{var gr={type:"FeatureCollection",features:Je.features.map(fr)};return Je.bbox!=null&&(gr.bbox=Je.bbox),gr}default:return Ot(Je)}return Je}function eh(Je){var at=s(Je);function gt(yt,Rt){var Pt=at?b(yt*at/2)/at:yt/2;if(!Rt)return[2*Pt,-Je];var Ot=2*t(Pt*s(Rt)),fr=1/b(Rt);return[s(Ot)*fr,Rt+(1-p(Ot))*fr-Je]}return gt.invert=function(yt,Rt){if(m(Rt+=Je)g&&--fr>0);var Yr=yt*(ar=b(Ot)),Qr=b(m(Rt)0?h:-h)*(gr+Rt*(Tr-Ot)/2+Rt*Rt*(Tr-2*gr+Ot)/2)]}il.invert=function(Je,at){var gt=at/h,yt=gt*90,Rt=u(18,m(yt/5)),Pt=n(0,d(Rt));do{var Ot=ho[Pt][1],fr=ho[Pt+1][1],gr=ho[u(19,Pt+2)][1],ar=gr-Ot,Tr=gr-2*fr+Ot,Dr=2*(m(gt)-fr)/ar,Yr=Tr/ar,Qr=Dr*(1-Yr*Dr*(1-2*Yr*Dr));if(Qr>=0||Pt===1){yt=(at>=0?5:-5)*(Qr+Rt);var mn=50,Tn;do Rt=u(18,m(yt)/5),Pt=d(Rt),Qr=Rt-Pt,Ot=ho[Pt][1],fr=ho[Pt+1][1],gr=ho[u(19,Pt+2)][1],yt-=(Tn=(at>=0?h:-h)*(fr+Qr*(gr-Ot)/2+Qr*Qr*(gr-2*fr+Ot)/2)-at)*M;while(m(Tn)>A&&--mn>0);break}}while(--Pt>=0);var Nn=ho[Pt][0],pa=ho[Pt+1][0],Na=ho[u(19,Pt+2)][0];return[Je/(pa+Qr*(Na-Nn)/2+Qr*Qr*(Na-2*pa+Nn)/2),yt*S]};function th(){return(0,i.Z)(il).scale(152.63)}function Xh(Je){function at(gt,yt){var Rt=p(yt),Pt=(Je-1)/(Je-Rt*p(gt));return[Pt*Rt*s(gt),Pt*s(yt)]}return at.invert=function(gt,yt){var Rt=gt*gt+yt*yt,Pt=k(Rt),Ot=(Je-k(1-Rt*(Je+1)/(Je-1)))/((Je-1)/Pt+Pt/(Je-1));return[y(gt*Ot,Pt*k(1-Ot*Ot)),Pt?P(yt*Ot/Pt):0]},at}function pu(Je,at){var gt=Xh(Je);if(!at)return gt;var yt=p(at),Rt=s(at);function Pt(Ot,fr){var gr=gt(Ot,fr),ar=gr[1],Tr=ar*Rt/(Je-1)+yt;return[gr[0]*yt/Tr,ar/Tr]}return Pt.invert=function(Ot,fr){var gr=(Je-1)/(Je-1-fr*Rt);return gt.invert(gr*Ot,gr*fr*yt)},Pt}function uc(){var Je=2,at=0,gt=(0,i.r)(pu),yt=gt(Je,at);return yt.distance=function(Rt){return arguments.length?gt(Je=+Rt,at):Je},yt.tilt=function(Rt){return arguments.length?gt(Je,at=Rt*S):at*M},yt.scale(432.147).clipAngle(E(1/Je)*M-1e-6)}var Us=1e-4,fc=1e4,Ll=-180,Pl=Ll+Us,rh=180,Vu=rh-Us,Ci=-90,gu=Ci+Us,cc=90,hc=cc-Us;function $l(Je){return Je.length>0}function cd(Je){return Math.floor(Je*fc)/fc}function nh(Je){return Je===Ci||Je===cc?[0,Je]:[Ll,cd(Je)]}function Gu(Je){var at=Je[0],gt=Je[1],yt=!1;return at<=Pl?(at=Ll,yt=!0):at>=Vu&&(at=rh,yt=!0),gt<=gu?(gt=Ci,yt=!0):gt>=hc&&(gt=cc,yt=!0),yt?[at,gt]:Je}function ah(Je){return Je.map(Gu)}function jh(Je,at,gt){for(var yt=0,Rt=Je.length;yt=Vu||Tr<=gu||Tr>=hc){Pt[Ot]=Gu(gr);for(var Dr=Ot+1;DrPl&&Qrgu&&mn=fr)break;gt.push({index:-1,polygon:at,ring:Pt=Pt.slice(Dr-1)}),Pt[0]=nh(Pt[0][1]),Ot=-1,fr=Pt.length}}}}function Nl(Je){var at,gt=Je.length,yt={},Rt={},Pt,Ot,fr,gr,ar;for(at=0;at0?v-fr:fr)*M],ar=(0,i.Z)(Je(Ot)).rotate(gr),Tr=(0,rt.Z)(gr),Dr=ar.center;return delete ar.rotate,ar.center=function(Yr){return arguments.length?Dr(Tr(Yr)):Tr.invert(Dr())},ar.clipAngle(90)}function $h(Je){var at=p(Je);function gt(yt,Rt){var Pt=(0,co.M)(yt,Rt);return Pt[0]*=at,Pt}return gt.invert=function(yt,Rt){return co.M.invert(yt/at,Rt)},gt}function Wu(){return vc([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function vc(Je,at){return xu($h,Je,at)}function Kh(Je){if(!(Je*=2))return fe.N;var at=-Je/2,gt=-at,yt=Je*Je,Rt=b(gt),Pt=.5/s(gt);function Ot(fr,gr){var ar=E(p(gr)*p(fr-at)),Tr=E(p(gr)*p(fr-gt)),Dr=gr<0?-1:1;return ar*=ar,Tr*=Tr,[(ar-Tr)/(2*Je),Dr*k(4*yt*Tr-(yt-ar+Tr)*(yt-ar+Tr))/(2*Je)]}return Ot.invert=function(fr,gr){var ar=gr*gr,Tr=p(k(ar+(Yr=fr+at)*Yr)),Dr=p(k(ar+(Yr=fr+gt)*Yr)),Yr,Qr;return[y(Qr=Tr-Dr,Yr=(Tr+Dr)*Rt),(gr<0?-1:1)*E(k(Yr*Yr+Qr*Qr)*Pt)]},Ot}function Hs(){return ih([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function ih(Je,at){return xu(Kh,Je,at)}function Jl(Je,at){if(m(at)g&&--fr>0);return[c(Je)*(k(Rt*Rt+4)+Rt)*v/4,h*Ot]};function Jh(){return(0,i.Z)($o).scale(127.16)}function Cf(Je,at,gt,yt,Rt){function Pt(Ot,fr){var gr=gt*s(yt*fr),ar=k(1-gr*gr),Tr=k(2/(1+ar*p(Ot*=Rt)));return[Je*ar*Tr*s(Ot),at*gr*Tr]}return Pt.invert=function(Ot,fr){var gr=Ot/Je,ar=fr/at,Tr=k(gr*gr+ar*ar),Dr=2*P(Tr/2);return[y(Ot*b(Dr),Je*Tr)/Rt,Tr&&P(fr*s(Dr)/(at*gt*Tr))/yt]},Pt}function ol(Je,at,gt,yt){var Rt=v/3;Je=n(Je,g),at=n(at,g),Je=u(Je,h),at=u(at,v-g),gt=n(gt,0),gt=u(gt,100-g),yt=n(yt,g);var Pt=gt/100+1,Ot=yt/100,fr=E(Pt*p(Rt))/Rt,gr=s(Je)/s(fr*h),ar=at/v,Tr=k(Ot*s(Je/2)/s(at/2)),Dr=Tr/k(ar*gr*fr),Yr=1/(Tr*k(ar*gr*fr));return Cf(Dr,Yr,gr,fr,ar)}function Df(){var Je=65*S,at=60*S,gt=20,yt=200,Rt=(0,i.r)(ol),Pt=Rt(Je,at,gt,yt);return Pt.poleline=function(Ot){return arguments.length?Rt(Je=+Ot*S,at,gt,yt):Je*M},Pt.parallels=function(Ot){return arguments.length?Rt(Je,at=+Ot*S,gt,yt):at*M},Pt.inflation=function(Ot){return arguments.length?Rt(Je,at,gt=+Ot,yt):gt},Pt.ratio=function(Ot){return arguments.length?Rt(Je,at,gt,yt=+Ot):yt},Pt.scale(163.775)}function Ql(){return Df().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var pc=4*v+3*k(3),Qh=2*k(2*v*k(3)/pc),sh=Ae(Qh*k(3)/v,Qh,pc/6);function lh(){return(0,i.Z)(sh).scale(176.84)}function bu(Je,at){return[Je*k(1-3*at*at/(v*v)),at]}bu.invert=function(Je,at){return[Je/k(1-3*at*at/(v*v)),at]};function gc(){return(0,i.Z)(bu).scale(152.63)}function Lf(Je,at){var gt=p(at),yt=p(Je)*gt,Rt=1-yt,Pt=p(Je=y(s(Je)*gt,-s(at))),Ot=s(Je);return gt=k(1-yt*yt),[Ot*gt-Pt*Rt,-Pt*gt-Ot*Rt]}Lf.invert=function(Je,at){var gt=(Je*Je+at*at)/-2,yt=k(-gt*(2+gt)),Rt=at*gt+Je*yt,Pt=Je*gt-at*yt,Ot=k(Pt*Pt+Rt*Rt);return[y(yt*Rt,Ot*(1+gt)),Ot?-P(yt*Pt/Ot):0]};function qh(){return(0,i.Z)(Lf).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function Pf(Je,at){var gt=q(Je,at);return[(gt[0]+Je/h)/2,(gt[1]+at)/2]}Pf.invert=function(Je,at){var gt=Je,yt=at,Rt=25;do{var Pt=p(yt),Ot=s(yt),fr=s(2*yt),gr=Ot*Ot,ar=Pt*Pt,Tr=s(gt),Dr=p(gt/2),Yr=s(gt/2),Qr=Yr*Yr,mn=1-ar*Dr*Dr,Tn=mn?E(Pt*Dr)*k(Nn=1/mn):Nn=0,Nn,pa=.5*(2*Tn*Pt*Yr+gt/h)-Je,Na=.5*(Tn*Ot+yt)-at,Ia=.5*Nn*(ar*Qr+Tn*Pt*Dr*gr)+.5/h,_a=Nn*(Tr*fr/4-Tn*Ot*Yr),za=.125*Nn*(fr*Yr-Tn*Ot*ar*Tr),Ai=.5*Nn*(gr*Dr+Tn*Qr*Pt)+.5,to=_a*za-Ai*Ia,Oi=(Na*_a-pa*Ai)/to,ve=(pa*za-Na*Ia)/to;gt-=Oi,yt-=ve}while((m(Oi)>g||m(ve)>g)&&--Rt>0);return[gt,yt]};function ev(){return(0,i.Z)(Pf).scale(158.837)}},33940:function(R,F,e){e.d(F,{Z:function(){return i}});function i(){return new m}function m(){this.reset()}m.prototype={constructor:m,reset:function(){this.s=this.t=0},add:function(p){y(t,p,this.t),y(this,t.s,this.s),this.s?this.t+=t.t:this.s=t.t},valueOf:function(){return this.s}};var t=new m;function y(p,l,d){var r=p.s=l+d,n=r-l,u=r-n;p.t=l-u+(d-n)}},97860:function(R,F,e){e.d(F,{L9:function(){return p},ZP:function(){return A},gL:function(){return o}});var i=e(33940),m=e(39695),t=e(73182),y=e(72736),p=(0,i.Z)(),l=(0,i.Z)(),d,r,n,u,a,o={point:t.Z,lineStart:t.Z,lineEnd:t.Z,polygonStart:function(){p.reset(),o.lineStart=c,o.lineEnd=s},polygonEnd:function(){var v=+p;l.add(v<0?m.BZ+v:v),this.lineStart=this.lineEnd=this.point=t.Z},sphere:function(){l.add(m.BZ)}};function c(){o.point=b}function s(){g(d,r)}function b(v,h){o.point=g,d=v,r=h,v*=m.uR,h*=m.uR,n=v,u=(0,m.mC)(h=h/2+m.pu),a=(0,m.O$)(h)}function g(v,h){v*=m.uR,h*=m.uR,h=h/2+m.pu;var x=v-n,C=x>=0?1:-1,D=C*x,L=(0,m.mC)(h),w=(0,m.O$)(h),M=a*w,S=u*L+M*(0,m.mC)(D),f=M*C*(0,m.O$)(D);p.add((0,m.fv)(f,S)),n=v,u=L,a=w}function A(v){return l.reset(),(0,y.Z)(v,o),l*2}},77338:function(R,F,e){e.d(F,{Z:function(){return P}});var i=e(33940),m=e(97860),t=e(7620),y=e(39695),p=e(72736),l,d,r,n,u,a,o,c,s=(0,i.Z)(),b,g,A={point:v,lineStart:x,lineEnd:C,polygonStart:function(){A.point=D,A.lineStart=L,A.lineEnd=w,s.reset(),m.gL.polygonStart()},polygonEnd:function(){m.gL.polygonEnd(),A.point=v,A.lineStart=x,A.lineEnd=C,m.L9<0?(l=-(r=180),d=-(n=90)):s>y.Ho?n=90:s<-y.Ho&&(d=-90),g[0]=l,g[1]=r},sphere:function(){l=-(r=180),d=-(n=90)}};function v(E,k){b.push(g=[l=E,r=E]),kn&&(n=k)}function h(E,k){var O=(0,t.Og)([E*y.uR,k*y.uR]);if(c){var G=(0,t.T5)(c,O),z=[G[1],-G[0],0],U=(0,t.T5)(z,G);(0,t.iJ)(U),U=(0,t.Y1)(U);var H=E-u,B=H>0?1:-1,W=U[0]*y.RW*B,q,re=(0,y.Wn)(H)>180;re^(B*un&&(n=q)):(W=(W+360)%360-180,re^(B*un&&(n=k))),re?EM(l,r)&&(r=E):M(E,r)>M(l,r)&&(l=E):r>=l?(Er&&(r=E)):E>u?M(l,E)>M(l,r)&&(r=E):M(E,r)>M(l,r)&&(l=E)}else b.push(g=[l=E,r=E]);kn&&(n=k),c=O,u=E}function x(){A.point=h}function C(){g[0]=l,g[1]=r,A.point=v,c=null}function D(E,k){if(c){var O=E-u;s.add((0,y.Wn)(O)>180?O+(O>0?360:-360):O)}else a=E,o=k;m.gL.point(E,k),h(E,k)}function L(){m.gL.lineStart()}function w(){D(a,o),m.gL.lineEnd(),(0,y.Wn)(s)>y.Ho&&(l=-(r=180)),g[0]=l,g[1]=r,c=null}function M(E,k){return(k-=E)<0?k+360:k}function S(E,k){return E[0]-k[0]}function f(E,k){return E[0]<=E[1]?E[0]<=k&&k<=E[1]:kM(G[0],G[1])&&(G[1]=z[1]),M(z[0],G[1])>M(G[0],G[1])&&(G[0]=z[0])):U.push(G=z);for(H=-1/0,O=U.length-1,k=0,G=U[O];k<=O;G=z,++k)z=U[k],(B=M(G[1],z[0]))>H&&(H=B,l=z[0],r=G[1])}return b=g=null,l===1/0||d===1/0?[[NaN,NaN],[NaN,NaN]]:[[l,d],[r,n]]}},7620:function(R,F,e){e.d(F,{Og:function(){return t},T:function(){return d},T5:function(){return p},Y1:function(){return m},iJ:function(){return r},j9:function(){return y},s0:function(){return l}});var i=e(39695);function m(n){return[(0,i.fv)(n[1],n[0]),(0,i.ZR)(n[2])]}function t(n){var u=n[0],a=n[1],o=(0,i.mC)(a);return[o*(0,i.mC)(u),o*(0,i.O$)(u),(0,i.O$)(a)]}function y(n,u){return n[0]*u[0]+n[1]*u[1]+n[2]*u[2]}function p(n,u){return[n[1]*u[2]-n[2]*u[1],n[2]*u[0]-n[0]*u[2],n[0]*u[1]-n[1]*u[0]]}function l(n,u){n[0]+=u[0],n[1]+=u[1],n[2]+=u[2]}function d(n,u){return[n[0]*u,n[1]*u,n[2]*u]}function r(n){var u=(0,i._b)(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=u,n[1]/=u,n[2]/=u}},66624:function(R,F,e){e.d(F,{Z:function(){return O}});var i=e(39695),m=e(73182),t=e(72736),y,p,l,d,r,n,u,a,o,c,s,b,g,A,v,h,x={sphere:m.Z,point:C,lineStart:L,lineEnd:S,polygonStart:function(){x.lineStart=f,x.lineEnd=P},polygonEnd:function(){x.lineStart=L,x.lineEnd=S}};function C(G,z){G*=i.uR,z*=i.uR;var U=(0,i.mC)(z);D(U*(0,i.mC)(G),U*(0,i.O$)(G),(0,i.O$)(z))}function D(G,z,U){++y,l+=(G-l)/y,d+=(z-d)/y,r+=(U-r)/y}function L(){x.point=w}function w(G,z){G*=i.uR,z*=i.uR;var U=(0,i.mC)(z);A=U*(0,i.mC)(G),v=U*(0,i.O$)(G),h=(0,i.O$)(z),x.point=M,D(A,v,h)}function M(G,z){G*=i.uR,z*=i.uR;var U=(0,i.mC)(z),H=U*(0,i.mC)(G),B=U*(0,i.O$)(G),W=(0,i.O$)(z),q=(0,i.fv)((0,i._b)((q=v*W-h*B)*q+(q=h*H-A*W)*q+(q=A*B-v*H)*q),A*H+v*B+h*W);p+=q,n+=q*(A+(A=H)),u+=q*(v+(v=B)),a+=q*(h+(h=W)),D(A,v,h)}function S(){x.point=C}function f(){x.point=E}function P(){k(b,g),x.point=C}function E(G,z){b=G,g=z,G*=i.uR,z*=i.uR,x.point=k;var U=(0,i.mC)(z);A=U*(0,i.mC)(G),v=U*(0,i.O$)(G),h=(0,i.O$)(z),D(A,v,h)}function k(G,z){G*=i.uR,z*=i.uR;var U=(0,i.mC)(z),H=U*(0,i.mC)(G),B=U*(0,i.O$)(G),W=(0,i.O$)(z),q=v*W-h*B,re=h*H-A*W,ie=A*B-v*H,le=(0,i._b)(q*q+re*re+ie*ie),he=(0,i.ZR)(le),$=le&&-he/le;o+=$*q,c+=$*re,s+=$*ie,p+=he,n+=he*(A+(A=H)),u+=he*(v+(v=B)),a+=he*(h+(h=W)),D(A,v,h)}function O(G){y=p=l=d=r=n=u=a=o=c=s=0,(0,t.Z)(G,x);var z=o,U=c,H=s,B=z*z+U*U+H*H;return B0?oc)&&(o+=a*t.BZ));for(var A,v=o;a>0?v>c:v0?m.pi:-m.pi,s=(0,m.Wn)(a-d);(0,m.Wn)(s-m.pi)0?m.ou:-m.ou),l.point(n,r),l.lineEnd(),l.lineStart(),l.point(c,r),l.point(a,r),u=0):n!==c&&s>=m.pi&&((0,m.Wn)(d-n)m.Ho?(0,m.z4)(((0,m.O$)(d)*(a=(0,m.mC)(n))*(0,m.O$)(r)-(0,m.O$)(n)*(u=(0,m.mC)(d))*(0,m.O$)(l))/(u*a*o)):(d+n)/2}function p(l,d,r,n){var u;if(l==null)u=r*m.ou,n.point(-m.pi,u),n.point(0,u),n.point(m.pi,u),n.point(m.pi,0),n.point(m.pi,-u),n.point(0,-u),n.point(-m.pi,-u),n.point(-m.pi,0),n.point(-m.pi,u);else if((0,m.Wn)(l[0]-d[0])>m.Ho){var a=l[0]1&&t.push(t.pop().concat(t.shift()))},result:function(){var p=t;return t=[],y=null,p}}}},1457:function(R,F,e){e.d(F,{Z:function(){return l}});var i=e(7620),m=e(7613),t=e(39695),y=e(67108),p=e(97023);function l(d){var r=(0,t.mC)(d),n=6*t.uR,u=r>0,a=(0,t.Wn)(r)>t.Ho;function o(A,v,h,x){(0,m.m)(x,d,n,h,A,v)}function c(A,v){return(0,t.mC)(A)*(0,t.mC)(v)>r}function s(A){var v,h,x,C,D;return{lineStart:function(){C=x=!1,D=1},point:function(L,w){var M=[L,w],S,f=c(L,w),P=u?f?0:g(L,w):f?g(L+(L<0?t.pi:-t.pi),w):0;if(!v&&(C=x=f)&&A.lineStart(),f!==x&&(S=b(v,M),(!S||(0,y.Z)(v,S)||(0,y.Z)(M,S))&&(M[2]=1)),f!==x)D=0,f?(A.lineStart(),S=b(M,v),A.point(S[0],S[1])):(S=b(v,M),A.point(S[0],S[1],2),A.lineEnd()),v=S;else if(a&&v&&u^f){var E;!(P&h)&&(E=b(M,v,!0))&&(D=0,u?(A.lineStart(),A.point(E[0][0],E[0][1]),A.point(E[1][0],E[1][1]),A.lineEnd()):(A.point(E[1][0],E[1][1]),A.lineEnd(),A.lineStart(),A.point(E[0][0],E[0][1],3)))}f&&(!v||!(0,y.Z)(v,M))&&A.point(M[0],M[1]),v=M,x=f,h=P},lineEnd:function(){x&&A.lineEnd(),v=null},clean:function(){return D|(C&&x)<<1}}}function b(A,v,h){var x=(0,i.Og)(A),C=(0,i.Og)(v),D=[1,0,0],L=(0,i.T5)(x,C),w=(0,i.j9)(L,L),M=L[0],S=w-M*M;if(!S)return!h&&A;var f=r*w/S,P=-r*M/S,E=(0,i.T5)(D,L),k=(0,i.T)(D,f),O=(0,i.T)(L,P);(0,i.s0)(k,O);var G=E,z=(0,i.j9)(k,G),U=(0,i.j9)(G,G),H=z*z-U*((0,i.j9)(k,k)-1);if(!(H<0)){var B=(0,t._b)(H),W=(0,i.T)(G,(-z-B)/U);if((0,i.s0)(W,k),W=(0,i.Y1)(W),!h)return W;var q=A[0],re=v[0],ie=A[1],le=v[1],he;re0^W[1]<((0,t.Wn)(W[0]-q)t.pi^(q<=W[0]&&W[0]<=re)){var Q=(0,i.T)(G,(-z+B)/U);return(0,i.s0)(Q,k),[W,(0,i.Y1)(Q)]}}}function g(A,v){var h=u?d:t.pi-d,x=0;return A<-h?x|=1:A>h&&(x|=2),v<-h?x|=4:v>h&&(x|=8),x}return(0,p.Z)(c,s,o,u?[0,-d]:[-t.pi,d-t.pi])}},97023:function(R,F,e){e.d(F,{Z:function(){return l}});var i=e(85272),m=e(46225),t=e(39695),y=e(23071),p=e(33064);function l(n,u,a,o){return function(c){var s=u(c),b=(0,i.Z)(),g=u(b),A=!1,v,h,x,C={point:D,lineStart:w,lineEnd:M,polygonStart:function(){C.point=S,C.lineStart=f,C.lineEnd=P,h=[],v=[]},polygonEnd:function(){C.point=D,C.lineStart=w,C.lineEnd=M,h=(0,p.TS)(h);var E=(0,y.Z)(v,o);h.length?(A||(c.polygonStart(),A=!0),(0,m.Z)(h,r,E,a,c)):E&&(A||(c.polygonStart(),A=!0),c.lineStart(),a(null,null,1,c),c.lineEnd()),A&&(c.polygonEnd(),A=!1),h=v=null},sphere:function(){c.polygonStart(),c.lineStart(),a(null,null,1,c),c.lineEnd(),c.polygonEnd()}};function D(E,k){n(E,k)&&c.point(E,k)}function L(E,k){s.point(E,k)}function w(){C.point=L,s.lineStart()}function M(){C.point=D,s.lineEnd()}function S(E,k){x.push([E,k]),g.point(E,k)}function f(){g.lineStart(),x=[]}function P(){S(x[0][0],x[0][1]),g.lineEnd();var E=g.clean(),k=b.result(),O,G=k.length,z,U,H;if(x.pop(),v.push(x),x=null,!!G){if(E&1){if(U=k[0],(z=U.length-1)>0){for(A||(c.polygonStart(),A=!0),c.lineStart(),O=0;O1&&E&2&&k.push(k.pop().concat(k.shift())),h.push(k.filter(d))}}return C}}function d(n){return n.length>1}function r(n,u){return((n=n.x)[0]<0?n[1]-t.ou-t.Ho:t.ou-n[1])-((u=u.x)[0]<0?u[1]-t.ou-t.Ho:t.ou-u[1])}},87605:function(R,F,e){e.d(F,{Z:function(){return r}});var i=e(39695),m=e(85272);function t(n,u,a,o,c,s){var b=n[0],g=n[1],A=u[0],v=u[1],h=0,x=1,C=A-b,D=v-g,L;if(L=a-b,!(!C&&L>0)){if(L/=C,C<0){if(L0){if(L>x)return;L>h&&(h=L)}if(L=c-b,!(!C&&L<0)){if(L/=C,C<0){if(L>x)return;L>h&&(h=L)}else if(C>0){if(L0)){if(L/=D,D<0){if(L0){if(L>x)return;L>h&&(h=L)}if(L=s-g,!(!D&&L<0)){if(L/=D,D<0){if(L>x)return;L>h&&(h=L)}else if(D>0){if(L0&&(n[0]=b+h*C,n[1]=g+h*D),x<1&&(u[0]=b+x*C,u[1]=g+x*D),!0}}}}}var y=e(46225),p=e(33064),l=1e9,d=-l;function r(n,u,a,o){function c(v,h){return n<=v&&v<=a&&u<=h&&h<=o}function s(v,h,x,C){var D=0,L=0;if(v==null||(D=b(v,x))!==(L=b(h,x))||A(v,h)<0^x>0)do C.point(D===0||D===3?n:a,D>1?o:u);while((D=(D+x+4)%4)!==L);else C.point(h[0],h[1])}function b(v,h){return(0,i.Wn)(v[0]-n)0?0:3:(0,i.Wn)(v[0]-a)0?2:1:(0,i.Wn)(v[1]-u)0?1:0:h>0?3:2}function g(v,h){return A(v.x,h.x)}function A(v,h){var x=b(v,1),C=b(h,1);return x!==C?x-C:x===0?h[1]-v[1]:x===1?v[0]-h[0]:x===2?v[1]-h[1]:h[0]-v[0]}return function(v){var h=v,x=(0,m.Z)(),C,D,L,w,M,S,f,P,E,k,O,G={point:z,lineStart:W,lineEnd:q,polygonStart:H,polygonEnd:B};function z(ie,le){c(ie,le)&&h.point(ie,le)}function U(){for(var ie=0,le=0,he=D.length;leo&&(te-ae)*(o-fe)>(ne-fe)*(n-ae)&&++ie:ne<=o&&(te-ae)*(o-fe)<(ne-fe)*(n-ae)&&--ie;return ie}function H(){h=x,C=[],D=[],O=!0}function B(){var ie=U(),le=O&&ie,he=(C=(0,p.TS)(C)).length;(le||he)&&(v.polygonStart(),le&&(v.lineStart(),s(null,null,1,v),v.lineEnd()),he&&(0,y.Z)(C,g,ie,s,v),v.polygonEnd()),h=v,C=D=L=null}function W(){G.point=re,D&&D.push(L=[]),k=!0,E=!1,f=P=NaN}function q(){C&&(re(w,M),S&&E&&x.rejoin(),C.push(x.result())),G.point=z,E&&h.lineEnd()}function re(ie,le){var he=c(ie,le);if(D&&L.push([ie,le]),k)w=ie,M=le,S=he,k=!1,he&&(h.lineStart(),h.point(ie,le));else if(he&&E)h.point(ie,le);else{var $=[f=Math.max(d,Math.min(l,f)),P=Math.max(d,Math.min(l,P))],Z=[ie=Math.max(d,Math.min(l,ie)),le=Math.max(d,Math.min(l,le))];t($,Z,n,u,a,o)?(E||(h.lineStart(),h.point($[0],$[1])),h.point(Z[0],Z[1]),he||h.lineEnd(),O=!1):he&&(h.lineStart(),h.point(ie,le),O=!1)}f=ie,P=le,E=he}return G}}},46225:function(R,F,e){e.d(F,{Z:function(){return y}});var i=e(67108),m=e(39695);function t(l,d,r,n){this.x=l,this.z=d,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function y(l,d,r,n,u){var a=[],o=[],c,s;if(l.forEach(function(x){if(!((C=x.length-1)<=0)){var C,D=x[0],L=x[C],w;if((0,i.Z)(D,L)){if(!D[2]&&!L[2]){for(u.lineStart(),c=0;c=0;--c)u.point((A=g[c])[0],A[1]);else n(v.x,v.p.x,-1,u);v=v.p}v=v.o,g=v.z,h=!h}while(!v.v);u.lineEnd()}}}function p(l){if(!!(d=l.length)){for(var d,r=0,n=l[0],u;++r0&&(un=S(mr[xn],mr[xn-1]),un>0&&zr<=un&&kr<=un&&(zr+kr-un)*(1-Math.pow((zr-kr)/un,2))a.Ho}).map(fa)).concat((0,B.w6)((0,a.mD)(xn/Qn)*Qn,un,Qn).filter(function(Dn){return(0,a.Wn)(Dn%aa)>a.Ho}).map(ra))}return pn.lines=function(){return Hn().map(function(Dn){return{type:"LineString",coordinates:Dn}})},pn.outline=function(){return{type:"Polygon",coordinates:[Nr(kr).concat(sn(An).slice(1),Nr(zr).reverse().slice(1),sn(bn).reverse().slice(1))]}},pn.extent=function(Dn){return arguments.length?pn.extentMajor(Dn).extentMinor(Dn):pn.extentMinor()},pn.extentMajor=function(Dn){return arguments.length?(kr=+Dn[0][0],zr=+Dn[1][0],bn=+Dn[0][1],An=+Dn[1][1],kr>zr&&(Dn=kr,kr=zr,zr=Dn),bn>An&&(Dn=bn,bn=An,An=Dn),pn.precision(an)):[[kr,bn],[zr,An]]},pn.extentMinor=function(Dn){return arguments.length?(cr=+Dn[0][0],mr=+Dn[1][0],xn=+Dn[0][1],un=+Dn[1][1],cr>mr&&(Dn=cr,cr=mr,mr=Dn),xn>un&&(Dn=xn,xn=un,un=Dn),pn.precision(an)):[[cr,xn],[mr,un]]},pn.step=function(Dn){return arguments.length?pn.stepMajor(Dn).stepMinor(Dn):pn.stepMinor()},pn.stepMajor=function(Dn){return arguments.length?(sa=+Dn[0],aa=+Dn[1],pn):[sa,aa]},pn.stepMinor=function(Dn){return arguments.length?(_n=+Dn[0],Qn=+Dn[1],pn):[_n,Qn]},pn.precision=function(Dn){return arguments.length?(an=+Dn,fa=W(xn,un,90),ra=q(cr,mr,an),Nr=W(bn,An,90),sn=q(kr,zr,an),pn):an},pn.extentMajor([[-180,-90+a.Ho],[180,90-a.Ho]]).extentMinor([[-180,-80-a.Ho],[180,80+a.Ho]])}function ie(){return re()()}var le=e(83074),he=e(8593),$=(0,u.Z)(),Z=(0,u.Z)(),K,Q,ae,fe,te={point:o.Z,lineStart:o.Z,lineEnd:o.Z,polygonStart:function(){te.lineStart=ne,te.lineEnd=de},polygonEnd:function(){te.lineStart=te.lineEnd=te.point=o.Z,$.add((0,a.Wn)(Z)),Z.reset()},result:function(){var mr=$/2;return $.reset(),mr}};function ne(){te.point=ce}function ce(mr,cr){te.point=oe,K=ae=mr,Q=fe=cr}function oe(mr,cr){Z.add(fe*mr-ae*cr),ae=mr,fe=cr}function de(){oe(K,Q)}var we=te,Se=e(3559),Te=0,Fe=0,Ie=0,Me=0,Ae=0,De=0,ke=0,We=0,_e=0,Ye,Pe,Ve,Ze,Ke={point:lt,lineStart:vt,lineEnd:et,polygonStart:function(){Ke.lineStart=Ue,Ke.lineEnd=Be},polygonEnd:function(){Ke.point=lt,Ke.lineStart=vt,Ke.lineEnd=et},result:function(){var mr=_e?[ke/_e,We/_e]:De?[Me/De,Ae/De]:Ie?[Te/Ie,Fe/Ie]:[NaN,NaN];return Te=Fe=Ie=Me=Ae=De=ke=We=_e=0,mr}};function lt(mr,cr){Te+=mr,Fe+=cr,++Ie}function vt(){Ke.point=mt}function mt(mr,cr){Ke.point=Et,lt(Ve=mr,Ze=cr)}function Et(mr,cr){var zr=mr-Ve,kr=cr-Ze,un=(0,a._b)(zr*zr+kr*kr);Me+=un*(Ve+mr)/2,Ae+=un*(Ze+cr)/2,De+=un,lt(Ve=mr,Ze=cr)}function et(){Ke.point=lt}function Ue(){Ke.point=rt}function Be(){ot(Ye,Pe)}function rt(mr,cr){Ke.point=ot,lt(Ye=Ve=mr,Pe=Ze=cr)}function ot(mr,cr){var zr=mr-Ve,kr=cr-Ze,un=(0,a._b)(zr*zr+kr*kr);Me+=un*(Ve+mr)/2,Ae+=un*(Ze+cr)/2,De+=un,un=Ze*mr-Ve*cr,ke+=un*(Ve+mr),We+=un*(Ze+cr),_e+=un*3,lt(Ve=mr,Ze=cr)}var qe=Ke;function Oe(mr){this._context=mr}Oe.prototype={_radius:4.5,pointRadius:function(mr){return this._radius=mr,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(mr,cr){switch(this._point){case 0:{this._context.moveTo(mr,cr),this._point=1;break}case 1:{this._context.lineTo(mr,cr);break}default:{this._context.moveTo(mr+this._radius,cr),this._context.arc(mr,cr,this._radius,0,a.BZ);break}}},result:o.Z};var Ce=(0,u.Z)(),pe,be,Re,He,st,ct={point:o.Z,lineStart:function(){ct.point=bt},lineEnd:function(){pe&&Lt(be,Re),ct.point=o.Z},polygonStart:function(){pe=!0},polygonEnd:function(){pe=null},result:function(){var mr=+Ce;return Ce.reset(),mr}};function bt(mr,cr){ct.point=Lt,be=He=mr,Re=st=cr}function Lt(mr,cr){He-=mr,st-=cr,Ce.add((0,a._b)(He*He+st*st)),He=mr,st=cr}var Ut=ct;function Gt(){this._string=[]}Gt.prototype={_radius:4.5,_circle:Ft(4.5),pointRadius:function(mr){return(mr=+mr)!==this._radius&&(this._radius=mr,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(mr,cr){switch(this._point){case 0:{this._string.push("M",mr,",",cr),this._point=1;break}case 1:{this._string.push("L",mr,",",cr);break}default:{this._circle==null&&(this._circle=Ft(this._radius)),this._string.push("M",mr,",",cr,this._circle);break}}},result:function(){if(this._string.length){var mr=this._string.join("");return this._string=[],mr}else return null}};function Ft(mr){return"m0,"+mr+"a"+mr+","+mr+" 0 1,1 0,"+-2*mr+"a"+mr+","+mr+" 0 1,1 0,"+2*mr+"z"}function tr(mr,cr){var zr=4.5,kr,un;function xn(An){return An&&(typeof zr=="function"&&un.pointRadius(+zr.apply(this,arguments)),(0,c.Z)(An,kr(un))),un.result()}return xn.area=function(An){return(0,c.Z)(An,kr(we)),we.result()},xn.measure=function(An){return(0,c.Z)(An,kr(Ut)),Ut.result()},xn.bounds=function(An){return(0,c.Z)(An,kr(Se.Z)),Se.Z.result()},xn.centroid=function(An){return(0,c.Z)(An,kr(qe)),qe.result()},xn.projection=function(An){return arguments.length?(kr=An==null?(mr=null,he.Z):(mr=An).stream,xn):mr},xn.context=function(An){return arguments.length?(un=An==null?(cr=null,new Gt):new Oe(cr=An),typeof zr!="function"&&un.pointRadius(zr),xn):cr},xn.pointRadius=function(An){return arguments.length?(zr=typeof An=="function"?An:(un.pointRadius(+An),+An),xn):zr},xn.projection(mr).context(cr)}var lr=e(15002);function Or(mr){var cr=0,zr=a.pi/3,kr=(0,lr.r)(mr),un=kr(cr,zr);return un.parallels=function(xn){return arguments.length?kr(cr=xn[0]*a.uR,zr=xn[1]*a.uR):[cr*a.RW,zr*a.RW]},un}function xt(mr){var cr=(0,a.mC)(mr);function zr(kr,un){return[kr*cr,(0,a.O$)(un)/cr]}return zr.invert=function(kr,un){return[kr/cr,(0,a.ZR)(un*cr)]},zr}function jt(mr,cr){var zr=(0,a.O$)(mr),kr=(zr+(0,a.O$)(cr))/2;if((0,a.Wn)(kr)=.12&&an<.234&&sn>=-.425&&sn<-.214?un:an>=.166&&an<.234&&sn>=-.214&&sn<-.115?An:zr).invert(fa)},sa.stream=function(fa){return mr&&cr===fa?mr:mr=ht([zr.stream(cr=fa),un.stream(fa),An.stream(fa)])},sa.precision=function(fa){return arguments.length?(zr.precision(fa),un.precision(fa),An.precision(fa),aa()):zr.precision()},sa.scale=function(fa){return arguments.length?(zr.scale(fa),un.scale(fa*.35),An.scale(fa),sa.translate(zr.translate())):zr.scale()},sa.translate=function(fa){if(!arguments.length)return zr.translate();var ra=zr.scale(),Nr=+fa[0],sn=+fa[1];return kr=zr.translate(fa).clipExtent([[Nr-.455*ra,sn-.238*ra],[Nr+.455*ra,sn+.238*ra]]).stream(Qn),xn=un.translate([Nr-.307*ra,sn+.201*ra]).clipExtent([[Nr-.425*ra+a.Ho,sn+.12*ra+a.Ho],[Nr-.214*ra-a.Ho,sn+.234*ra-a.Ho]]).stream(Qn),bn=An.translate([Nr-.205*ra,sn+.212*ra]).clipExtent([[Nr-.214*ra+a.Ho,sn+.166*ra+a.Ho],[Nr-.115*ra-a.Ho,sn+.234*ra-a.Ho]]).stream(Qn),aa()},sa.fitExtent=function(fa,ra){return(0,dr.qg)(sa,fa,ra)},sa.fitSize=function(fa,ra){return(0,dr.mF)(sa,fa,ra)},sa.fitWidth=function(fa,ra){return(0,dr.V6)(sa,fa,ra)},sa.fitHeight=function(fa,ra){return(0,dr.rf)(sa,fa,ra)};function aa(){return mr=cr=null,sa}return sa.scale(1070)}var wt=e(12956),St=e(17889),Dt=e(49386);function Mt(mr,cr){return[mr,(0,a.cM)((0,a.OR)((a.ou+cr)/2))]}Mt.invert=function(mr,cr){return[mr,2*(0,a.z4)((0,a.Qq)(cr))-a.ou]};function zt(){return Vt(Mt).scale(961/a.BZ)}function Vt(mr){var cr=(0,lr.Z)(mr),zr=cr.center,kr=cr.scale,un=cr.translate,xn=cr.clipExtent,An=null,bn,_n,Qn;cr.scale=function(aa){return arguments.length?(kr(aa),sa()):kr()},cr.translate=function(aa){return arguments.length?(un(aa),sa()):un()},cr.center=function(aa){return arguments.length?(zr(aa),sa()):zr()},cr.clipExtent=function(aa){return arguments.length?(aa==null?An=bn=_n=Qn=null:(An=+aa[0][0],bn=+aa[0][1],_n=+aa[1][0],Qn=+aa[1][1]),sa()):An==null?null:[[An,bn],[_n,Qn]]};function sa(){var aa=a.pi*kr(),fa=cr((0,Dt.Z)(cr.rotate()).invert([0,0]));return xn(An==null?[[fa[0]-aa,fa[1]-aa],[fa[0]+aa,fa[1]+aa]]:mr===Mt?[[Math.max(fa[0]-aa,An),bn],[Math.min(fa[0]+aa,_n),Qn]]:[[An,Math.max(fa[1]-aa,bn)],[_n,Math.min(fa[1]+aa,Qn)]])}return sa()}function Kt(mr){return(0,a.OR)((a.ou+mr)/2)}function $t(mr,cr){var zr=(0,a.mC)(mr),kr=mr===cr?(0,a.O$)(mr):(0,a.cM)(zr/(0,a.mC)(cr))/(0,a.cM)(Kt(cr)/Kt(mr)),un=zr*(0,a.sQ)(Kt(mr),kr)/kr;if(!kr)return Mt;function xn(An,bn){un>0?bn<-a.ou+a.Ho&&(bn=-a.ou+a.Ho):bn>a.ou-a.Ho&&(bn=a.ou-a.Ho);var _n=un/(0,a.sQ)(Kt(bn),kr);return[_n*(0,a.O$)(kr*An),un-_n*(0,a.mC)(kr*An)]}return xn.invert=function(An,bn){var _n=un-bn,Qn=(0,a.Xx)(kr)*(0,a._b)(An*An+_n*_n),sa=(0,a.fv)(An,(0,a.Wn)(_n))*(0,a.Xx)(_n);return _n*kr<0&&(sa-=a.pi*(0,a.Xx)(An)*(0,a.Xx)(_n)),[sa/kr,2*(0,a.z4)((0,a.sQ)(un/Qn,1/kr))-a.ou]},xn}function ir(){return Or($t).scale(109.5).parallels([30,30])}var Mr=e(97492);function Xe(mr,cr){var zr=(0,a.mC)(mr),kr=mr===cr?(0,a.O$)(mr):(zr-(0,a.mC)(cr))/(cr-mr),un=zr/kr+mr;if((0,a.Wn)(kr)2?kr[2]+90:90]):(kr=zr(),[kr[0],kr[1],kr[2]-90])},zr([0,0,90]).scale(159.155)}},83074:function(R,F,e){e.d(F,{Z:function(){return m}});var i=e(39695);function m(t,y){var p=t[0]*i.uR,l=t[1]*i.uR,d=y[0]*i.uR,r=y[1]*i.uR,n=(0,i.mC)(l),u=(0,i.O$)(l),a=(0,i.mC)(r),o=(0,i.O$)(r),c=n*(0,i.mC)(p),s=n*(0,i.O$)(p),b=a*(0,i.mC)(d),g=a*(0,i.O$)(d),A=2*(0,i.ZR)((0,i._b)((0,i.Jy)(r-l)+n*a*(0,i.Jy)(d-p))),v=(0,i.O$)(A),h=A?function(x){var C=(0,i.O$)(x*=A)/v,D=(0,i.O$)(A-x)/v,L=D*c+C*b,w=D*s+C*g,M=D*u+C*o;return[(0,i.fv)(w,L)*i.RW,(0,i.fv)(M,(0,i._b)(L*L+w*w))*i.RW]}:function(){return[p*i.RW,l*i.RW]};return h.distance=A,h}},39695:function(R,F,e){e.d(F,{BZ:function(){return l},Ho:function(){return i},Jy:function(){return L},Kh:function(){return C},O$:function(){return A},OR:function(){return x},Qq:function(){return s},RW:function(){return d},Wn:function(){return n},Xx:function(){return v},ZR:function(){return D},_b:function(){return h},aW:function(){return m},cM:function(){return b},fv:function(){return a},mC:function(){return o},mD:function(){return c},ou:function(){return y},pi:function(){return t},pu:function(){return p},sQ:function(){return g},uR:function(){return r},z4:function(){return u}});var i=1e-6,m=1e-12,t=Math.PI,y=t/2,p=t/4,l=t*2,d=180/t,r=t/180,n=Math.abs,u=Math.atan,a=Math.atan2,o=Math.cos,c=Math.ceil,s=Math.exp,b=Math.log,g=Math.pow,A=Math.sin,v=Math.sign||function(w){return w>0?1:w<0?-1:0},h=Math.sqrt,x=Math.tan;function C(w){return w>1?0:w<-1?t:Math.acos(w)}function D(w){return w>1?y:w<-1?-y:Math.asin(w)}function L(w){return(w=A(w/2))*w}},73182:function(R,F,e){e.d(F,{Z:function(){return i}});function i(){}},3559:function(R,F,e){var i=e(73182),m=1/0,t=m,y=-m,p=y,l={point:d,lineStart:i.Z,lineEnd:i.Z,polygonStart:i.Z,polygonEnd:i.Z,result:function(){var r=[[m,t],[y,p]];return y=p=-(t=m=1/0),r}};function d(r,n){ry&&(y=r),np&&(p=n)}F.Z=l},67108:function(R,F,e){e.d(F,{Z:function(){return m}});var i=e(39695);function m(t,y){return(0,i.Wn)(t[0]-y[0])=0?1:-1,G=O*k,z=G>t.pi,U=D*P;if(y.add((0,t.fv)(U*O*(0,t.O$)(G),L*E+U*(0,t.mC)(G))),c+=z?k+O*t.BZ:k,z^x>=n^S>=n){var H=(0,m.T5)((0,m.Og)(h),(0,m.Og)(M));(0,m.iJ)(H);var B=(0,m.T5)(o,H);(0,m.iJ)(B);var W=(z^k>=0?-1:1)*(0,t.ZR)(B[2]);(u>W||u===W&&(H[0]||H[1]))&&(s+=z^k>=0?1:-1)}}return(c<-t.Ho||c4*L&&W--){var he=P+U,$=E+H,Z=k+B,K=(0,l._b)(he*he+$*$+Z*Z),Q=(0,l.ZR)(Z/=K),ae=(0,l.Wn)((0,l.Wn)(Z)-1)L||(0,l.Wn)((re*ce+ie*oe)/le-.5)>.3||P*U+E*H+k*B2?de[2]%360*l.uR:0,ce()):[E*l.RW,k*l.RW,O*l.RW]},te.angle=function(de){return arguments.length?(z=de%360*l.uR,ce()):z*l.RW},te.reflectX=function(de){return arguments.length?(U=de?-1:1,ce()):U<0},te.reflectY=function(de){return arguments.length?(H=de?-1:1,ce()):H<0},te.precision=function(de){return arguments.length?(Z=c(K,$=de*de),oe()):(0,l._b)($)},te.fitExtent=function(de,we){return(0,n.qg)(te,de,we)},te.fitSize=function(de,we){return(0,n.mF)(te,de,we)},te.fitWidth=function(de,we){return(0,n.V6)(te,de,we)},te.fitHeight=function(de,we){return(0,n.rf)(te,de,we)};function ce(){var de=h(w,0,0,U,H,z).apply(null,L(f,P)),we=(z?h:v)(w,M-de[0],S-de[1],U,H,z);return G=(0,d.I)(E,k,O),K=(0,y.Z)(L,we),Q=(0,y.Z)(G,K),Z=c(K,$),oe()}function oe(){return ae=fe=null,te}return function(){return L=D.apply(this,arguments),te.invert=L.invert&&ne,ce()}}},26867:function(R,F,e){e.d(F,{K:function(){return t},Z:function(){return y}});var i=e(15002),m=e(39695);function t(p,l){var d=l*l,r=d*d;return[p*(.8707-.131979*d+r*(-.013791+r*(.003971*d-.001529*r))),l*(1.007226+d*(.015085+r*(-.044475+.028874*d-.005916*r)))]}t.invert=function(p,l){var d=l,r=25,n;do{var u=d*d,a=u*u;d-=n=(d*(1.007226+u*(.015085+a*(-.044475+.028874*u-.005916*a)))-l)/(1.007226+u*(.045255+a*(-.311325+.259866*u-.06507600000000001*a)))}while((0,m.Wn)(n)>m.Ho&&--r>0);return[p/(.8707+(u=d*d)*(-.131979+u*(-.013791+u*u*u*(.003971-.001529*u)))),d]};function y(){return(0,i.Z)(t).scale(175.295)}},57962:function(R,F,e){e.d(F,{I:function(){return y},Z:function(){return p}});var i=e(39695),m=e(25382),t=e(15002);function y(l,d){return[(0,i.mC)(d)*(0,i.O$)(l),(0,i.O$)(d)]}y.invert=(0,m.O)(i.ZR);function p(){return(0,t.Z)(y).scale(249.5).clipAngle(90+i.Ho)}},49386:function(R,F,e){e.d(F,{I:function(){return y},Z:function(){return r}});var i=e(96059),m=e(39695);function t(n,u){return[(0,m.Wn)(n)>m.pi?n+Math.round(-n/m.BZ)*m.BZ:n,u]}t.invert=t;function y(n,u,a){return(n%=m.BZ)?u||a?(0,i.Z)(l(n),d(u,a)):l(n):u||a?d(u,a):t}function p(n){return function(u,a){return u+=n,[u>m.pi?u-m.BZ:u<-m.pi?u+m.BZ:u,a]}}function l(n){var u=p(n);return u.invert=p(-n),u}function d(n,u){var a=(0,m.mC)(n),o=(0,m.O$)(n),c=(0,m.mC)(u),s=(0,m.O$)(u);function b(g,A){var v=(0,m.mC)(A),h=(0,m.mC)(g)*v,x=(0,m.O$)(g)*v,C=(0,m.O$)(A),D=C*a+h*o;return[(0,m.fv)(x*c-D*s,h*a-C*o),(0,m.ZR)(D*c+x*s)]}return b.invert=function(g,A){var v=(0,m.mC)(A),h=(0,m.mC)(g)*v,x=(0,m.O$)(g)*v,C=(0,m.O$)(A),D=C*c-x*s;return[(0,m.fv)(x*c+C*s,h*a+D*o),(0,m.ZR)(D*a-h*o)]},b}function r(n){n=y(n[0]*m.uR,n[1]*m.uR,n.length>2?n[2]*m.uR:0);function u(a){return a=n(a[0]*m.uR,a[1]*m.uR),a[0]*=m.RW,a[1]*=m.RW,a}return u.invert=function(a){return a=n.invert(a[0]*m.uR,a[1]*m.uR),a[0]*=m.RW,a[1]*=m.RW,a},u}},72736:function(R,F,e){e.d(F,{Z:function(){return l}});function i(d,r){d&&t.hasOwnProperty(d.type)&&t[d.type](d,r)}var m={Feature:function(d,r){i(d.geometry,r)},FeatureCollection:function(d,r){for(var n=d.features,u=-1,a=n.length;++u=0;)Ce+=pe[be].value;Oe.value=Ce}function u(){return this.eachAfter(n)}function a(Oe){var Ce=this,pe,be=[Ce],Re,He,st;do for(pe=be.reverse(),be=[];Ce=pe.pop();)if(Oe(Ce),Re=Ce.children,Re)for(He=0,st=Re.length;He=0;--Re)pe.push(be[Re]);return this}function c(Oe){for(var Ce=this,pe=[Ce],be=[],Re,He,st;Ce=pe.pop();)if(be.push(Ce),Re=Ce.children,Re)for(He=0,st=Re.length;He=0;)pe+=be[Re].value;Ce.value=pe})}function b(Oe){return this.eachBefore(function(Ce){Ce.children&&Ce.children.sort(Oe)})}function g(Oe){for(var Ce=this,pe=A(Ce,Oe),be=[Ce];Ce!==pe;)Ce=Ce.parent,be.push(Ce);for(var Re=be.length;Oe!==pe;)be.splice(Re,0,Oe),Oe=Oe.parent;return be}function A(Oe,Ce){if(Oe===Ce)return Oe;var pe=Oe.ancestors(),be=Ce.ancestors(),Re=null;for(Oe=pe.pop(),Ce=be.pop();Oe===Ce;)Re=Oe,Oe=pe.pop(),Ce=be.pop();return Re}function v(){for(var Oe=this,Ce=[Oe];Oe=Oe.parent;)Ce.push(Oe);return Ce}function h(){var Oe=[];return this.each(function(Ce){Oe.push(Ce)}),Oe}function x(){var Oe=[];return this.eachBefore(function(Ce){Ce.children||Oe.push(Ce)}),Oe}function C(){var Oe=this,Ce=[];return Oe.each(function(pe){pe!==Oe&&Ce.push({source:pe.parent,target:pe})}),Ce}function D(Oe,Ce){var pe=new f(Oe),be=+Oe.value&&(pe.value=Oe.value),Re,He=[pe],st,ct,bt,Lt;for(Ce==null&&(Ce=w);Re=He.pop();)if(be&&(Re.value=+Re.data.value),(ct=Ce(Re.data))&&(Lt=ct.length))for(Re.children=new Array(Lt),bt=Lt-1;bt>=0;--bt)He.push(st=Re.children[bt]=new f(ct[bt])),st.parent=Re,st.depth=Re.depth+1;return pe.eachBefore(S)}function L(){return D(this).eachBefore(M)}function w(Oe){return Oe.children}function M(Oe){Oe.data=Oe.data.data}function S(Oe){var Ce=0;do Oe.height=Ce;while((Oe=Oe.parent)&&Oe.height<++Ce)}function f(Oe){this.data=Oe,this.depth=this.height=0,this.parent=null}f.prototype=D.prototype={constructor:f,count:u,each:a,eachAfter:c,eachBefore:o,sum:s,sort:b,path:g,ancestors:v,descendants:h,leaves:x,links:C,copy:L};var P=Array.prototype.slice;function E(Oe){for(var Ce=Oe.length,pe,be;Ce;)be=Math.random()*Ce--|0,pe=Oe[Ce],Oe[Ce]=Oe[be],Oe[be]=pe;return Oe}function k(Oe){for(var Ce=0,pe=(Oe=E(P.call(Oe))).length,be=[],Re,He;Ce0&&pe*pe>be*be+Re*Re}function U(Oe,Ce){for(var pe=0;pebt?(Re=(Lt+bt-He)/(2*Lt),ct=Math.sqrt(Math.max(0,bt/Lt-Re*Re)),pe.x=Oe.x-Re*be-ct*st,pe.y=Oe.y-Re*st+ct*be):(Re=(Lt+He-bt)/(2*Lt),ct=Math.sqrt(Math.max(0,He/Lt-Re*Re)),pe.x=Ce.x+Re*be-ct*st,pe.y=Ce.y+Re*st+ct*be)):(pe.x=Ce.x+pe.r,pe.y=Ce.y)}function ie(Oe,Ce){var pe=Oe.r+Ce.r-1e-6,be=Ce.x-Oe.x,Re=Ce.y-Oe.y;return pe>0&&pe*pe>be*be+Re*Re}function le(Oe){var Ce=Oe._,pe=Oe.next._,be=Ce.r+pe.r,Re=(Ce.x*pe.r+pe.x*Ce.r)/be,He=(Ce.y*pe.r+pe.y*Ce.r)/be;return Re*Re+He*He}function he(Oe){this._=Oe,this.next=null,this.previous=null}function $(Oe){if(!(Re=Oe.length))return 0;var Ce,pe,be,Re,He,st,ct,bt,Lt,Ut,Gt;if(Ce=Oe[0],Ce.x=0,Ce.y=0,!(Re>1))return Ce.r;if(pe=Oe[1],Ce.x=-pe.r,pe.x=Ce.r,pe.y=0,!(Re>2))return Ce.r+pe.r;re(pe,Ce,be=Oe[2]),Ce=new he(Ce),pe=new he(pe),be=new he(be),Ce.next=be.previous=pe,pe.next=Ce.previous=be,be.next=pe.previous=Ce;e:for(ct=3;ct0)throw new Error("cycle");return ct}return pe.id=function(be){return arguments.length?(Oe=Q(be),pe):Oe},pe.parentId=function(be){return arguments.length?(Ce=Q(be),pe):Ce},pe}function We(Oe,Ce){return Oe.parent===Ce.parent?1:2}function _e(Oe){var Ce=Oe.children;return Ce?Ce[0]:Oe.t}function Ye(Oe){var Ce=Oe.children;return Ce?Ce[Ce.length-1]:Oe.t}function Pe(Oe,Ce,pe){var be=pe/(Ce.i-Oe.i);Ce.c-=be,Ce.s+=pe,Oe.c+=be,Ce.z+=pe,Ce.m+=pe}function Ve(Oe){for(var Ce=0,pe=0,be=Oe.children,Re=be.length,He;--Re>=0;)He=be[Re],He.z+=Ce,He.m+=Ce,Ce+=He.s+(pe+=He.c)}function Ze(Oe,Ce,pe){return Oe.a.parent===Ce.parent?Oe.a:pe}function Ke(Oe,Ce){this._=Oe,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=Ce}Ke.prototype=Object.create(f.prototype);function lt(Oe){for(var Ce=new Ke(Oe,0),pe,be=[Ce],Re,He,st,ct;pe=be.pop();)if(He=pe._.children)for(pe.children=new Array(ct=He.length),st=ct-1;st>=0;--st)be.push(Re=pe.children[st]=new Ke(He[st],st)),Re.parent=pe;return(Ce.parent=new Ke(null,0)).children=[Ce],Ce}function vt(){var Oe=We,Ce=1,pe=1,be=null;function Re(Lt){var Ut=lt(Lt);if(Ut.eachAfter(He),Ut.parent.m=-Ut.z,Ut.eachBefore(st),be)Lt.eachBefore(bt);else{var Gt=Lt,Ft=Lt,tr=Lt;Lt.eachBefore(function(Yt){Yt.xFt.x&&(Ft=Yt),Yt.depth>tr.depth&&(tr=Yt)});var lr=Gt===Ft?1:Oe(Gt,Ft)/2,Or=lr-Gt.x,xt=Ce/(Ft.x+lr+Or),jt=pe/(tr.depth||1);Lt.eachBefore(function(Yt){Yt.x=(Yt.x+Or)*xt,Yt.y=Yt.depth*jt})}return Lt}function He(Lt){var Ut=Lt.children,Gt=Lt.parent.children,Ft=Lt.i?Gt[Lt.i-1]:null;if(Ut){Ve(Lt);var tr=(Ut[0].z+Ut[Ut.length-1].z)/2;Ft?(Lt.z=Ft.z+Oe(Lt._,Ft._),Lt.m=Lt.z-tr):Lt.z=tr}else Ft&&(Lt.z=Ft.z+Oe(Lt._,Ft._));Lt.parent.A=ct(Lt,Ft,Lt.parent.A||Gt[0])}function st(Lt){Lt._.x=Lt.z+Lt.parent.m,Lt.m+=Lt.parent.m}function ct(Lt,Ut,Gt){if(Ut){for(var Ft=Lt,tr=Lt,lr=Ut,Or=Ft.parent.children[0],xt=Ft.m,jt=tr.m,Yt=lr.m,br=Or.m,dr;lr=Ye(lr),Ft=_e(Ft),lr&&Ft;)Or=_e(Or),tr=Ye(tr),tr.a=Lt,dr=lr.z+Yt-Ft.z-xt+Oe(lr._,Ft._),dr>0&&(Pe(Ze(lr,Lt,Gt),Lt,dr),xt+=dr,jt+=dr),Yt+=lr.m,xt+=Ft.m,br+=Or.m,jt+=tr.m;lr&&!Ye(tr)&&(tr.t=lr,tr.m+=Yt-jt),Ft&&!_e(Or)&&(Or.t=Ft,Or.m+=xt-br,Gt=Lt)}return Gt}function bt(Lt){Lt.x*=Ce,Lt.y=Lt.depth*pe}return Re.separation=function(Lt){return arguments.length?(Oe=Lt,Re):Oe},Re.size=function(Lt){return arguments.length?(be=!1,Ce=+Lt[0],pe=+Lt[1],Re):be?null:[Ce,pe]},Re.nodeSize=function(Lt){return arguments.length?(be=!0,Ce=+Lt[0],pe=+Lt[1],Re):be?[Ce,pe]:null},Re}function mt(Oe,Ce,pe,be,Re){for(var He=Oe.children,st,ct=-1,bt=He.length,Lt=Oe.value&&(Re-pe)/Oe.value;++ctYt&&(Yt=Lt),ut=xt*xt*ht,br=Math.max(Yt/ut,ut/jt),br>dr){xt-=Lt;break}dr=br}st.push(bt={value:xt,dice:tr1?be:1)},pe}(Et);function Be(){var Oe=Ue,Ce=!1,pe=1,be=1,Re=[0],He=ae,st=ae,ct=ae,bt=ae,Lt=ae;function Ut(Ft){return Ft.x0=Ft.y0=0,Ft.x1=pe,Ft.y1=be,Ft.eachBefore(Gt),Re=[0],Ce&&Ft.eachBefore(we),Ft}function Gt(Ft){var tr=Re[Ft.depth],lr=Ft.x0+tr,Or=Ft.y0+tr,xt=Ft.x1-tr,jt=Ft.y1-tr;xt=Ft-1){var Yt=He[Gt];Yt.x0=lr,Yt.y0=Or,Yt.x1=xt,Yt.y1=jt;return}for(var br=Lt[Gt],dr=tr/2+br,ht=Gt+1,ut=Ft-1;ht>>1;Lt[wt]jt-Or){var Mt=(lr*Dt+xt*St)/tr;Ut(Gt,ht,St,lr,Or,Mt,jt),Ut(ht,Ft,Dt,Mt,Or,xt,jt)}else{var zt=(Or*Dt+jt*St)/tr;Ut(Gt,ht,St,lr,Or,xt,zt),Ut(ht,Ft,Dt,lr,zt,xt,jt)}}}function ot(Oe,Ce,pe,be,Re){(Oe.depth&1?mt:Se)(Oe,Ce,pe,be,Re)}var qe=function Oe(Ce){function pe(be,Re,He,st,ct){if((bt=be._squarify)&&bt.ratio===Ce)for(var bt,Lt,Ut,Gt,Ft=-1,tr,lr=bt.length,Or=be.value;++Ft1?be:1)},pe}(Et)},45879:function(R,F,e){e.d(F,{h5:function(){return g}});var i=Math.PI,m=2*i,t=1e-6,y=m-t;function p(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function l(){return new p}p.prototype=l.prototype={constructor:p,moveTo:function(A,v){this._+="M"+(this._x0=this._x1=+A)+","+(this._y0=this._y1=+v)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(A,v){this._+="L"+(this._x1=+A)+","+(this._y1=+v)},quadraticCurveTo:function(A,v,h,x){this._+="Q"+ +A+","+ +v+","+(this._x1=+h)+","+(this._y1=+x)},bezierCurveTo:function(A,v,h,x,C,D){this._+="C"+ +A+","+ +v+","+ +h+","+ +x+","+(this._x1=+C)+","+(this._y1=+D)},arcTo:function(A,v,h,x,C){A=+A,v=+v,h=+h,x=+x,C=+C;var D=this._x1,L=this._y1,w=h-A,M=x-v,S=D-A,f=L-v,P=S*S+f*f;if(C<0)throw new Error("negative radius: "+C);if(this._x1===null)this._+="M"+(this._x1=A)+","+(this._y1=v);else if(P>t)if(!(Math.abs(f*w-M*S)>t)||!C)this._+="L"+(this._x1=A)+","+(this._y1=v);else{var E=h-D,k=x-L,O=w*w+M*M,G=E*E+k*k,z=Math.sqrt(O),U=Math.sqrt(P),H=C*Math.tan((i-Math.acos((O+P-G)/(2*z*U)))/2),B=H/U,W=H/z;Math.abs(B-1)>t&&(this._+="L"+(A+B*S)+","+(v+B*f)),this._+="A"+C+","+C+",0,0,"+ +(f*E>S*k)+","+(this._x1=A+W*w)+","+(this._y1=v+W*M)}},arc:function(A,v,h,x,C,D){A=+A,v=+v,h=+h,D=!!D;var L=h*Math.cos(x),w=h*Math.sin(x),M=A+L,S=v+w,f=1^D,P=D?x-C:C-x;if(h<0)throw new Error("negative radius: "+h);this._x1===null?this._+="M"+M+","+S:(Math.abs(this._x1-M)>t||Math.abs(this._y1-S)>t)&&(this._+="L"+M+","+S),h&&(P<0&&(P=P%m+m),P>y?this._+="A"+h+","+h+",0,1,"+f+","+(A-L)+","+(v-w)+"A"+h+","+h+",0,1,"+f+","+(this._x1=M)+","+(this._y1=S):P>t&&(this._+="A"+h+","+h+",0,"+ +(P>=i)+","+f+","+(this._x1=A+h*Math.cos(C))+","+(this._y1=v+h*Math.sin(C))))},rect:function(A,v,h,x){this._+="M"+(this._x0=this._x1=+A)+","+(this._y0=this._y1=+v)+"h"+ +h+"v"+ +x+"h"+-h+"Z"},toString:function(){return this._}};var d=l,r=Array.prototype.slice;function n(A){return function(){return A}}function u(A){return A[0]}function a(A){return A[1]}function o(A){return A.source}function c(A){return A.target}function s(A){var v=o,h=c,x=u,C=a,D=null;function L(){var w,M=r.call(arguments),S=v.apply(this,M),f=h.apply(this,M);if(D||(D=w=d()),A(D,+x.apply(this,(M[0]=S,M)),+C.apply(this,M),+x.apply(this,(M[0]=f,M)),+C.apply(this,M)),w)return D=null,w+""||null}return L.source=function(w){return arguments.length?(v=w,L):v},L.target=function(w){return arguments.length?(h=w,L):h},L.x=function(w){return arguments.length?(x=typeof w=="function"?w:n(+w),L):x},L.y=function(w){return arguments.length?(C=typeof w=="function"?w:n(+w),L):C},L.context=function(w){return arguments.length?(D=w==null?null:w,L):D},L}function b(A,v,h,x,C){A.moveTo(v,h),A.bezierCurveTo(v=(v+x)/2,h,v,C,x,C)}function g(){return s(b)}},84096:function(R,F,e){e.d(F,{i$:function(){return rt},Dq:function(){return u},g0:function(){return ot}});var i=e(58176),m=e(48480),t=e(59879),y=e(82301),p=e(34823),l=e(79791);function d(Oe){if(0<=Oe.y&&Oe.y<100){var Ce=new Date(-1,Oe.m,Oe.d,Oe.H,Oe.M,Oe.S,Oe.L);return Ce.setFullYear(Oe.y),Ce}return new Date(Oe.y,Oe.m,Oe.d,Oe.H,Oe.M,Oe.S,Oe.L)}function r(Oe){if(0<=Oe.y&&Oe.y<100){var Ce=new Date(Date.UTC(-1,Oe.m,Oe.d,Oe.H,Oe.M,Oe.S,Oe.L));return Ce.setUTCFullYear(Oe.y),Ce}return new Date(Date.UTC(Oe.y,Oe.m,Oe.d,Oe.H,Oe.M,Oe.S,Oe.L))}function n(Oe,Ce,pe){return{y:Oe,m:Ce,d:pe,H:0,M:0,S:0,L:0}}function u(Oe){var Ce=Oe.dateTime,pe=Oe.date,be=Oe.time,Re=Oe.periods,He=Oe.days,st=Oe.shortDays,ct=Oe.months,bt=Oe.shortMonths,Lt=A(Re),Ut=v(Re),Gt=A(He),Ft=v(He),tr=A(st),lr=v(st),Or=A(ct),xt=v(ct),jt=A(bt),Yt=v(bt),br={a:Xe,A:je,b:It,B:_t,c:null,d:re,e:re,f:Z,H:ie,I:le,j:he,L:$,m:K,M:Q,p:Zt,q:rr,Q:et,s:Ue,S:ae,u:fe,U:te,V:ne,w:ce,W:oe,x:null,X:null,y:de,Y:we,Z:Se,"%":Et},dr={a:sr,A:nr,b:Bt,B:hr,c:null,d:Te,e:Te,f:De,H:Fe,I:Ie,j:Me,L:Ae,m:ke,M:We,p:pr,q:wr,Q:et,s:Ue,S:_e,u:Ye,U:Pe,V:Ve,w:Ze,W:Ke,x:null,X:null,y:lt,Y:vt,Z:mt,"%":Et},ht={a:Mt,A:zt,b:Vt,B:Kt,c:$t,d:E,e:E,f:H,H:O,I:O,j:k,L:U,m:P,M:G,p:Dt,q:f,Q:W,s:q,S:z,u:x,U:C,V:D,w:h,W:L,x:ir,X:Mr,y:M,Y:w,Z:S,"%":B};br.x=ut(pe,br),br.X=ut(be,br),br.c=ut(Ce,br),dr.x=ut(pe,dr),dr.X=ut(be,dr),dr.c=ut(Ce,dr);function ut(vr,Jr){return function(_r){var Br=[],wn=-1,Kr=0,Fn=vr.length,In,mr,cr;for(_r instanceof Date||(_r=new Date(+_r));++wn53)return null;"w"in Br||(Br.w=1),"Z"in Br?(Kr=r(n(Br.y,0,1)),Fn=Kr.getUTCDay(),Kr=Fn>4||Fn===0?i.l6.ceil(Kr):(0,i.l6)(Kr),Kr=m.Z.offset(Kr,(Br.V-1)*7),Br.y=Kr.getUTCFullYear(),Br.m=Kr.getUTCMonth(),Br.d=Kr.getUTCDate()+(Br.w+6)%7):(Kr=d(n(Br.y,0,1)),Fn=Kr.getDay(),Kr=Fn>4||Fn===0?t.wA.ceil(Kr):(0,t.wA)(Kr),Kr=y.Z.offset(Kr,(Br.V-1)*7),Br.y=Kr.getFullYear(),Br.m=Kr.getMonth(),Br.d=Kr.getDate()+(Br.w+6)%7)}else("W"in Br||"U"in Br)&&("w"in Br||(Br.w="u"in Br?Br.u%7:"W"in Br?1:0),Fn="Z"in Br?r(n(Br.y,0,1)).getUTCDay():d(n(Br.y,0,1)).getDay(),Br.m=0,Br.d="W"in Br?(Br.w+6)%7+Br.W*7-(Fn+5)%7:Br.w+Br.U*7-(Fn+6)%7);return"Z"in Br?(Br.H+=Br.Z/100|0,Br.M+=Br.Z%100,r(Br)):d(Br)}}function St(vr,Jr,_r,Br){for(var wn=0,Kr=Jr.length,Fn=_r.length,In,mr;wn=Fn)return-1;if(In=Jr.charCodeAt(wn++),In===37){if(In=Jr.charAt(wn++),mr=ht[In in a?Jr.charAt(wn++):In],!mr||(Br=mr(vr,_r,Br))<0)return-1}else if(In!=_r.charCodeAt(Br++))return-1}return Br}function Dt(vr,Jr,_r){var Br=Lt.exec(Jr.slice(_r));return Br?(vr.p=Ut[Br[0].toLowerCase()],_r+Br[0].length):-1}function Mt(vr,Jr,_r){var Br=tr.exec(Jr.slice(_r));return Br?(vr.w=lr[Br[0].toLowerCase()],_r+Br[0].length):-1}function zt(vr,Jr,_r){var Br=Gt.exec(Jr.slice(_r));return Br?(vr.w=Ft[Br[0].toLowerCase()],_r+Br[0].length):-1}function Vt(vr,Jr,_r){var Br=jt.exec(Jr.slice(_r));return Br?(vr.m=Yt[Br[0].toLowerCase()],_r+Br[0].length):-1}function Kt(vr,Jr,_r){var Br=Or.exec(Jr.slice(_r));return Br?(vr.m=xt[Br[0].toLowerCase()],_r+Br[0].length):-1}function $t(vr,Jr,_r){return St(vr,Ce,Jr,_r)}function ir(vr,Jr,_r){return St(vr,pe,Jr,_r)}function Mr(vr,Jr,_r){return St(vr,be,Jr,_r)}function Xe(vr){return st[vr.getDay()]}function je(vr){return He[vr.getDay()]}function It(vr){return bt[vr.getMonth()]}function _t(vr){return ct[vr.getMonth()]}function Zt(vr){return Re[+(vr.getHours()>=12)]}function rr(vr){return 1+~~(vr.getMonth()/3)}function sr(vr){return st[vr.getUTCDay()]}function nr(vr){return He[vr.getUTCDay()]}function Bt(vr){return bt[vr.getUTCMonth()]}function hr(vr){return ct[vr.getUTCMonth()]}function pr(vr){return Re[+(vr.getUTCHours()>=12)]}function wr(vr){return 1+~~(vr.getUTCMonth()/3)}return{format:function(vr){var Jr=ut(vr+="",br);return Jr.toString=function(){return vr},Jr},parse:function(vr){var Jr=wt(vr+="",!1);return Jr.toString=function(){return vr},Jr},utcFormat:function(vr){var Jr=ut(vr+="",dr);return Jr.toString=function(){return vr},Jr},utcParse:function(vr){var Jr=wt(vr+="",!0);return Jr.toString=function(){return vr},Jr}}}var a={"-":"",_:" ",0:"0"},o=/^\s*\d+/,c=/^%/,s=/[\\^$*+?|[\]().{}]/g;function b(Oe,Ce,pe){var be=Oe<0?"-":"",Re=(be?-Oe:Oe)+"",He=Re.length;return be+(He68?1900:2e3),pe+be[0].length):-1}function S(Oe,Ce,pe){var be=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Ce.slice(pe,pe+6));return be?(Oe.Z=be[1]?0:-(be[2]+(be[3]||"00")),pe+be[0].length):-1}function f(Oe,Ce,pe){var be=o.exec(Ce.slice(pe,pe+1));return be?(Oe.q=be[0]*3-3,pe+be[0].length):-1}function P(Oe,Ce,pe){var be=o.exec(Ce.slice(pe,pe+2));return be?(Oe.m=be[0]-1,pe+be[0].length):-1}function E(Oe,Ce,pe){var be=o.exec(Ce.slice(pe,pe+2));return be?(Oe.d=+be[0],pe+be[0].length):-1}function k(Oe,Ce,pe){var be=o.exec(Ce.slice(pe,pe+3));return be?(Oe.m=0,Oe.d=+be[0],pe+be[0].length):-1}function O(Oe,Ce,pe){var be=o.exec(Ce.slice(pe,pe+2));return be?(Oe.H=+be[0],pe+be[0].length):-1}function G(Oe,Ce,pe){var be=o.exec(Ce.slice(pe,pe+2));return be?(Oe.M=+be[0],pe+be[0].length):-1}function z(Oe,Ce,pe){var be=o.exec(Ce.slice(pe,pe+2));return be?(Oe.S=+be[0],pe+be[0].length):-1}function U(Oe,Ce,pe){var be=o.exec(Ce.slice(pe,pe+3));return be?(Oe.L=+be[0],pe+be[0].length):-1}function H(Oe,Ce,pe){var be=o.exec(Ce.slice(pe,pe+6));return be?(Oe.L=Math.floor(be[0]/1e3),pe+be[0].length):-1}function B(Oe,Ce,pe){var be=c.exec(Ce.slice(pe,pe+1));return be?pe+be[0].length:-1}function W(Oe,Ce,pe){var be=o.exec(Ce.slice(pe));return be?(Oe.Q=+be[0],pe+be[0].length):-1}function q(Oe,Ce,pe){var be=o.exec(Ce.slice(pe));return be?(Oe.s=+be[0],pe+be[0].length):-1}function re(Oe,Ce){return b(Oe.getDate(),Ce,2)}function ie(Oe,Ce){return b(Oe.getHours(),Ce,2)}function le(Oe,Ce){return b(Oe.getHours()%12||12,Ce,2)}function he(Oe,Ce){return b(1+y.Z.count((0,p.Z)(Oe),Oe),Ce,3)}function $(Oe,Ce){return b(Oe.getMilliseconds(),Ce,3)}function Z(Oe,Ce){return $(Oe,Ce)+"000"}function K(Oe,Ce){return b(Oe.getMonth()+1,Ce,2)}function Q(Oe,Ce){return b(Oe.getMinutes(),Ce,2)}function ae(Oe,Ce){return b(Oe.getSeconds(),Ce,2)}function fe(Oe){var Ce=Oe.getDay();return Ce===0?7:Ce}function te(Oe,Ce){return b(t.OM.count((0,p.Z)(Oe)-1,Oe),Ce,2)}function ne(Oe,Ce){var pe=Oe.getDay();return Oe=pe>=4||pe===0?(0,t.bL)(Oe):t.bL.ceil(Oe),b(t.bL.count((0,p.Z)(Oe),Oe)+((0,p.Z)(Oe).getDay()===4),Ce,2)}function ce(Oe){return Oe.getDay()}function oe(Oe,Ce){return b(t.wA.count((0,p.Z)(Oe)-1,Oe),Ce,2)}function de(Oe,Ce){return b(Oe.getFullYear()%100,Ce,2)}function we(Oe,Ce){return b(Oe.getFullYear()%1e4,Ce,4)}function Se(Oe){var Ce=Oe.getTimezoneOffset();return(Ce>0?"-":(Ce*=-1,"+"))+b(Ce/60|0,"0",2)+b(Ce%60,"0",2)}function Te(Oe,Ce){return b(Oe.getUTCDate(),Ce,2)}function Fe(Oe,Ce){return b(Oe.getUTCHours(),Ce,2)}function Ie(Oe,Ce){return b(Oe.getUTCHours()%12||12,Ce,2)}function Me(Oe,Ce){return b(1+m.Z.count((0,l.Z)(Oe),Oe),Ce,3)}function Ae(Oe,Ce){return b(Oe.getUTCMilliseconds(),Ce,3)}function De(Oe,Ce){return Ae(Oe,Ce)+"000"}function ke(Oe,Ce){return b(Oe.getUTCMonth()+1,Ce,2)}function We(Oe,Ce){return b(Oe.getUTCMinutes(),Ce,2)}function _e(Oe,Ce){return b(Oe.getUTCSeconds(),Ce,2)}function Ye(Oe){var Ce=Oe.getUTCDay();return Ce===0?7:Ce}function Pe(Oe,Ce){return b(i.Ox.count((0,l.Z)(Oe)-1,Oe),Ce,2)}function Ve(Oe,Ce){var pe=Oe.getUTCDay();return Oe=pe>=4||pe===0?(0,i.hB)(Oe):i.hB.ceil(Oe),b(i.hB.count((0,l.Z)(Oe),Oe)+((0,l.Z)(Oe).getUTCDay()===4),Ce,2)}function Ze(Oe){return Oe.getUTCDay()}function Ke(Oe,Ce){return b(i.l6.count((0,l.Z)(Oe)-1,Oe),Ce,2)}function lt(Oe,Ce){return b(Oe.getUTCFullYear()%100,Ce,2)}function vt(Oe,Ce){return b(Oe.getUTCFullYear()%1e4,Ce,4)}function mt(){return"+0000"}function Et(){return"%"}function et(Oe){return+Oe}function Ue(Oe){return Math.floor(+Oe/1e3)}var Be,rt,ot;qe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function qe(Oe){return Be=u(Oe),rt=Be.format,Be.parse,ot=Be.utcFormat,Be.utcParse,Be}},82301:function(R,F,e){e.d(F,{a:function(){return y}});var i=e(30052),m=e(54263),t=(0,i.Z)(function(p){p.setHours(0,0,0,0)},function(p,l){p.setDate(p.getDate()+l)},function(p,l){return(l-p-(l.getTimezoneOffset()-p.getTimezoneOffset())*m.yB)/m.UD},function(p){return p.getDate()-1});F.Z=t;var y=t.range},54263:function(R,F,e){e.d(F,{UD:function(){return y},Y2:function(){return t},Ym:function(){return i},iM:function(){return p},yB:function(){return m}});var i=1e3,m=6e4,t=36e5,y=864e5,p=6048e5},81041:function(R,F,e){e.r(F),e.d(F,{timeDay:function(){return b.Z},timeDays:function(){return b.a},timeFriday:function(){return g.mC},timeFridays:function(){return g.b$},timeHour:function(){return c},timeHours:function(){return s},timeInterval:function(){return i.Z},timeMillisecond:function(){return t},timeMilliseconds:function(){return y},timeMinute:function(){return u},timeMinutes:function(){return a},timeMonday:function(){return g.wA},timeMondays:function(){return g.bJ},timeMonth:function(){return v},timeMonths:function(){return h},timeSaturday:function(){return g.EY},timeSaturdays:function(){return g.Ff},timeSecond:function(){return d},timeSeconds:function(){return r},timeSunday:function(){return g.OM},timeSundays:function(){return g.vm},timeThursday:function(){return g.bL},timeThursdays:function(){return g.$t},timeTuesday:function(){return g.sy},timeTuesdays:function(){return g.aU},timeWednesday:function(){return g.zg},timeWednesdays:function(){return g.Ld},timeWeek:function(){return g.OM},timeWeeks:function(){return g.vm},timeYear:function(){return x.Z},timeYears:function(){return x.g},utcDay:function(){return f.Z},utcDays:function(){return f.y},utcFriday:function(){return P.QQ},utcFridays:function(){return P.fz},utcHour:function(){return M},utcHours:function(){return S},utcMillisecond:function(){return t},utcMilliseconds:function(){return y},utcMinute:function(){return D},utcMinutes:function(){return L},utcMonday:function(){return P.l6},utcMondays:function(){return P.$3},utcMonth:function(){return k},utcMonths:function(){return O},utcSaturday:function(){return P.g4},utcSaturdays:function(){return P.Q_},utcSecond:function(){return d},utcSeconds:function(){return r},utcSunday:function(){return P.Ox},utcSundays:function(){return P.SU},utcThursday:function(){return P.hB},utcThursdays:function(){return P.xj},utcTuesday:function(){return P.J1},utcTuesdays:function(){return P.DK},utcWednesday:function(){return P.b3},utcWednesdays:function(){return P.uy},utcWeek:function(){return P.Ox},utcWeeks:function(){return P.SU},utcYear:function(){return G.Z},utcYears:function(){return G.D}});var i=e(30052),m=(0,i.Z)(function(){},function(z,U){z.setTime(+z+U)},function(z,U){return U-z});m.every=function(z){return z=Math.floor(z),!isFinite(z)||!(z>0)?null:z>1?(0,i.Z)(function(U){U.setTime(Math.floor(U/z)*z)},function(U,H){U.setTime(+U+H*z)},function(U,H){return(H-U)/z}):m};var t=m,y=m.range,p=e(54263),l=(0,i.Z)(function(z){z.setTime(z-z.getMilliseconds())},function(z,U){z.setTime(+z+U*p.Ym)},function(z,U){return(U-z)/p.Ym},function(z){return z.getUTCSeconds()}),d=l,r=l.range,n=(0,i.Z)(function(z){z.setTime(z-z.getMilliseconds()-z.getSeconds()*p.Ym)},function(z,U){z.setTime(+z+U*p.yB)},function(z,U){return(U-z)/p.yB},function(z){return z.getMinutes()}),u=n,a=n.range,o=(0,i.Z)(function(z){z.setTime(z-z.getMilliseconds()-z.getSeconds()*p.Ym-z.getMinutes()*p.yB)},function(z,U){z.setTime(+z+U*p.Y2)},function(z,U){return(U-z)/p.Y2},function(z){return z.getHours()}),c=o,s=o.range,b=e(82301),g=e(59879),A=(0,i.Z)(function(z){z.setDate(1),z.setHours(0,0,0,0)},function(z,U){z.setMonth(z.getMonth()+U)},function(z,U){return U.getMonth()-z.getMonth()+(U.getFullYear()-z.getFullYear())*12},function(z){return z.getMonth()}),v=A,h=A.range,x=e(34823),C=(0,i.Z)(function(z){z.setUTCSeconds(0,0)},function(z,U){z.setTime(+z+U*p.yB)},function(z,U){return(U-z)/p.yB},function(z){return z.getUTCMinutes()}),D=C,L=C.range,w=(0,i.Z)(function(z){z.setUTCMinutes(0,0,0)},function(z,U){z.setTime(+z+U*p.Y2)},function(z,U){return(U-z)/p.Y2},function(z){return z.getUTCHours()}),M=w,S=w.range,f=e(48480),P=e(58176),E=(0,i.Z)(function(z){z.setUTCDate(1),z.setUTCHours(0,0,0,0)},function(z,U){z.setUTCMonth(z.getUTCMonth()+U)},function(z,U){return U.getUTCMonth()-z.getUTCMonth()+(U.getUTCFullYear()-z.getUTCFullYear())*12},function(z){return z.getUTCMonth()}),k=E,O=E.range,G=e(79791)},30052:function(R,F,e){e.d(F,{Z:function(){return t}});var i=new Date,m=new Date;function t(y,p,l,d){function r(n){return y(n=arguments.length===0?new Date:new Date(+n)),n}return r.floor=function(n){return y(n=new Date(+n)),n},r.ceil=function(n){return y(n=new Date(n-1)),p(n,1),y(n),n},r.round=function(n){var u=r(n),a=r.ceil(n);return n-u0))return o;do o.push(c=new Date(+n)),p(n,a),y(n);while(c=u)for(;y(u),!n(u);)u.setTime(u-1)},function(u,a){if(u>=u)if(a<0)for(;++a<=0;)for(;p(u,-1),!n(u););else for(;--a>=0;)for(;p(u,1),!n(u););})},l&&(r.count=function(n,u){return i.setTime(+n),m.setTime(+u),y(i),y(m),Math.floor(l(i,m))},r.every=function(n){return n=Math.floor(n),!isFinite(n)||!(n>0)?null:n>1?r.filter(d?function(u){return d(u)%n===0}:function(u){return r.count(0,u)%n===0}):r}),r}},48480:function(R,F,e){e.d(F,{y:function(){return y}});var i=e(30052),m=e(54263),t=(0,i.Z)(function(p){p.setUTCHours(0,0,0,0)},function(p,l){p.setUTCDate(p.getUTCDate()+l)},function(p,l){return(l-p)/m.UD},function(p){return p.getUTCDate()-1});F.Z=t;var y=t.range},58176:function(R,F,e){e.d(F,{$3:function(){return o},DK:function(){return c},J1:function(){return l},Ox:function(){return y},QQ:function(){return n},Q_:function(){return A},SU:function(){return a},b3:function(){return d},fz:function(){return g},g4:function(){return u},hB:function(){return r},l6:function(){return p},uy:function(){return s},xj:function(){return b}});var i=e(30052),m=e(54263);function t(v){return(0,i.Z)(function(h){h.setUTCDate(h.getUTCDate()-(h.getUTCDay()+7-v)%7),h.setUTCHours(0,0,0,0)},function(h,x){h.setUTCDate(h.getUTCDate()+x*7)},function(h,x){return(x-h)/m.iM})}var y=t(0),p=t(1),l=t(2),d=t(3),r=t(4),n=t(5),u=t(6),a=y.range,o=p.range,c=l.range,s=d.range,b=r.range,g=n.range,A=u.range},79791:function(R,F,e){e.d(F,{D:function(){return t}});var i=e(30052),m=(0,i.Z)(function(y){y.setUTCMonth(0,1),y.setUTCHours(0,0,0,0)},function(y,p){y.setUTCFullYear(y.getUTCFullYear()+p)},function(y,p){return p.getUTCFullYear()-y.getUTCFullYear()},function(y){return y.getUTCFullYear()});m.every=function(y){return!isFinite(y=Math.floor(y))||!(y>0)?null:(0,i.Z)(function(p){p.setUTCFullYear(Math.floor(p.getUTCFullYear()/y)*y),p.setUTCMonth(0,1),p.setUTCHours(0,0,0,0)},function(p,l){p.setUTCFullYear(p.getUTCFullYear()+l*y)})},F.Z=m;var t=m.range},59879:function(R,F,e){e.d(F,{$t:function(){return b},EY:function(){return u},Ff:function(){return A},Ld:function(){return s},OM:function(){return y},aU:function(){return c},b$:function(){return g},bJ:function(){return o},bL:function(){return r},mC:function(){return n},sy:function(){return l},vm:function(){return a},wA:function(){return p},zg:function(){return d}});var i=e(30052),m=e(54263);function t(v){return(0,i.Z)(function(h){h.setDate(h.getDate()-(h.getDay()+7-v)%7),h.setHours(0,0,0,0)},function(h,x){h.setDate(h.getDate()+x*7)},function(h,x){return(x-h-(x.getTimezoneOffset()-h.getTimezoneOffset())*m.yB)/m.iM})}var y=t(0),p=t(1),l=t(2),d=t(3),r=t(4),n=t(5),u=t(6),a=y.range,o=p.range,c=l.range,s=d.range,b=r.range,g=n.range,A=u.range},34823:function(R,F,e){e.d(F,{g:function(){return t}});var i=e(30052),m=(0,i.Z)(function(y){y.setMonth(0,1),y.setHours(0,0,0,0)},function(y,p){y.setFullYear(y.getFullYear()+p)},function(y,p){return p.getFullYear()-y.getFullYear()},function(y){return y.getFullYear()});m.every=function(y){return!isFinite(y=Math.floor(y))||!(y>0)?null:(0,i.Z)(function(p){p.setFullYear(Math.floor(p.getFullYear()/y)*y),p.setMonth(0,1),p.setHours(0,0,0,0)},function(p,l){p.setFullYear(p.getFullYear()+l*y)})},F.Z=m;var t=m.range},17045:function(R,F,e){var i=e(8709),m=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",t=Object.prototype.toString,y=Array.prototype.concat,p=Object.defineProperty,l=function(a){return typeof a=="function"&&t.call(a)==="[object Function]"},d=e(55622)(),r=p&&d,n=function(a,o,c,s){if(o in a){if(s===!0){if(a[o]===c)return}else if(!l(s)||!s())return}r?p(a,o,{configurable:!0,enumerable:!1,value:c,writable:!0}):a[o]=c},u=function(a,o){var c=arguments.length>2?arguments[2]:{},s=i(o);m&&(s=y.call(s,Object.getOwnPropertySymbols(o)));for(var b=0;br*n){var s=(c-o)/r;l[a]=s*1e3}}return l}function t(y){for(var p=[],l=y[0];l<=y[1];l++)for(var d=String.fromCharCode(l),r=y[0];r"u"&&(t=0),typeof m){case"number":if(m>0)return e(m|0,t);break;case"object":if(typeof m.length=="number")return F(m,t,0);break}return[]}R.exports=i},11474:function(R){R.exports=F,R.exports.default=F;function F(O,G,z){z=z||2;var U=G&&G.length,H=U?G[0]*z:O.length,B=e(O,0,H,z,!0),W=[];if(!B||B.next===B.prev)return W;var q,re,ie,le,he,$,Z;if(U&&(B=d(O,G,B,z)),O.length>80*z){q=ie=O[0],re=le=O[1];for(var K=z;Kie&&(ie=he),$>le&&(le=$);Z=Math.max(ie-q,le-re),Z=Z!==0?1/Z:0}return m(B,W,z,q,re,Z),W}function e(O,G,z,U,H){var B,W;if(H===k(O,G,z,U)>0)for(B=G;B=G;B-=U)W=f(B,O[B],O[B+1],W);return W&&h(W,W.next)&&(P(W),W=W.next),W}function i(O,G){if(!O)return O;G||(G=O);var z=O,U;do if(U=!1,!z.steiner&&(h(z,z.next)||v(z.prev,z,z.next)===0)){if(P(z),z=G=z.prev,z===z.next)break;U=!0}else z=z.next;while(U||z!==G);return G}function m(O,G,z,U,H,B,W){if(!!O){!W&&B&&o(O,U,H,B);for(var q=O,re,ie;O.prev!==O.next;){if(re=O.prev,ie=O.next,B?y(O,U,H,B):t(O)){G.push(re.i/z),G.push(O.i/z),G.push(ie.i/z),P(O),O=ie.next,q=ie.next;continue}if(O=ie,O===q){W?W===1?(O=p(i(O),G,z),m(O,G,z,U,H,B,2)):W===2&&l(O,G,z,U,H,B):m(i(O),G,z,U,H,B,1);break}}}}function t(O){var G=O.prev,z=O,U=O.next;if(v(G,z,U)>=0)return!1;for(var H=O.next.next;H!==O.prev;){if(g(G.x,G.y,z.x,z.y,U.x,U.y,H.x,H.y)&&v(H.prev,H,H.next)>=0)return!1;H=H.next}return!0}function y(O,G,z,U){var H=O.prev,B=O,W=O.next;if(v(H,B,W)>=0)return!1;for(var q=H.xB.x?H.x>W.x?H.x:W.x:B.x>W.x?B.x:W.x,le=H.y>B.y?H.y>W.y?H.y:W.y:B.y>W.y?B.y:W.y,he=s(q,re,G,z,U),$=s(ie,le,G,z,U),Z=O.prevZ,K=O.nextZ;Z&&Z.z>=he&&K&&K.z<=$;){if(Z!==O.prev&&Z!==O.next&&g(H.x,H.y,B.x,B.y,W.x,W.y,Z.x,Z.y)&&v(Z.prev,Z,Z.next)>=0||(Z=Z.prevZ,K!==O.prev&&K!==O.next&&g(H.x,H.y,B.x,B.y,W.x,W.y,K.x,K.y)&&v(K.prev,K,K.next)>=0))return!1;K=K.nextZ}for(;Z&&Z.z>=he;){if(Z!==O.prev&&Z!==O.next&&g(H.x,H.y,B.x,B.y,W.x,W.y,Z.x,Z.y)&&v(Z.prev,Z,Z.next)>=0)return!1;Z=Z.prevZ}for(;K&&K.z<=$;){if(K!==O.prev&&K!==O.next&&g(H.x,H.y,B.x,B.y,W.x,W.y,K.x,K.y)&&v(K.prev,K,K.next)>=0)return!1;K=K.nextZ}return!0}function p(O,G,z){var U=O;do{var H=U.prev,B=U.next.next;!h(H,B)&&x(H,U,U.next,B)&&w(H,B)&&w(B,H)&&(G.push(H.i/z),G.push(U.i/z),G.push(B.i/z),P(U),P(U.next),U=O=B),U=U.next}while(U!==O);return i(U)}function l(O,G,z,U,H,B){var W=O;do{for(var q=W.next.next;q!==W.prev;){if(W.i!==q.i&&A(W,q)){var re=S(W,q);W=i(W,W.next),re=i(re,re.next),m(W,G,z,U,H,B),m(re,G,z,U,H,B);return}q=q.next}W=W.next}while(W!==O)}function d(O,G,z,U){var H=[],B,W,q,re,ie;for(B=0,W=G.length;B=z.next.y&&z.next.y!==z.y){var q=z.x+(H-z.y)*(z.next.x-z.x)/(z.next.y-z.y);if(q<=U&&q>B){if(B=q,q===U){if(H===z.y)return z;if(H===z.next.y)return z.next}W=z.x=z.x&&z.x>=ie&&U!==z.x&&g(HW.x||z.x===W.x&&a(W,z)))&&(W=z,he=$)),z=z.next;while(z!==re);return W}function a(O,G){return v(O.prev,O,G.prev)<0&&v(G.next,O,O.next)<0}function o(O,G,z,U){var H=O;do H.z===null&&(H.z=s(H.x,H.y,G,z,U)),H.prevZ=H.prev,H.nextZ=H.next,H=H.next;while(H!==O);H.prevZ.nextZ=null,H.prevZ=null,c(H)}function c(O){var G,z,U,H,B,W,q,re,ie=1;do{for(z=O,O=null,B=null,W=0;z;){for(W++,U=z,q=0,G=0;G0||re>0&&U;)q!==0&&(re===0||!U||z.z<=U.z)?(H=z,z=z.nextZ,q--):(H=U,U=U.nextZ,re--),B?B.nextZ=H:O=H,H.prevZ=B,B=H;z=U}B.nextZ=null,ie*=2}while(W>1);return O}function s(O,G,z,U,H){return O=32767*(O-z)*H,G=32767*(G-U)*H,O=(O|O<<8)&16711935,O=(O|O<<4)&252645135,O=(O|O<<2)&858993459,O=(O|O<<1)&1431655765,G=(G|G<<8)&16711935,G=(G|G<<4)&252645135,G=(G|G<<2)&858993459,G=(G|G<<1)&1431655765,O|G<<1}function b(O){var G=O,z=O;do(G.x=0&&(O-W)*(U-q)-(z-W)*(G-q)>=0&&(z-W)*(B-q)-(H-W)*(U-q)>=0}function A(O,G){return O.next.i!==G.i&&O.prev.i!==G.i&&!L(O,G)&&(w(O,G)&&w(G,O)&&M(O,G)&&(v(O.prev,O,G.prev)||v(O,G.prev,G))||h(O,G)&&v(O.prev,O,O.next)>0&&v(G.prev,G,G.next)>0)}function v(O,G,z){return(G.y-O.y)*(z.x-G.x)-(G.x-O.x)*(z.y-G.y)}function h(O,G){return O.x===G.x&&O.y===G.y}function x(O,G,z,U){var H=D(v(O,G,z)),B=D(v(O,G,U)),W=D(v(z,U,O)),q=D(v(z,U,G));return!!(H!==B&&W!==q||H===0&&C(O,z,G)||B===0&&C(O,U,G)||W===0&&C(z,O,U)||q===0&&C(z,G,U))}function C(O,G,z){return G.x<=Math.max(O.x,z.x)&&G.x>=Math.min(O.x,z.x)&&G.y<=Math.max(O.y,z.y)&&G.y>=Math.min(O.y,z.y)}function D(O){return O>0?1:O<0?-1:0}function L(O,G){var z=O;do{if(z.i!==O.i&&z.next.i!==O.i&&z.i!==G.i&&z.next.i!==G.i&&x(z,z.next,O,G))return!0;z=z.next}while(z!==O);return!1}function w(O,G){return v(O.prev,O,O.next)<0?v(O,G,O.next)>=0&&v(O,O.prev,G)>=0:v(O,G,O.prev)<0||v(O,O.next,G)<0}function M(O,G){var z=O,U=!1,H=(O.x+G.x)/2,B=(O.y+G.y)/2;do z.y>B!=z.next.y>B&&z.next.y!==z.y&&H<(z.next.x-z.x)*(B-z.y)/(z.next.y-z.y)+z.x&&(U=!U),z=z.next;while(z!==O);return U}function S(O,G){var z=new E(O.i,O.x,O.y),U=new E(G.i,G.x,G.y),H=O.next,B=G.prev;return O.next=G,G.prev=O,z.next=H,H.prev=z,U.next=z,z.prev=U,B.next=U,U.prev=B,U}function f(O,G,z,U){var H=new E(O,G,z);return U?(H.next=U.next,H.prev=U,U.next.prev=H,U.next=H):(H.prev=H,H.next=H),H}function P(O){O.next.prev=O.prev,O.prev.next=O.next,O.prevZ&&(O.prevZ.nextZ=O.nextZ),O.nextZ&&(O.nextZ.prevZ=O.prevZ)}function E(O,G,z){this.i=O,this.x=G,this.y=z,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}F.deviation=function(O,G,z,U){var H=G&&G.length,B=H?G[0]*z:O.length,W=Math.abs(k(O,0,B,z));if(H)for(var q=0,re=G.length;q0&&(U+=O[H-1].length,z.holes.push(U))}return z}},2502:function(R,F,e){var i=e(68664);R.exports=function(t,y){var p=[],l=[],d=[],r={},n=[],u;function a(C){d[C]=!1,r.hasOwnProperty(C)&&Object.keys(r[C]).forEach(function(D){delete r[C][D],d[D]&&a(D)})}function o(C){var D=!1;l.push(C),d[C]=!0;var L,w;for(L=0;L=C})}function b(C){s(C);for(var D=t,L=i(D),w=L.components.filter(function(O){return O.length>1}),M=1/0,S,f=0;f=55296&&C<=56319&&(M+=c[++A])),M=s?u.call(s,b,M,v):M,g?(a.value=M,o(h,v,a)):h[v]=M,++v;x=v}}if(x===void 0)for(x=y(c.length),g&&(h=new g(x)),A=0;A0?1:-1}},56247:function(R,F,e){var i=e(9953),m=Math.abs,t=Math.floor;R.exports=function(y){return isNaN(y)?0:(y=Number(y),y===0||!isFinite(y)?y:i(y)*t(m(y)))}},35976:function(R,F,e){var i=e(56247),m=Math.max;R.exports=function(t){return m(0,i(t))}},67260:function(R,F,e){var i=e(78513),m=e(36672),t=Function.prototype.bind,y=Function.prototype.call,p=Object.keys,l=Object.prototype.propertyIsEnumerable;R.exports=function(d,r){return function(n,u){var a,o=arguments[2],c=arguments[3];return n=Object(m(n)),i(u),a=p(n),c&&a.sort(typeof c=="function"?t.call(c,n):void 0),typeof d!="function"&&(d=a[d]),y.call(d,a,function(s,b){return l.call(n,s)?y.call(u,o,n[s],s,n,b):r})}}},95879:function(R,F,e){R.exports=e(73583)()?Object.assign:e(34205)},73583:function(R){R.exports=function(){var F=Object.assign,e;return typeof F!="function"?!1:(e={foo:"raz"},F(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},34205:function(R,F,e){var i=e(68700),m=e(36672),t=Math.max;R.exports=function(y,p){var l,d,r=t(arguments.length,2),n;for(y=Object(m(y)),n=function(u){try{y[u]=p[u]}catch(a){l||(l=a)}},d=1;d-1}},87963:function(R){var F=Object.prototype.toString,e=F.call("");R.exports=function(i){return typeof i=="string"||i&&typeof i=="object"&&(i instanceof String||F.call(i)===e)||!1}},43043:function(R){var F=Object.create(null),e=Math.random;R.exports=function(){var i;do i=e().toString(36).slice(2);while(F[i]);return i}},32411:function(R,F,e){var i=e(1496),m=e(66741),t=e(62072),y=e(8260),p=e(95426),l=Object.defineProperty,d;d=R.exports=function(r,n){if(!(this instanceof d))throw new TypeError("Constructor requires 'new'");p.call(this,r),n?m.call(n,"key+value")?n="key+value":m.call(n,"key")?n="key":n="value":n="value",l(this,"__kind__",t("",n))},i&&i(d,p),delete d.prototype.constructor,d.prototype=Object.create(p.prototype,{_resolve:t(function(r){return this.__kind__==="value"?this.__list__[r]:this.__kind__==="key+value"?[r,this.__list__[r]]:r})}),l(d.prototype,y.toStringTag,t("c","Array Iterator"))},27515:function(R,F,e){var i=e(73051),m=e(78513),t=e(87963),y=e(66661),p=Array.isArray,l=Function.prototype.call,d=Array.prototype.some;R.exports=function(r,n){var u,a=arguments[2],o,c,s,b,g,A,v;if(p(r)||i(r)?u="array":t(r)?u="string":r=y(r),m(n),c=function(){s=!0},u==="array"){d.call(r,function(h){return l.call(n,a,h,c),s});return}if(u==="string"){for(g=r.length,b=0;b=55296&&v<=56319&&(A+=r[++b])),l.call(n,a,A,c),!s);++b);return}for(o=r.next();!o.done;){if(l.call(n,a,o.value,c),s)return;o=r.next()}}},66661:function(R,F,e){var i=e(73051),m=e(87963),t=e(32411),y=e(259),p=e(58095),l=e(8260).iterator;R.exports=function(d){return typeof p(d)[l]=="function"?d[l]():i(d)?new t(d):m(d)?new y(d):new t(d)}},95426:function(R,F,e){var i=e(16134),m=e(95879),t=e(78513),y=e(36672),p=e(62072),l=e(55174),d=e(8260),r=Object.defineProperty,n=Object.defineProperties,u;R.exports=u=function(a,o){if(!(this instanceof u))throw new TypeError("Constructor requires 'new'");n(this,{__list__:p("w",y(a)),__context__:p("w",o),__nextIndex__:p("w",0)}),o&&(t(o.on),o.on("_add",this._onAdd),o.on("_delete",this._onDelete),o.on("_clear",this._onClear))},delete u.prototype.constructor,n(u.prototype,m({_next:p(function(){var a;if(!!this.__list__){if(this.__redo__&&(a=this.__redo__.shift(),a!==void 0))return a;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){r(this,"__redo__",p("c",[a]));return}this.__redo__.forEach(function(o,c){o>=a&&(this.__redo__[c]=++o)},this),this.__redo__.push(a)}}),_onDelete:p(function(a){var o;a>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(o=this.__redo__.indexOf(a),o!==-1&&this.__redo__.splice(o,1),this.__redo__.forEach(function(c,s){c>a&&(this.__redo__[s]=--c)},this)))}),_onClear:p(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),r(u.prototype,d.iterator,p(function(){return this}))},35940:function(R,F,e){var i=e(73051),m=e(95296),t=e(87963),y=e(8260).iterator,p=Array.isArray;R.exports=function(l){return m(l)?p(l)||t(l)||i(l)?!0:typeof l[y]=="function":!1}},259:function(R,F,e){var i=e(1496),m=e(62072),t=e(8260),y=e(95426),p=Object.defineProperty,l;l=R.exports=function(d){if(!(this instanceof l))throw new TypeError("Constructor requires 'new'");d=String(d),y.call(this,d),p(this,"__length__",m("",d.length))},i&&i(l,y),delete l.prototype.constructor,l.prototype=Object.create(y.prototype,{_next:m(function(){if(!!this.__list__){if(this.__nextIndex__=55296&&n<=56319?r+this.__list__[this.__nextIndex__++]:r)})}),p(l.prototype,t.toStringTag,m("c","String Iterator"))},58095:function(R,F,e){var i=e(35940);R.exports=function(m){if(!i(m))throw new TypeError(m+" is not iterable");return m}},73523:function(R){function F(i,m){if(i==null)throw new TypeError("Cannot convert first argument to object");for(var t=Object(i),y=1;y0&&(M=C[0]),M instanceof Error)throw M;var S=new Error("Unhandled error."+(M?" ("+M.message+")":""));throw S.context=M,S}var f=w[x];if(f===void 0)return!1;if(typeof f=="function")e(f,this,C);else for(var P=f.length,E=c(f,P),D=0;D0&&M.length>L&&!M.warned){M.warned=!0;var S=new Error("Possible EventEmitter memory leak detected. "+M.length+" "+String(x)+" listeners added. Use emitter.setMaxListeners() to increase limit");S.name="MaxListenersExceededWarning",S.emitter=h,S.type=x,S.count=M.length,m(S)}return h}y.prototype.addListener=function(x,C){return r(this,x,C,!1)},y.prototype.on=y.prototype.addListener,y.prototype.prependListener=function(x,C){return r(this,x,C,!0)};function n(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(h,x,C){var D={fired:!1,wrapFn:void 0,target:h,type:x,listener:C},L=n.bind(D);return L.listener=C,D.wrapFn=L,L}y.prototype.once=function(x,C){return l(C),this.on(x,u(this,x,C)),this},y.prototype.prependOnceListener=function(x,C){return l(C),this.prependListener(x,u(this,x,C)),this},y.prototype.removeListener=function(x,C){var D,L,w,M,S;if(l(C),L=this._events,L===void 0)return this;if(D=L[x],D===void 0)return this;if(D===C||D.listener===C)--this._eventsCount===0?this._events=Object.create(null):(delete L[x],L.removeListener&&this.emit("removeListener",x,D.listener||C));else if(typeof D!="function"){for(w=-1,M=D.length-1;M>=0;M--)if(D[M]===C||D[M].listener===C){S=D[M].listener,w=M;break}if(w<0)return this;w===0?D.shift():s(D,w),D.length===1&&(L[x]=D[0]),L.removeListener!==void 0&&this.emit("removeListener",x,S||C)}return this},y.prototype.off=y.prototype.removeListener,y.prototype.removeAllListeners=function(x){var C,D,L;if(D=this._events,D===void 0)return this;if(D.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):D[x]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete D[x]),this;if(arguments.length===0){var w=Object.keys(D),M;for(L=0;L=0;L--)this.removeListener(x,C[L]);return this};function a(h,x,C){var D=h._events;if(D===void 0)return[];var L=D[x];return L===void 0?[]:typeof L=="function"?C?[L.listener||L]:[L]:C?b(L):c(L,L.length)}y.prototype.listeners=function(x){return a(this,x,!0)},y.prototype.rawListeners=function(x){return a(this,x,!1)},y.listenerCount=function(h,x){return typeof h.listenerCount=="function"?h.listenerCount(x):o.call(h,x)},y.prototype.listenerCount=o;function o(h){var x=this._events;if(x!==void 0){var C=x[h];if(typeof C=="function")return 1;if(C!==void 0)return C.length}return 0}y.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function c(h,x){for(var C=new Array(x),D=0;Dp[0]-r[0]/2&&(s=r[0]/2,b+=r[1]);return l}},32879:function(R){R.exports=F,F.canvas=document.createElement("canvas"),F.cache={};function F(n,y){y||(y={}),(typeof n=="string"||Array.isArray(n))&&(y.family=n);var p=Array.isArray(y.family)?y.family.join(", "):y.family;if(!p)throw Error("`family` must be defined");var l=y.size||y.fontSize||y.em||48,d=y.weight||y.fontWeight||"",r=y.style||y.fontStyle||"",n=[r,d,l].join(" ")+"px "+p,u=y.origin||"top";if(F.cache[p]&&l<=F.cache[p].em)return e(F.cache[p],u);var a=y.canvas||F.canvas,o=a.getContext("2d"),c={upper:y.upper!==void 0?y.upper:"H",lower:y.lower!==void 0?y.lower:"x",descent:y.descent!==void 0?y.descent:"p",ascent:y.ascent!==void 0?y.ascent:"h",tittle:y.tittle!==void 0?y.tittle:"i",overshoot:y.overshoot!==void 0?y.overshoot:"O"},s=Math.ceil(l*1.5);a.height=s,a.width=s*.5,o.font=n;var b="H",g={top:0};o.clearRect(0,0,s,s),o.textBaseline="top",o.fillStyle="black",o.fillText(b,0,0);var A=i(o.getImageData(0,0,s,s));o.clearRect(0,0,s,s),o.textBaseline="bottom",o.fillText(b,0,s);var v=i(o.getImageData(0,0,s,s));g.lineHeight=g.bottom=s-v+A,o.clearRect(0,0,s,s),o.textBaseline="alphabetic",o.fillText(b,0,s);var h=i(o.getImageData(0,0,s,s)),x=s-h-1+A;g.baseline=g.alphabetic=x,o.clearRect(0,0,s,s),o.textBaseline="middle",o.fillText(b,0,s*.5);var C=i(o.getImageData(0,0,s,s));g.median=g.middle=s-C-1+A-s*.5,o.clearRect(0,0,s,s),o.textBaseline="hanging",o.fillText(b,0,s*.5);var D=i(o.getImageData(0,0,s,s));g.hanging=s-D-1+A-s*.5,o.clearRect(0,0,s,s),o.textBaseline="ideographic",o.fillText(b,0,s);var L=i(o.getImageData(0,0,s,s));if(g.ideographic=s-L-1+A,c.upper&&(o.clearRect(0,0,s,s),o.textBaseline="top",o.fillText(c.upper,0,0),g.upper=i(o.getImageData(0,0,s,s)),g.capHeight=g.baseline-g.upper),c.lower&&(o.clearRect(0,0,s,s),o.textBaseline="top",o.fillText(c.lower,0,0),g.lower=i(o.getImageData(0,0,s,s)),g.xHeight=g.baseline-g.lower),c.tittle&&(o.clearRect(0,0,s,s),o.textBaseline="top",o.fillText(c.tittle,0,0),g.tittle=i(o.getImageData(0,0,s,s))),c.ascent&&(o.clearRect(0,0,s,s),o.textBaseline="top",o.fillText(c.ascent,0,0),g.ascent=i(o.getImageData(0,0,s,s))),c.descent&&(o.clearRect(0,0,s,s),o.textBaseline="top",o.fillText(c.descent,0,0),g.descent=m(o.getImageData(0,0,s,s))),c.overshoot){o.clearRect(0,0,s,s),o.textBaseline="top",o.fillText(c.overshoot,0,0);var w=m(o.getImageData(0,0,s,s));g.overshoot=w-x}for(var M in g)g[M]/=l;return g.em=l,F.cache[p]=g,e(g,u)}function e(t,y){var p={};typeof y=="string"&&(y=t[y]);for(var l in t)l!=="em"&&(p[l]=t[l]-y);return p}function i(t){for(var y=t.height,p=t.data,l=3;l0;l-=4)if(p[l]!==0)return Math.floor((l-3)*.25/y)}},31353:function(R,F,e){var i=e(85395),m=Object.prototype.toString,t=Object.prototype.hasOwnProperty,y=function(n,u,a){for(var o=0,c=n.length;o=3&&(o=a),m.call(n)==="[object Array]"?y(n,u,o):typeof n=="string"?p(n,u,o):l(n,u,o)};R.exports=d},73047:function(R){var F="Function.prototype.bind called on incompatible ",e=Array.prototype.slice,i=Object.prototype.toString,m="[object Function]";R.exports=function(y){var p=this;if(typeof p!="function"||i.call(p)!==m)throw new TypeError(F+p);for(var l=e.call(arguments,1),d,r=function(){if(this instanceof d){var c=p.apply(this,l.concat(e.call(arguments)));return Object(c)===c?c:this}else return p.apply(y,l.concat(e.call(arguments)))},n=Math.max(0,p.length-l.length),u=[],a=0;a"u"&&!i.canvas)return null;var m=i.canvas||document.createElement("canvas");typeof i.width=="number"&&(m.width=i.width),typeof i.height=="number"&&(m.height=i.height);var t=i,y;try{var p=[e];e.indexOf("webgl")===0&&p.push("experimental-"+e);for(var l=0;l"u"?i:u(Uint8Array),c={"%AggregateError%":typeof AggregateError>"u"?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?i:ArrayBuffer,"%ArrayIteratorPrototype%":n?u([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":a,"%AsyncGenerator%":a,"%AsyncGeneratorFunction%":a,"%AsyncIteratorPrototype%":a,"%Atomics%":typeof Atomics>"u"?i:Atomics,"%BigInt%":typeof BigInt>"u"?i:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?i:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?i:Float32Array,"%Float64Array%":typeof Float64Array>"u"?i:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?i:FinalizationRegistry,"%Function%":t,"%GeneratorFunction%":a,"%Int8Array%":typeof Int8Array>"u"?i:Int8Array,"%Int16Array%":typeof Int16Array>"u"?i:Int16Array,"%Int32Array%":typeof Int32Array>"u"?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":n?u(u([][Symbol.iterator]())):i,"%JSON%":typeof JSON=="object"?JSON:i,"%Map%":typeof Map>"u"?i:Map,"%MapIteratorPrototype%":typeof Map>"u"||!n?i:u(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?i:Promise,"%Proxy%":typeof Proxy>"u"?i:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?i:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?i:Set,"%SetIteratorPrototype%":typeof Set>"u"||!n?i:u(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":n?u(""[Symbol.iterator]()):i,"%Symbol%":n?Symbol:i,"%SyntaxError%":m,"%ThrowTypeError%":r,"%TypedArray%":o,"%TypeError%":y,"%Uint8Array%":typeof Uint8Array>"u"?i:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?i:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?i:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?i:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?i:WeakMap,"%WeakRef%":typeof WeakRef>"u"?i:WeakRef,"%WeakSet%":typeof WeakSet>"u"?i:WeakSet};try{null.error}catch(P){var s=u(u(P));c["%Error.prototype%"]=s}var b=function P(E){var k;if(E==="%AsyncFunction%")k=p("async function () {}");else if(E==="%GeneratorFunction%")k=p("function* () {}");else if(E==="%AsyncGeneratorFunction%")k=p("async function* () {}");else if(E==="%AsyncGenerator%"){var O=P("%AsyncGeneratorFunction%");O&&(k=O.prototype)}else if(E==="%AsyncIteratorPrototype%"){var G=P("%AsyncGenerator%");G&&(k=u(G.prototype))}return c[E]=k,k},g={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=e(77575),v=e(35065),h=A.call(Function.call,Array.prototype.concat),x=A.call(Function.apply,Array.prototype.splice),C=A.call(Function.call,String.prototype.replace),D=A.call(Function.call,String.prototype.slice),L=A.call(Function.call,RegExp.prototype.exec),w=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,M=/\\(\\)?/g,S=function(E){var k=D(E,0,1),O=D(E,-1);if(k==="%"&&O!=="%")throw new m("invalid intrinsic syntax, expected closing `%`");if(O==="%"&&k!=="%")throw new m("invalid intrinsic syntax, expected opening `%`");var G=[];return C(E,w,function(z,U,H,B){G[G.length]=H?C(B,M,"$1"):U||z}),G},f=function(E,k){var O=E,G;if(v(g,O)&&(G=g[O],O="%"+G[0]+"%"),v(c,O)){var z=c[O];if(z===a&&(z=b(O)),typeof z>"u"&&!k)throw new y("intrinsic "+E+" exists, but is not available. Please file an issue!");return{alias:G,name:O,value:z}}throw new m("intrinsic "+E+" does not exist!")};R.exports=function(E,k){if(typeof E!="string"||E.length===0)throw new y("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof k!="boolean")throw new y('"allowMissing" argument must be a boolean');if(L(/^%?[^%]*%?$/,E)===null)throw new m("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var O=S(E),G=O.length>0?O[0]:"",z=f("%"+G+"%",k),U=z.name,H=z.value,B=!1,W=z.alias;W&&(G=W[0],x(O,h([0,1],W)));for(var q=1,re=!0;q=O.length){var $=l(H,ie);re=!!$,re&&"get"in $&&!("originalValue"in $.get)?H=$.get:H=H[ie]}else re=v(H,ie),H=H[ie];re&&!B&&(c[U]=H)}}return H}},85400:function(R){R.exports=F;function F(e,i){var m=i[0],t=i[1],y=i[2],p=i[3],l=i[4],d=i[5],r=i[6],n=i[7],u=i[8],a=i[9],o=i[10],c=i[11],s=i[12],b=i[13],g=i[14],A=i[15];return e[0]=d*(o*A-c*g)-a*(r*A-n*g)+b*(r*c-n*o),e[1]=-(t*(o*A-c*g)-a*(y*A-p*g)+b*(y*c-p*o)),e[2]=t*(r*A-n*g)-d*(y*A-p*g)+b*(y*n-p*r),e[3]=-(t*(r*c-n*o)-d*(y*c-p*o)+a*(y*n-p*r)),e[4]=-(l*(o*A-c*g)-u*(r*A-n*g)+s*(r*c-n*o)),e[5]=m*(o*A-c*g)-u*(y*A-p*g)+s*(y*c-p*o),e[6]=-(m*(r*A-n*g)-l*(y*A-p*g)+s*(y*n-p*r)),e[7]=m*(r*c-n*o)-l*(y*c-p*o)+u*(y*n-p*r),e[8]=l*(a*A-c*b)-u*(d*A-n*b)+s*(d*c-n*a),e[9]=-(m*(a*A-c*b)-u*(t*A-p*b)+s*(t*c-p*a)),e[10]=m*(d*A-n*b)-l*(t*A-p*b)+s*(t*n-p*d),e[11]=-(m*(d*c-n*a)-l*(t*c-p*a)+u*(t*n-p*d)),e[12]=-(l*(a*g-o*b)-u*(d*g-r*b)+s*(d*o-r*a)),e[13]=m*(a*g-o*b)-u*(t*g-y*b)+s*(t*o-y*a),e[14]=-(m*(d*g-r*b)-l*(t*g-y*b)+s*(t*r-y*d)),e[15]=m*(d*o-r*a)-l*(t*o-y*a)+u*(t*r-y*d),e}},42331:function(R){R.exports=F;function F(e){var i=new Float32Array(16);return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],i}},31042:function(R){R.exports=F;function F(e,i){return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],e}},11902:function(R){R.exports=F;function F(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},89887:function(R){R.exports=F;function F(e){var i=e[0],m=e[1],t=e[2],y=e[3],p=e[4],l=e[5],d=e[6],r=e[7],n=e[8],u=e[9],a=e[10],o=e[11],c=e[12],s=e[13],b=e[14],g=e[15],A=i*l-m*p,v=i*d-t*p,h=i*r-y*p,x=m*d-t*l,C=m*r-y*l,D=t*r-y*d,L=n*s-u*c,w=n*b-a*c,M=n*g-o*c,S=u*b-a*s,f=u*g-o*s,P=a*g-o*b;return A*P-v*f+h*S+x*M-C*w+D*L}},27812:function(R){R.exports=F;function F(e,i){var m=i[0],t=i[1],y=i[2],p=i[3],l=m+m,d=t+t,r=y+y,n=m*l,u=t*l,a=t*d,o=y*l,c=y*d,s=y*r,b=p*l,g=p*d,A=p*r;return e[0]=1-a-s,e[1]=u+A,e[2]=o-g,e[3]=0,e[4]=u-A,e[5]=1-n-s,e[6]=c+b,e[7]=0,e[8]=o+g,e[9]=c-b,e[10]=1-n-a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},34045:function(R){R.exports=F;function F(e,i,m){var t,y,p,l=m[0],d=m[1],r=m[2],n=Math.sqrt(l*l+d*d+r*r);return Math.abs(n)<1e-6?null:(n=1/n,l*=n,d*=n,r*=n,t=Math.sin(i),y=Math.cos(i),p=1-y,e[0]=l*l*p+y,e[1]=d*l*p+r*t,e[2]=r*l*p-d*t,e[3]=0,e[4]=l*d*p-r*t,e[5]=d*d*p+y,e[6]=r*d*p+l*t,e[7]=0,e[8]=l*r*p+d*t,e[9]=d*r*p-l*t,e[10]=r*r*p+y,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}},45973:function(R){R.exports=F;function F(e,i,m){var t=i[0],y=i[1],p=i[2],l=i[3],d=t+t,r=y+y,n=p+p,u=t*d,a=t*r,o=t*n,c=y*r,s=y*n,b=p*n,g=l*d,A=l*r,v=l*n;return e[0]=1-(c+b),e[1]=a+v,e[2]=o-A,e[3]=0,e[4]=a-v,e[5]=1-(u+b),e[6]=s+g,e[7]=0,e[8]=o+A,e[9]=s-g,e[10]=1-(u+c),e[11]=0,e[12]=m[0],e[13]=m[1],e[14]=m[2],e[15]=1,e}},81472:function(R){R.exports=F;function F(e,i){return e[0]=i[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=i[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},14669:function(R){R.exports=F;function F(e,i){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=i[0],e[13]=i[1],e[14]=i[2],e[15]=1,e}},75262:function(R){R.exports=F;function F(e,i){var m=Math.sin(i),t=Math.cos(i);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t,e[6]=m,e[7]=0,e[8]=0,e[9]=-m,e[10]=t,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},331:function(R){R.exports=F;function F(e,i){var m=Math.sin(i),t=Math.cos(i);return e[0]=t,e[1]=0,e[2]=-m,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=m,e[9]=0,e[10]=t,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},11049:function(R){R.exports=F;function F(e,i){var m=Math.sin(i),t=Math.cos(i);return e[0]=t,e[1]=m,e[2]=0,e[3]=0,e[4]=-m,e[5]=t,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},75195:function(R){R.exports=F;function F(e,i,m,t,y,p,l){var d=1/(m-i),r=1/(y-t),n=1/(p-l);return e[0]=p*2*d,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=p*2*r,e[6]=0,e[7]=0,e[8]=(m+i)*d,e[9]=(y+t)*r,e[10]=(l+p)*n,e[11]=-1,e[12]=0,e[13]=0,e[14]=l*p*2*n,e[15]=0,e}},71551:function(R){R.exports=F;function F(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},79576:function(R,F,e){R.exports={create:e(11902),clone:e(42331),copy:e(31042),identity:e(71551),transpose:e(88654),invert:e(95874),adjoint:e(85400),determinant:e(89887),multiply:e(91362),translate:e(31283),scale:e(10789),rotate:e(65074),rotateX:e(35545),rotateY:e(94918),rotateZ:e(15692),fromRotation:e(34045),fromRotationTranslation:e(45973),fromScaling:e(81472),fromTranslation:e(14669),fromXRotation:e(75262),fromYRotation:e(331),fromZRotation:e(11049),fromQuat:e(27812),frustum:e(75195),perspective:e(7864),perspectiveFromFieldOfView:e(35279),ortho:e(60378),lookAt:e(65551),str:e(6726)}},95874:function(R){R.exports=F;function F(e,i){var m=i[0],t=i[1],y=i[2],p=i[3],l=i[4],d=i[5],r=i[6],n=i[7],u=i[8],a=i[9],o=i[10],c=i[11],s=i[12],b=i[13],g=i[14],A=i[15],v=m*d-t*l,h=m*r-y*l,x=m*n-p*l,C=t*r-y*d,D=t*n-p*d,L=y*n-p*r,w=u*b-a*s,M=u*g-o*s,S=u*A-c*s,f=a*g-o*b,P=a*A-c*b,E=o*A-c*g,k=v*E-h*P+x*f+C*S-D*M+L*w;return k?(k=1/k,e[0]=(d*E-r*P+n*f)*k,e[1]=(y*P-t*E-p*f)*k,e[2]=(b*L-g*D+A*C)*k,e[3]=(o*D-a*L-c*C)*k,e[4]=(r*S-l*E-n*M)*k,e[5]=(m*E-y*S+p*M)*k,e[6]=(g*x-s*L-A*h)*k,e[7]=(u*L-o*x+c*h)*k,e[8]=(l*P-d*S+n*w)*k,e[9]=(t*S-m*P-p*w)*k,e[10]=(s*D-b*x+A*v)*k,e[11]=(a*x-u*D-c*v)*k,e[12]=(d*M-l*f-r*w)*k,e[13]=(m*f-t*M+y*w)*k,e[14]=(b*h-s*C-g*v)*k,e[15]=(u*C-a*h+o*v)*k,e):null}},65551:function(R,F,e){var i=e(71551);R.exports=m;function m(t,y,p,l){var d,r,n,u,a,o,c,s,b,g,A=y[0],v=y[1],h=y[2],x=l[0],C=l[1],D=l[2],L=p[0],w=p[1],M=p[2];return Math.abs(A-L)<1e-6&&Math.abs(v-w)<1e-6&&Math.abs(h-M)<1e-6?i(t):(c=A-L,s=v-w,b=h-M,g=1/Math.sqrt(c*c+s*s+b*b),c*=g,s*=g,b*=g,d=C*b-D*s,r=D*c-x*b,n=x*s-C*c,g=Math.sqrt(d*d+r*r+n*n),g?(g=1/g,d*=g,r*=g,n*=g):(d=0,r=0,n=0),u=s*n-b*r,a=b*d-c*n,o=c*r-s*d,g=Math.sqrt(u*u+a*a+o*o),g?(g=1/g,u*=g,a*=g,o*=g):(u=0,a=0,o=0),t[0]=d,t[1]=u,t[2]=c,t[3]=0,t[4]=r,t[5]=a,t[6]=s,t[7]=0,t[8]=n,t[9]=o,t[10]=b,t[11]=0,t[12]=-(d*A+r*v+n*h),t[13]=-(u*A+a*v+o*h),t[14]=-(c*A+s*v+b*h),t[15]=1,t)}},91362:function(R){R.exports=F;function F(e,i,m){var t=i[0],y=i[1],p=i[2],l=i[3],d=i[4],r=i[5],n=i[6],u=i[7],a=i[8],o=i[9],c=i[10],s=i[11],b=i[12],g=i[13],A=i[14],v=i[15],h=m[0],x=m[1],C=m[2],D=m[3];return e[0]=h*t+x*d+C*a+D*b,e[1]=h*y+x*r+C*o+D*g,e[2]=h*p+x*n+C*c+D*A,e[3]=h*l+x*u+C*s+D*v,h=m[4],x=m[5],C=m[6],D=m[7],e[4]=h*t+x*d+C*a+D*b,e[5]=h*y+x*r+C*o+D*g,e[6]=h*p+x*n+C*c+D*A,e[7]=h*l+x*u+C*s+D*v,h=m[8],x=m[9],C=m[10],D=m[11],e[8]=h*t+x*d+C*a+D*b,e[9]=h*y+x*r+C*o+D*g,e[10]=h*p+x*n+C*c+D*A,e[11]=h*l+x*u+C*s+D*v,h=m[12],x=m[13],C=m[14],D=m[15],e[12]=h*t+x*d+C*a+D*b,e[13]=h*y+x*r+C*o+D*g,e[14]=h*p+x*n+C*c+D*A,e[15]=h*l+x*u+C*s+D*v,e}},60378:function(R){R.exports=F;function F(e,i,m,t,y,p,l){var d=1/(i-m),r=1/(t-y),n=1/(p-l);return e[0]=-2*d,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*n,e[11]=0,e[12]=(i+m)*d,e[13]=(y+t)*r,e[14]=(l+p)*n,e[15]=1,e}},7864:function(R){R.exports=F;function F(e,i,m,t,y){var p=1/Math.tan(i/2),l=1/(t-y);return e[0]=p/m,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=p,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(y+t)*l,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*y*t*l,e[15]=0,e}},35279:function(R){R.exports=F;function F(e,i,m,t){var y=Math.tan(i.upDegrees*Math.PI/180),p=Math.tan(i.downDegrees*Math.PI/180),l=Math.tan(i.leftDegrees*Math.PI/180),d=Math.tan(i.rightDegrees*Math.PI/180),r=2/(l+d),n=2/(y+p);return e[0]=r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=0,e[7]=0,e[8]=-((l-d)*r*.5),e[9]=(y-p)*n*.5,e[10]=t/(m-t),e[11]=-1,e[12]=0,e[13]=0,e[14]=t*m/(m-t),e[15]=0,e}},65074:function(R){R.exports=F;function F(e,i,m,t){var y=t[0],p=t[1],l=t[2],d=Math.sqrt(y*y+p*p+l*l),r,n,u,a,o,c,s,b,g,A,v,h,x,C,D,L,w,M,S,f,P,E,k,O;return Math.abs(d)<1e-6?null:(d=1/d,y*=d,p*=d,l*=d,r=Math.sin(m),n=Math.cos(m),u=1-n,a=i[0],o=i[1],c=i[2],s=i[3],b=i[4],g=i[5],A=i[6],v=i[7],h=i[8],x=i[9],C=i[10],D=i[11],L=y*y*u+n,w=p*y*u+l*r,M=l*y*u-p*r,S=y*p*u-l*r,f=p*p*u+n,P=l*p*u+y*r,E=y*l*u+p*r,k=p*l*u-y*r,O=l*l*u+n,e[0]=a*L+b*w+h*M,e[1]=o*L+g*w+x*M,e[2]=c*L+A*w+C*M,e[3]=s*L+v*w+D*M,e[4]=a*S+b*f+h*P,e[5]=o*S+g*f+x*P,e[6]=c*S+A*f+C*P,e[7]=s*S+v*f+D*P,e[8]=a*E+b*k+h*O,e[9]=o*E+g*k+x*O,e[10]=c*E+A*k+C*O,e[11]=s*E+v*k+D*O,i!==e&&(e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15]),e)}},35545:function(R){R.exports=F;function F(e,i,m){var t=Math.sin(m),y=Math.cos(m),p=i[4],l=i[5],d=i[6],r=i[7],n=i[8],u=i[9],a=i[10],o=i[11];return i!==e&&(e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15]),e[4]=p*y+n*t,e[5]=l*y+u*t,e[6]=d*y+a*t,e[7]=r*y+o*t,e[8]=n*y-p*t,e[9]=u*y-l*t,e[10]=a*y-d*t,e[11]=o*y-r*t,e}},94918:function(R){R.exports=F;function F(e,i,m){var t=Math.sin(m),y=Math.cos(m),p=i[0],l=i[1],d=i[2],r=i[3],n=i[8],u=i[9],a=i[10],o=i[11];return i!==e&&(e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15]),e[0]=p*y-n*t,e[1]=l*y-u*t,e[2]=d*y-a*t,e[3]=r*y-o*t,e[8]=p*t+n*y,e[9]=l*t+u*y,e[10]=d*t+a*y,e[11]=r*t+o*y,e}},15692:function(R){R.exports=F;function F(e,i,m){var t=Math.sin(m),y=Math.cos(m),p=i[0],l=i[1],d=i[2],r=i[3],n=i[4],u=i[5],a=i[6],o=i[7];return i!==e&&(e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15]),e[0]=p*y+n*t,e[1]=l*y+u*t,e[2]=d*y+a*t,e[3]=r*y+o*t,e[4]=n*y-p*t,e[5]=u*y-l*t,e[6]=a*y-d*t,e[7]=o*y-r*t,e}},10789:function(R){R.exports=F;function F(e,i,m){var t=m[0],y=m[1],p=m[2];return e[0]=i[0]*t,e[1]=i[1]*t,e[2]=i[2]*t,e[3]=i[3]*t,e[4]=i[4]*y,e[5]=i[5]*y,e[6]=i[6]*y,e[7]=i[7]*y,e[8]=i[8]*p,e[9]=i[9]*p,e[10]=i[10]*p,e[11]=i[11]*p,e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],e}},6726:function(R){R.exports=F;function F(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}},31283:function(R){R.exports=F;function F(e,i,m){var t=m[0],y=m[1],p=m[2],l,d,r,n,u,a,o,c,s,b,g,A;return i===e?(e[12]=i[0]*t+i[4]*y+i[8]*p+i[12],e[13]=i[1]*t+i[5]*y+i[9]*p+i[13],e[14]=i[2]*t+i[6]*y+i[10]*p+i[14],e[15]=i[3]*t+i[7]*y+i[11]*p+i[15]):(l=i[0],d=i[1],r=i[2],n=i[3],u=i[4],a=i[5],o=i[6],c=i[7],s=i[8],b=i[9],g=i[10],A=i[11],e[0]=l,e[1]=d,e[2]=r,e[3]=n,e[4]=u,e[5]=a,e[6]=o,e[7]=c,e[8]=s,e[9]=b,e[10]=g,e[11]=A,e[12]=l*t+u*y+s*p+i[12],e[13]=d*t+a*y+b*p+i[13],e[14]=r*t+o*y+g*p+i[14],e[15]=n*t+c*y+A*p+i[15]),e}},88654:function(R){R.exports=F;function F(e,i){if(e===i){var m=i[1],t=i[2],y=i[3],p=i[6],l=i[7],d=i[11];e[1]=i[4],e[2]=i[8],e[3]=i[12],e[4]=m,e[6]=i[9],e[7]=i[13],e[8]=t,e[9]=p,e[11]=i[14],e[12]=y,e[13]=l,e[14]=d}else e[0]=i[0],e[1]=i[4],e[2]=i[8],e[3]=i[12],e[4]=i[1],e[5]=i[5],e[6]=i[9],e[7]=i[13],e[8]=i[2],e[9]=i[6],e[10]=i[10],e[11]=i[14],e[12]=i[3],e[13]=i[7],e[14]=i[11],e[15]=i[15];return e}},42505:function(R,F,e){var i=e(72791),m=e(71299),t=e(98580),y=e(12018),p=e(83522),l=e(25075),d=e(68016),r=e(58404),n=e(18863),u=e(10973),a=e(25677),o=e(75686),c=e(53545),s=e(56131),b=e(32879),g=e(30120),A=e(13547),v=A.nextPow2,h=new p,x=!1;if(document.body){var C=document.body.appendChild(document.createElement("div"));C.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(C).fontStretch&&(x=!0),document.body.removeChild(C)}var D=function(M){L(M)?(M={regl:M},this.gl=M.regl._gl):this.gl=y(M),this.shader=h.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=M.regl||t({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),h.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(u(M)?M:{})};D.prototype.createShader=function(){var M=this.regl,S=M({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:M.prop("count"),offset:M.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:M.this("sizeBuffer")},width:{offset:0,stride:8,buffer:M.this("sizeBuffer")},char:M.this("charBuffer"),position:M.this("position")},uniforms:{atlasSize:function(P,E){return[E.atlas.width,E.atlas.height]},atlasDim:function(P,E){return[E.atlas.cols,E.atlas.rows]},atlas:function(P,E){return E.atlas.texture},charStep:function(P,E){return E.atlas.step},em:function(P,E){return E.atlas.em},color:M.prop("color"),opacity:M.prop("opacity"),viewport:M.this("viewportArray"),scale:M.this("scale"),align:M.prop("align"),baseline:M.prop("baseline"),translate:M.this("translate"),positionOffset:M.prop("positionOffset")},primitive:"points",viewport:M.this("viewport"),vert:` + precision highp float; + attribute float width, charOffset, char; + attribute vec2 position; + uniform float fontSize, charStep, em, align, baseline; + uniform vec4 viewport; + uniform vec4 color; + uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset; + varying vec2 charCoord, charId; + varying float charWidth; + varying vec4 fontColor; + void main () { + vec2 offset = floor(em * (vec2(align + charOffset, baseline) + + vec2(positionOffset.x, -positionOffset.y))) + / (viewport.zw * scale.xy); + + vec2 position = (position + translate) * scale; + position += offset * scale; + + charCoord = position * viewport.zw + viewport.xy; + + gl_Position = vec4(position * 2. - 1., 0, 1); + + gl_PointSize = charStep; + + charId.x = mod(char, atlasDim.x); + charId.y = floor(char / atlasDim.x); + + charWidth = width * em; + + fontColor = color / 255.; + }`,frag:` + precision highp float; + uniform float fontSize, charStep, opacity; + uniform vec2 atlasSize; + uniform vec4 viewport; + uniform sampler2D atlas; + varying vec4 fontColor; + varying vec2 charCoord, charId; + varying float charWidth; + + float lightness(vec4 color) { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + void main () { + vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5; + float halfCharStep = floor(charStep * .5 + .5); + + // invert y and shift by 1px (FF expecially needs that) + uv.y = charStep - uv.y; + + // ignore points outside of character bounding box + float halfCharWidth = ceil(charWidth * .5); + if (floor(uv.x) > halfCharStep + halfCharWidth || + floor(uv.x) < halfCharStep - halfCharWidth) return; + + uv += charId * charStep; + uv = uv / atlasSize; + + vec4 color = fontColor; + vec4 mask = texture2D(atlas, uv); + + float maskY = lightness(mask); + // float colorY = lightness(color); + color.a *= maskY; + color.a *= opacity; + + // color.a += .1; + + // antialiasing, see yiq color space y-channel formula + // color.rgb += (1. - color.rgb) * (1. - mask.rgb); + + gl_FragColor = color; + }`}),f={};return{regl:M,draw:S,atlas:f}},D.prototype.update=function(M){var S=this;if(typeof M=="string")M={text:M};else if(!M)return;M=m(M,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0),M.opacity!=null&&(Array.isArray(M.opacity)?this.opacity=M.opacity.map(function(_e){return parseFloat(_e)}):this.opacity=parseFloat(M.opacity)),M.viewport!=null&&(this.viewport=n(M.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),M.kerning!=null&&(this.kerning=M.kerning),M.offset!=null&&(typeof M.offset=="number"&&(M.offset=[M.offset,0]),this.positionOffset=g(M.offset)),M.direction&&(this.direction=M.direction),M.range&&(this.range=M.range,this.scale=[1/(M.range[2]-M.range[0]),1/(M.range[3]-M.range[1])],this.translate=[-M.range[0],-M.range[1]]),M.scale&&(this.scale=M.scale),M.translate&&(this.translate=M.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!M.font&&(M.font=D.baseFontSize+"px sans-serif");var f=!1,P=!1;if(M.font&&(Array.isArray(M.font)?M.font:[M.font]).forEach(function(_e,Ye){if(typeof _e=="string")try{_e=i.parse(_e)}catch{_e=i.parse(D.baseFontSize+"px "+_e)}else _e=i.parse(i.stringify(_e));var Pe=i.stringify({size:D.baseFontSize,family:_e.family,stretch:x?_e.stretch:void 0,variant:_e.variant,weight:_e.weight,style:_e.style}),Ve=a(_e.size),Ze=Math.round(Ve[0]*o(Ve[1]));if(Ze!==S.fontSize[Ye]&&(P=!0,S.fontSize[Ye]=Ze),(!S.font[Ye]||Pe!=S.font[Ye].baseString)&&(f=!0,S.font[Ye]=D.fonts[Pe],!S.font[Ye])){var Ke=_e.family.join(", "),lt=[_e.style];_e.style!=_e.variant&<.push(_e.variant),_e.variant!=_e.weight&<.push(_e.weight),x&&_e.weight!=_e.stretch&<.push(_e.stretch),S.font[Ye]={baseString:Pe,family:Ke,weight:_e.weight,stretch:_e.stretch,style:_e.style,variant:_e.variant,width:{},kerning:{},metrics:b(Ke,{origin:"top",fontSize:D.baseFontSize,fontStyle:lt.join(" ")})},D.fonts[Pe]=S.font[Ye]}}),(f||P)&&this.font.forEach(function(_e,Ye){var Pe=i.stringify({size:S.fontSize[Ye],family:_e.family,stretch:x?_e.stretch:void 0,variant:_e.variant,weight:_e.weight,style:_e.style});if(S.fontAtlas[Ye]=S.shader.atlas[Pe],!S.fontAtlas[Ye]){var Ve=_e.metrics;S.shader.atlas[Pe]=S.fontAtlas[Ye]={fontString:Pe,step:Math.ceil(S.fontSize[Ye]*Ve.bottom*.5)*2,em:S.fontSize[Ye],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:S.regl.texture()}}M.text==null&&(M.text=S.text)}),typeof M.text=="string"&&M.position&&M.position.length>2){for(var E=Array(M.position.length*.5),k=0;k2){for(var z=!M.position[0].length,U=r.mallocFloat(this.count*2),H=0,B=0;H1?S.align[Ye]:S.align[0]:S.align;if(typeof Pe=="number")return Pe;switch(Pe){case"right":case"end":return-_e;case"center":case"centre":case"middle":return-_e*.5}return 0})),this.baseline==null&&M.baseline==null&&(M.baseline=0),M.baseline!=null&&(this.baseline=M.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(_e,Ye){var Pe=(S.font[Ye]||S.font[0]).metrics,Ve=0;return Ve+=Pe.bottom*.5,typeof _e=="number"?Ve+=_e-Pe.baseline:Ve+=-Pe[_e],Ve*=-1,Ve})),M.color!=null)if(M.color||(M.color="transparent"),typeof M.color=="string"||!isNaN(M.color))this.color=l(M.color,"uint8");else{var Se;if(typeof M.color[0]=="number"&&M.color.length>this.counts.length){var Te=M.color.length;Se=r.mallocUint8(Te);for(var Fe=(M.color.subarray||M.color.slice).bind(M.color),Ie=0;Ie4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(De){var ke=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(ke);for(var We=0;We1?this.counts[We]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[We]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(We*4,We*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[We]:this.opacity,baseline:this.baselineOffset[We]!=null?this.baselineOffset[We]:this.baselineOffset[0],align:this.align?this.alignOffset[We]!=null?this.alignOffset[We]:this.alignOffset[0]:0,atlas:this.fontAtlas[We]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(We*2,We*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},D.prototype.destroy=function(){},D.prototype.kerning=!0,D.prototype.position={constant:new Float32Array(2)},D.prototype.translate=null,D.prototype.scale=null,D.prototype.font=null,D.prototype.text="",D.prototype.positionOffset=[0,0],D.prototype.opacity=1,D.prototype.color=new Uint8Array([0,0,0,255]),D.prototype.alignOffset=[0,0],D.maxAtlasSize=1024,D.atlasCanvas=document.createElement("canvas"),D.atlasContext=D.atlasCanvas.getContext("2d",{alpha:!1}),D.baseFontSize=64,D.fonts={};function L(w){return typeof w=="function"&&w._gl&&w.prop&&w.texture&&w.buffer}R.exports=D},12018:function(R,F,e){var i=e(71299);R.exports=function(r){if(r?typeof r=="string"&&(r={container:r}):r={},t(r)?r={container:r}:y(r)?r={container:r}:p(r)?r={gl:r}:r=i(r,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),r.pixelRatio||(r.pixelRatio=e.g.pixelRatio||1),r.gl)return r.gl;if(r.canvas&&(r.container=r.canvas.parentNode),r.container){if(typeof r.container=="string"){var n=document.querySelector(r.container);if(!n)throw Error("Element "+r.container+" is not found");r.container=n}t(r.container)?(r.canvas=r.container,r.container=r.canvas.parentNode):r.canvas||(r.canvas=l(),r.container.appendChild(r.canvas),m(r))}else if(!r.canvas)if(typeof document<"u")r.container=document.body||document.documentElement,r.canvas=l(),r.container.appendChild(r.canvas),m(r);else throw Error("Not DOM environment. Use headless-gl.");return r.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(u){try{r.gl=r.canvas.getContext(u,r.attrs)}catch{}return r.gl}),r.gl};function m(d){if(d.container)if(d.container==document.body)document.body.style.width||(d.canvas.width=d.width||d.pixelRatio*e.g.innerWidth),document.body.style.height||(d.canvas.height=d.height||d.pixelRatio*e.g.innerHeight);else{var r=d.container.getBoundingClientRect();d.canvas.width=d.width||r.right-r.left,d.canvas.height=d.height||r.bottom-r.top}}function t(d){return typeof d.getContext=="function"&&"width"in d&&"height"in d}function y(d){return typeof d.nodeName=="string"&&typeof d.appendChild=="function"&&typeof d.getBoundingClientRect=="function"}function p(d){return typeof d.drawArrays=="function"||typeof d.drawElements=="function"}function l(){var d=document.createElement("canvas");return d.style.position="absolute",d.style.top=0,d.style.left=0,d}},56068:function(R){R.exports=function(F){typeof F=="string"&&(F=[F]);for(var e=[].slice.call(arguments,1),i=[],m=0;m */F.read=function(e,i,m,t,y){var p,l,d=y*8-t-1,r=(1<>1,u=-7,a=m?y-1:0,o=m?-1:1,c=e[i+a];for(a+=o,p=c&(1<<-u)-1,c>>=-u,u+=d;u>0;p=p*256+e[i+a],a+=o,u-=8);for(l=p&(1<<-u)-1,p>>=-u,u+=t;u>0;l=l*256+e[i+a],a+=o,u-=8);if(p===0)p=1-n;else{if(p===r)return l?NaN:(c?-1:1)*(1/0);l=l+Math.pow(2,t),p=p-n}return(c?-1:1)*l*Math.pow(2,p-t)},F.write=function(e,i,m,t,y,p){var l,d,r,n=p*8-y-1,u=(1<>1,o=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=t?0:p-1,s=t?1:-1,b=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(d=isNaN(i)?1:0,l=u):(l=Math.floor(Math.log(i)/Math.LN2),i*(r=Math.pow(2,-l))<1&&(l--,r*=2),l+a>=1?i+=o/r:i+=o*Math.pow(2,1-a),i*r>=2&&(l++,r/=2),l+a>=u?(d=0,l=u):l+a>=1?(d=(i*r-1)*Math.pow(2,y),l=l+a):(d=i*Math.pow(2,a-1)*Math.pow(2,y),l=0));y>=8;e[m+c]=d&255,c+=s,d/=256,y-=8);for(l=l<0;e[m+c]=l&255,c+=s,l/=256,n-=8);e[m+c-s]|=b*128}},42018:function(R){typeof Object.create=="function"?R.exports=function(e,i){i&&(e.super_=i,e.prototype=Object.create(i.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:R.exports=function(e,i){if(i){e.super_=i;var m=function(){};m.prototype=i.prototype,e.prototype=new m,e.prototype.constructor=e}}},47216:function(R,F,e){var i=e(84543)(),m=e(6614),t=m("Object.prototype.toString"),y=function(r){return i&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:t(r)==="[object Arguments]"},p=function(r){return y(r)?!0:r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&t(r)!=="[object Array]"&&t(r.callee)==="[object Function]"},l=function(){return y(arguments)}();y.isLegacyArguments=p,R.exports=l?y:p},54404:function(R){R.exports=!0},85395:function(R){var F=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,i,m;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{i=Object.defineProperty({},"length",{get:function(){throw m}}),m={},e(function(){throw 42},null,i)}catch(A){A!==m&&(e=null)}else e=null;var t=/^\s*class\b/,y=function(v){try{var h=F.call(v);return t.test(h)}catch{return!1}},p=function(v){try{return y(v)?!1:(F.call(v),!0)}catch{return!1}},l=Object.prototype.toString,d="[object Object]",r="[object Function]",n="[object GeneratorFunction]",u="[object HTMLAllCollection]",a="[object HTML document.all class]",o="[object HTMLCollection]",c=typeof Symbol=="function"&&!!Symbol.toStringTag,s=!(0 in[,]),b=function(){return!1};if(typeof document=="object"){var g=document.all;l.call(g)===l.call(document.all)&&(b=function(v){if((s||!v)&&(typeof v>"u"||typeof v=="object"))try{var h=l.call(v);return(h===u||h===a||h===o||h===d)&&v("")==null}catch{}return!1})}R.exports=e?function(v){if(b(v))return!0;if(!v||typeof v!="function"&&typeof v!="object")return!1;try{e(v,null,i)}catch(h){if(h!==m)return!1}return!y(v)&&p(v)}:function(v){if(b(v))return!0;if(!v||typeof v!="function"&&typeof v!="object")return!1;if(c)return p(v);if(y(v))return!1;var h=l.call(v);return h!==r&&h!==n&&!/^\[object HTML/.test(h)?!1:p(v)}},65481:function(R,F,e){var i=Object.prototype.toString,m=Function.prototype.toString,t=/^\s*(?:function)?\*/,y=e(84543)(),p=Object.getPrototypeOf,l=function(){if(!y)return!1;try{return Function("return function*() {}")()}catch{}},d;R.exports=function(n){if(typeof n!="function")return!1;if(t.test(m.call(n)))return!0;if(!y){var u=i.call(n);return u==="[object GeneratorFunction]"}if(!p)return!1;if(typeof d>"u"){var a=l();d=a?p(a):!1}return p(n)===d}},62683:function(R){R.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},64274:function(R){R.exports=function(e){return e!==e}},15567:function(R,F,e){var i=e(68222),m=e(17045),t=e(64274),y=e(14922),p=e(22442),l=i(y(),Number);m(l,{getPolyfill:y,implementation:t,shim:p}),R.exports=l},14922:function(R,F,e){var i=e(64274);R.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:i}},22442:function(R,F,e){var i=e(17045),m=e(14922);R.exports=function(){var y=m();return i(Number,{isNaN:y},{isNaN:function(){return Number.isNaN!==y}}),y}},64941:function(R){R.exports=function(F){var e=typeof F;return F!==null&&(e==="object"||e==="function")}},10973:function(R){var F=Object.prototype.toString;R.exports=function(e){var i;return F.call(e)==="[object Object]"&&(i=Object.getPrototypeOf(e),i===null||i===Object.getPrototypeOf({}))}},18546:function(R){R.exports=function(F){for(var e=F.length,i,m=0;m13)&&i!==32&&i!==133&&i!==160&&i!==5760&&i!==6158&&(i<8192||i>8205)&&i!==8232&&i!==8233&&i!==8239&&i!==8287&&i!==8288&&i!==12288&&i!==65279)return!1;return!0}},89546:function(R){R.exports=function(e){return typeof e!="string"?!1:(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}},9187:function(R,F,e){var i=e(31353),m=e(72077),t=e(6614),y=t("Object.prototype.toString"),p=e(84543)(),l=e(40383),d=typeof globalThis>"u"?e.g:globalThis,r=m(),n=t("Array.prototype.indexOf",!0)||function(b,g){for(var A=0;A-1}return l?c(b):!1}},44517:function(R){(function(F,e){R.exports=e()})(this,function(){var F,e,i;function m(t,y){if(!F)F=y;else if(!e)e=y;else{var p="var sharedChunk = {}; ("+F+")(sharedChunk); ("+e+")(sharedChunk);",l={};F(l),i=y(l),i.workerUrl=window.URL.createObjectURL(new Blob([p],{type:"text/javascript"}))}}return m(["exports"],function(t){function y(I,_){return _={exports:{}},I(_,_.exports),_.exports}var p="1.10.1",l=d;function d(I,_,j,ue){this.cx=3*I,this.bx=3*(j-I)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*_,this.by=3*(ue-_)-this.cy,this.ay=1-this.cy-this.by,this.p1x=I,this.p1y=ue,this.p2x=j,this.p2y=ue}d.prototype.sampleCurveX=function(I){return((this.ax*I+this.bx)*I+this.cx)*I},d.prototype.sampleCurveY=function(I){return((this.ay*I+this.by)*I+this.cy)*I},d.prototype.sampleCurveDerivativeX=function(I){return(3*this.ax*I+2*this.bx)*I+this.cx},d.prototype.solveCurveX=function(I,_){typeof _>"u"&&(_=1e-6);var j,ue,me,Ee,Ne;for(me=I,Ne=0;Ne<8;Ne++){if(Ee=this.sampleCurveX(me)-I,Math.abs(Ee)<_)return me;var Qe=this.sampleCurveDerivativeX(me);if(Math.abs(Qe)<1e-6)break;me=me-Ee/Qe}if(j=0,ue=1,me=I,meue)return ue;for(;jEe?j=me:ue=me,me=(ue-j)*.5+j}return me},d.prototype.solve=function(I,_){return this.sampleCurveY(this.solveCurveX(I,_))};var r=n;function n(I,_){this.x=I,this.y=_}n.prototype={clone:function(){return new n(this.x,this.y)},add:function(I){return this.clone()._add(I)},sub:function(I){return this.clone()._sub(I)},multByPoint:function(I){return this.clone()._multByPoint(I)},divByPoint:function(I){return this.clone()._divByPoint(I)},mult:function(I){return this.clone()._mult(I)},div:function(I){return this.clone()._div(I)},rotate:function(I){return this.clone()._rotate(I)},rotateAround:function(I,_){return this.clone()._rotateAround(I,_)},matMult:function(I){return this.clone()._matMult(I)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(I){return this.x===I.x&&this.y===I.y},dist:function(I){return Math.sqrt(this.distSqr(I))},distSqr:function(I){var _=I.x-this.x,j=I.y-this.y;return _*_+j*j},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(I){return Math.atan2(this.y-I.y,this.x-I.x)},angleWith:function(I){return this.angleWithSep(I.x,I.y)},angleWithSep:function(I,_){return Math.atan2(this.x*_-this.y*I,this.x*I+this.y*_)},_matMult:function(I){var _=I[0]*this.x+I[1]*this.y,j=I[2]*this.x+I[3]*this.y;return this.x=_,this.y=j,this},_add:function(I){return this.x+=I.x,this.y+=I.y,this},_sub:function(I){return this.x-=I.x,this.y-=I.y,this},_mult:function(I){return this.x*=I,this.y*=I,this},_div:function(I){return this.x/=I,this.y/=I,this},_multByPoint:function(I){return this.x*=I.x,this.y*=I.y,this},_divByPoint:function(I){return this.x/=I.x,this.y/=I.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var I=this.y;return this.y=this.x,this.x=-I,this},_rotate:function(I){var _=Math.cos(I),j=Math.sin(I),ue=_*this.x-j*this.y,me=j*this.x+_*this.y;return this.x=ue,this.y=me,this},_rotateAround:function(I,_){var j=Math.cos(I),ue=Math.sin(I),me=_.x+j*(this.x-_.x)-ue*(this.y-_.y),Ee=_.y+ue*(this.x-_.x)+j*(this.y-_.y);return this.x=me,this.y=Ee,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(I){return I instanceof n?I:Array.isArray(I)?new n(I[0],I[1]):I};function u(I,_){if(Array.isArray(I)){if(!Array.isArray(_)||I.length!==_.length)return!1;for(var j=0;j=1)return 1;var _=I*I,j=_*I;return 4*(I<.5?j:3*(I-_)+j-.75)}function o(I,_,j,ue){var me=new l(I,_,j,ue);return function(Ee){return me.solve(Ee)}}var c=o(.25,.1,.25,1);function s(I,_,j){return Math.min(j,Math.max(_,I))}function b(I,_,j){var ue=j-_,me=((I-_)%ue+ue)%ue+_;return me===_?j:me}function g(I,_,j){if(!I.length)return j(null,[]);var ue=I.length,me=new Array(I.length),Ee=null;I.forEach(function(Ne,Qe){_(Ne,function(dt,Tt){dt&&(Ee=dt),me[Qe]=Tt,--ue===0&&j(Ee,me)})})}function A(I){var _=[];for(var j in I)_.push(I[j]);return _}function v(I,_){var j=[];for(var ue in I)ue in _||j.push(ue);return j}function h(I){for(var _=[],j=arguments.length-1;j-- >0;)_[j]=arguments[j+1];for(var ue=0,me=_;ue>_/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,I)}return I()}function w(I){return I?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(I):!1}function M(I,_){I.forEach(function(j){!_[j]||(_[j]=_[j].bind(_))})}function S(I,_){return I.indexOf(_,I.length-_.length)!==-1}function f(I,_,j){var ue={};for(var me in I)ue[me]=_.call(j||this,I[me],me,I);return ue}function P(I,_,j){var ue={};for(var me in I)_.call(j||this,I[me],me,I)&&(ue[me]=I[me]);return ue}function E(I){return Array.isArray(I)?I.map(E):typeof I=="object"&&I?f(I,E):I}function k(I,_){for(var j=0;j=0)return!0;return!1}var O={};function G(I){O[I]||(typeof console<"u"&&console.warn(I),O[I]=!0)}function z(I,_,j){return(j.y-I.y)*(_.x-I.x)>(_.y-I.y)*(j.x-I.x)}function U(I){for(var _=0,j=0,ue=I.length,me=ue-1,Ee=void 0,Ne=void 0;j@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,j={};if(I.replace(_,function(me,Ee,Ne,Qe){var dt=Ne||Qe;return j[Ee]=dt?dt.toLowerCase():!0,""}),j["max-age"]){var ue=parseInt(j["max-age"],10);isNaN(ue)?delete j["max-age"]:j["max-age"]=ue}return j}var q=null;function re(I){if(q==null){var _=I.navigator?I.navigator.userAgent:null;q=!!I.safari||!!(_&&(/\b(iPad|iPhone|iPod)\b/.test(_)||!!_.match("Safari")&&!_.match("Chrome")))}return q}function ie(I){try{var _=self[I];return _.setItem("_mapbox_test_",1),_.removeItem("_mapbox_test_"),!0}catch{return!1}}function le(I){return self.btoa(encodeURIComponent(I).replace(/%([0-9A-F]{2})/g,function(_,j){return String.fromCharCode(Number("0x"+j))}))}function he(I){return decodeURIComponent(self.atob(I).split("").map(function(_){return"%"+("00"+_.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var $=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),Z=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,K=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,Q,ae,fe={now:$,frame:function(_){var j=Z(_);return{cancel:function(){return K(j)}}},getImageData:function(_,j){j===void 0&&(j=0);var ue=self.document.createElement("canvas"),me=ue.getContext("2d");if(!me)throw new Error("failed to create canvas 2d context");return ue.width=_.width,ue.height=_.height,me.drawImage(_,0,0,_.width,_.height),me.getImageData(-j,-j,_.width+2*j,_.height+2*j)},resolveURL:function(_){return Q||(Q=self.document.createElement("a")),Q.href=_,Q.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return self.matchMedia?(ae==null&&(ae=self.matchMedia("(prefers-reduced-motion: reduce)")),ae.matches):!1}},te={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},ne={supported:!1,testSupport:Se},ce,oe=!1,de,we=!1;self.document&&(de=self.document.createElement("img"),de.onload=function(){ce&&Te(ce),ce=null,we=!0},de.onerror=function(){oe=!0,ce=null},de.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function Se(I){oe||!de||(we?Te(I):ce=I)}function Te(I){var _=I.createTexture();I.bindTexture(I.TEXTURE_2D,_);try{if(I.texImage2D(I.TEXTURE_2D,0,I.RGBA,I.RGBA,I.UNSIGNED_BYTE,de),I.isContextLost())return;ne.supported=!0}catch{}I.deleteTexture(_),oe=!0}var Fe="01";function Ie(){for(var I="1",_="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",j="",ue=0;ue<10;ue++)j+=_[Math.floor(Math.random()*62)];var me=12*60*60*1e3,Ee=[I,Fe,j].join(""),Ne=Date.now()+me;return{token:Ee,tokenExpiresAt:Ne}}var Me=function(_,j){this._transformRequestFn=_,this._customAccessToken=j,this._createSkuToken()};Me.prototype._createSkuToken=function(){var _=Ie();this._skuToken=_.token,this._skuTokenExpiresAt=_.tokenExpiresAt},Me.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Me.prototype.transformRequest=function(_,j){return this._transformRequestFn?this._transformRequestFn(_,j)||{url:_}:{url:_}},Me.prototype.normalizeStyleURL=function(_,j){if(!Ae(_))return _;var ue=Pe(_);return ue.path="/styles/v1"+ue.path,this._makeAPIURL(ue,this._customAccessToken||j)},Me.prototype.normalizeGlyphsURL=function(_,j){if(!Ae(_))return _;var ue=Pe(_);return ue.path="/fonts/v1"+ue.path,this._makeAPIURL(ue,this._customAccessToken||j)},Me.prototype.normalizeSourceURL=function(_,j){if(!Ae(_))return _;var ue=Pe(_);return ue.path="/v4/"+ue.authority+".json",ue.params.push("secure"),this._makeAPIURL(ue,this._customAccessToken||j)},Me.prototype.normalizeSpriteURL=function(_,j,ue,me){var Ee=Pe(_);return Ae(_)?(Ee.path="/styles/v1"+Ee.path+"/sprite"+j+ue,this._makeAPIURL(Ee,this._customAccessToken||me)):(Ee.path+=""+j+ue,Ve(Ee))},Me.prototype.normalizeTileURL=function(_,j){if(this._isSkuTokenExpired()&&this._createSkuToken(),_&&!Ae(_))return _;var ue=Pe(_),me=/(\.(png|jpg)\d*)(?=$)/,Ee=/^.+\/v4\//,Ne=fe.devicePixelRatio>=2||j===512?"@2x":"",Qe=ne.supported?".webp":"$1";ue.path=ue.path.replace(me,""+Ne+Qe),ue.path=ue.path.replace(Ee,"/"),ue.path="/v4"+ue.path;var dt=this._customAccessToken||_e(ue.params)||te.ACCESS_TOKEN;return te.REQUIRE_ACCESS_TOKEN&&dt&&this._skuToken&&ue.params.push("sku="+this._skuToken),this._makeAPIURL(ue,dt)},Me.prototype.canonicalizeTileURL=function(_,j){var ue="/v4/",me=/\.[\w]+$/,Ee=Pe(_);if(!Ee.path.match(/(^\/v4\/)/)||!Ee.path.match(me))return _;var Ne="mapbox://tiles/";Ne+=Ee.path.replace(ue,"");var Qe=Ee.params;return j&&(Qe=Qe.filter(function(dt){return!dt.match(/^access_token=/)})),Qe.length&&(Ne+="?"+Qe.join("&")),Ne},Me.prototype.canonicalizeTileset=function(_,j){for(var ue=j?Ae(j):!1,me=[],Ee=0,Ne=_.tiles||[];Ee=1&&self.localStorage.setItem(j,JSON.stringify(this.eventData))}catch{G("Unable to write to LocalStorage")}},lt.prototype.processRequests=function(_){},lt.prototype.postEvent=function(_,j,ue,me){var Ee=this;if(!!te.EVENTS_URL){var Ne=Pe(te.EVENTS_URL);Ne.params.push("access_token="+(me||te.ACCESS_TOKEN||""));var Qe={event:this.type,created:new Date(_).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:p,skuId:Fe,userId:this.anonId},dt=j?h(Qe,j):Qe,Tt={url:Ve(Ne),headers:{"Content-Type":"text/plain"},body:JSON.stringify([dt])};this.pendingRequest=Dt(Tt,function(Ct){Ee.pendingRequest=null,ue(Ct),Ee.saveEventData(),Ee.processRequests(me)})}},lt.prototype.queueRequest=function(_,j){this.queue.push(_),this.processRequests(j)};var vt=function(I){function _(){I.call(this,"map.load"),this.success={},this.skuToken=""}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype.postMapLoadEvent=function(ue,me,Ee,Ne){this.skuToken=Ee,(te.EVENTS_URL&&Ne||te.ACCESS_TOKEN&&Array.isArray(ue)&&ue.some(function(Qe){return Ae(Qe)||ke(Qe)}))&&this.queueRequest({id:me,timestamp:Date.now()},Ne)},_.prototype.processRequests=function(ue){var me=this;if(!(this.pendingRequest||this.queue.length===0)){var Ee=this.queue.shift(),Ne=Ee.id,Qe=Ee.timestamp;Ne&&this.success[Ne]||(this.anonId||this.fetchEventData(),w(this.anonId)||(this.anonId=L()),this.postEvent(Qe,{skuToken:this.skuToken},function(dt){dt||Ne&&(me.success[Ne]=!0)},ue))}},_}(lt),mt=function(I){function _(j){I.call(this,"appUserTurnstile"),this._customAccessToken=j}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype.postTurnstileEvent=function(ue,me){te.EVENTS_URL&&te.ACCESS_TOKEN&&Array.isArray(ue)&&ue.some(function(Ee){return Ae(Ee)||ke(Ee)})&&this.queueRequest(Date.now(),me)},_.prototype.processRequests=function(ue){var me=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var Ee=Ke(te.ACCESS_TOKEN),Ne=Ee?Ee.u:te.ACCESS_TOKEN,Qe=Ne!==this.eventData.tokenU;w(this.anonId)||(this.anonId=L(),Qe=!0);var dt=this.queue.shift();if(this.eventData.lastSuccess){var Tt=new Date(this.eventData.lastSuccess),Ct=new Date(dt),Wt=(dt-this.eventData.lastSuccess)/(24*60*60*1e3);Qe=Qe||Wt>=1||Wt<-1||Tt.getDate()!==Ct.getDate()}else Qe=!0;if(!Qe)return this.processRequests();this.postEvent(dt,{"enabled.telemetry":!1},function(or){or||(me.eventData.lastSuccess=dt,me.eventData.tokenU=Ne)},ue)}},_}(lt),Et=new mt,et=Et.postTurnstileEvent.bind(Et),Ue=new vt,Be=Ue.postMapLoadEvent.bind(Ue),rt="mapbox-tiles",ot=500,qe=50,Oe=1e3*60*7,Ce;function pe(){self.caches&&!Ce&&(Ce=self.caches.open(rt))}var be;function Re(I,_){if(be===void 0)try{new Response(new ReadableStream),be=!0}catch{be=!1}be?_(I.body):I.blob().then(_)}function He(I,_,j){if(pe(),!!Ce){var ue={status:_.status,statusText:_.statusText,headers:new self.Headers};_.headers.forEach(function(Ne,Qe){return ue.headers.set(Qe,Ne)});var me=W(_.headers.get("Cache-Control")||"");if(!me["no-store"]){me["max-age"]&&ue.headers.set("Expires",new Date(j+me["max-age"]*1e3).toUTCString());var Ee=new Date(ue.headers.get("Expires")).getTime()-j;EeDate.now()&&!j["no-cache"]}var Lt=1/0;function Ut(I){Lt++,Lt>qe&&(I.getActor().send("enforceCacheSizeLimit",ot),Lt=0)}function Gt(I){pe(),Ce&&Ce.then(function(_){_.keys().then(function(j){for(var ue=0;ue=200&&j.status<300||j.status===0)&&j.response!==null){var me=j.response;if(I.type==="json")try{me=JSON.parse(j.response)}catch(Ee){return _(Ee)}_(null,me,j.getResponseHeader("Cache-Control"),j.getResponseHeader("Expires"))}else _(new jt(j.statusText,j.status,I.url))},j.send(I.body),{cancel:function(){return j.abort()}}}var ut=function(I,_){if(!br(I.url)){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return dr(I,_);if(B()&&self.worker&&self.worker.actor){var j=!0;return self.worker.actor.send("getResource",I,_,void 0,j)}}return ht(I,_)},wt=function(I,_){return ut(h(I,{type:"json"}),_)},St=function(I,_){return ut(h(I,{type:"arrayBuffer"}),_)},Dt=function(I,_){return ut(h(I,{method:"POST"}),_)};function Mt(I){var _=self.document.createElement("a");return _.href=I,_.protocol===self.document.location.protocol&&_.host===self.document.location.host}var zt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Vt(I,_,j,ue){var me=new self.Image,Ee=self.URL;me.onload=function(){_(null,me),Ee.revokeObjectURL(me.src)},me.onerror=function(){return _(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var Ne=new self.Blob([new Uint8Array(I)],{type:"image/png"});me.cacheControl=j,me.expires=ue,me.src=I.byteLength?Ee.createObjectURL(Ne):zt}function Kt(I,_){var j=new self.Blob([new Uint8Array(I)],{type:"image/png"});self.createImageBitmap(j).then(function(ue){_(null,ue)}).catch(function(ue){_(new Error("Could not load image because of "+ue.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var $t,ir,Mr=function(){$t=[],ir=0};Mr();var Xe=function(I,_){if(ne.supported&&(I.headers||(I.headers={}),I.headers.accept="image/webp,*/*"),ir>=te.MAX_PARALLEL_IMAGE_REQUESTS){var j={requestParameters:I,callback:_,cancelled:!1,cancel:function(){this.cancelled=!0}};return $t.push(j),j}ir++;var ue=!1,me=function(){if(!ue)for(ue=!0,ir--;$t.length&&ir0||this._oneTimeListeners&&this._oneTimeListeners[_]&&this._oneTimeListeners[_].length>0||this._eventedParent&&this._eventedParent.listens(_)},sr.prototype.setEventedParent=function(_,j){return this._eventedParent=_,this._eventedParentData=j,this};var nr=8,Bt={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},hr={"*":{type:"source"}},pr=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],wr={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},"*":{type:"*"}},vr={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},Jr={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},_r={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},Br={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},wn={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Kr={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},Fn=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],In={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},mr={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},cr={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},zr={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},kr={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},un={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},xn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},An={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},bn={type:"array",value:"*"},_n={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},Qn={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},sa={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},aa={type:"array",value:"*",minimum:1},fa={type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},ra={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},Nr=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],sn={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},an={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},pn={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},Hn={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Dn={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},Ln={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Gn={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},oa={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Fa={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},ai={"*":{type:"string"}},Xt={$version:nr,$root:Bt,sources:hr,source:pr,source_vector:wr,source_raster:vr,source_raster_dem:Jr,source_geojson:_r,source_video:Br,source_image:wn,layer:Kr,layout:Fn,layout_background:In,layout_fill:mr,layout_circle:cr,layout_heatmap:zr,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:kr,layout_symbol:un,layout_raster:xn,layout_hillshade:An,filter:bn,filter_operator:_n,geometry_type:Qn,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:sa,expression:aa,expression_name:fa,light:ra,paint:Nr,paint_fill:sn,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:an,paint_circle:pn,paint_heatmap:Hn,paint_symbol:Dn,paint_raster:Ln,paint_hillshade:Gn,paint_background:oa,transition:Fa,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:ai},Ar=function(_,j,ue,me){this.message=(_?_+": ":"")+ue,me&&(this.identifier=me),j!=null&&j.__line__&&(this.line=j.__line__)};function on(I){var _=I.key,j=I.value;return j?[new Ar(_,j,"constants have been deprecated as of v8")]:[]}function hn(I){for(var _=[],j=arguments.length-1;j-- >0;)_[j]=arguments[j+1];for(var ue=0,me=_;ue":I.itemType.kind==="value"?"array":"array<"+_+">"}else return I.kind}var Po=[Pr,Er,Ir,dn,On,ca,Yn,ua(gn),la];function Xo(I,_){if(_.kind==="error")return null;if(I.kind==="array"){if(_.kind==="array"&&(_.N===0&&_.itemType.kind==="value"||!Xo(I.itemType,_.itemType))&&(typeof I.N!="number"||I.N===_.N))return null}else{if(I.kind===_.kind)return null;if(I.kind==="value")for(var j=0,ue=Po;j255?255:Tt}function me(Tt){return Tt<0?0:Tt>1?1:Tt}function Ee(Tt){return Tt[Tt.length-1]==="%"?ue(parseFloat(Tt)/100*255):ue(parseInt(Tt))}function Ne(Tt){return Tt[Tt.length-1]==="%"?me(parseFloat(Tt)/100):me(parseFloat(Tt))}function Qe(Tt,Ct,Wt){return Wt<0?Wt+=1:Wt>1&&(Wt-=1),Wt*6<1?Tt+(Ct-Tt)*Wt*6:Wt*2<1?Ct:Wt*3<2?Tt+(Ct-Tt)*(2/3-Wt)*6:Tt}function dt(Tt){var Ct=Tt.replace(/ /g,"").toLowerCase();if(Ct in j)return j[Ct].slice();if(Ct[0]==="#"){if(Ct.length===4){var Wt=parseInt(Ct.substr(1),16);return Wt>=0&&Wt<=4095?[(Wt&3840)>>4|(Wt&3840)>>8,Wt&240|(Wt&240)>>4,Wt&15|(Wt&15)<<4,1]:null}else if(Ct.length===7){var Wt=parseInt(Ct.substr(1),16);return Wt>=0&&Wt<=16777215?[(Wt&16711680)>>16,(Wt&65280)>>8,Wt&255,1]:null}return null}var or=Ct.indexOf("("),Qt=Ct.indexOf(")");if(or!==-1&&Qt+1===Ct.length){var xr=Ct.substr(0,or),Ur=Ct.substr(or+1,Qt-(or+1)).split(","),nn=1;switch(xr){case"rgba":if(Ur.length!==4)return null;nn=Ne(Ur.pop());case"rgb":return Ur.length!==3?null:[Ee(Ur[0]),Ee(Ur[1]),Ee(Ur[2]),nn];case"hsla":if(Ur.length!==4)return null;nn=Ne(Ur.pop());case"hsl":if(Ur.length!==3)return null;var en=(parseFloat(Ur[0])%360+360)%360/360,En=Ne(Ur[1]),yn=Ne(Ur[2]),Sn=yn<=.5?yn*(En+1):yn+En-yn*En,Rn=yn*2-Sn;return[ue(Qe(Rn,Sn,en+1/3)*255),ue(Qe(Rn,Sn,en)*255),ue(Qe(Rn,Sn,en-1/3)*255),nn];default:return null}}return null}try{_.parseCSSColor=dt}catch{}}),Bc=ts.parseCSSColor,pi=function(_,j,ue,me){me===void 0&&(me=1),this.r=_,this.g=j,this.b=ue,this.a=me};pi.parse=function(_){if(!!_){if(_ instanceof pi)return _;if(typeof _=="string"){var j=Bc(_);if(!!j)return new pi(j[0]/255*j[3],j[1]/255*j[3],j[2]/255*j[3],j[3])}}},pi.prototype.toString=function(){var _=this.toArray(),j=_[0],ue=_[1],me=_[2],Ee=_[3];return"rgba("+Math.round(j)+","+Math.round(ue)+","+Math.round(me)+","+Ee+")"},pi.prototype.toArray=function(){var _=this,j=_.r,ue=_.g,me=_.b,Ee=_.a;return Ee===0?[0,0,0,0]:[j*255/Ee,ue*255/Ee,me*255/Ee,Ee]},pi.black=new pi(0,0,0,1),pi.white=new pi(1,1,1,1),pi.transparent=new pi(0,0,0,0),pi.red=new pi(1,0,0,1);var df=function(_,j,ue){_?this.sensitivity=j?"variant":"case":this.sensitivity=j?"accent":"base",this.locale=ue,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};df.prototype.compare=function(_,j){return this.collator.compare(_,j)},df.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Fu=function(_,j,ue,me,Ee){this.text=_,this.image=j,this.scale=ue,this.fontStack=me,this.textColor=Ee},No=function(_){this.sections=_};No.fromString=function(_){return new No([new Fu(_,null,null,null,null)])},No.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(_){return _.text.length!==0||_.image&&_.image.name.length!==0})},No.factory=function(_){return _ instanceof No?_:No.fromString(_)},No.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(_){return _.text}).join("")},No.prototype.serialize=function(){for(var _=["format"],j=0,ue=this.sections;j=0&&I<=255&&typeof _=="number"&&_>=0&&_<=255&&typeof j=="number"&&j>=0&&j<=255)){var me=typeof ue=="number"?[I,_,j,ue]:[I,_,j];return"Invalid rgba value ["+me.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof ue>"u"||typeof ue=="number"&&ue>=0&&ue<=1?null:"Invalid rgba value ["+[I,_,j,ue].join(", ")+"]: 'a' must be between 0 and 1."}function pf(I){if(I===null)return!0;if(typeof I=="string")return!0;if(typeof I=="boolean")return!0;if(typeof I=="number")return!0;if(I instanceof pi)return!0;if(I instanceof df)return!0;if(I instanceof No)return!0;if(I instanceof ls)return!0;if(Array.isArray(I)){for(var _=0,j=I;_2){var Qe=_[1];if(typeof Qe!="string"||!(Qe in ys)||Qe==="object")return j.error('The item type argument of "array" must be one of string, number, boolean',1);Ne=ys[Qe],ue++}else Ne=gn;var dt;if(_.length>3){if(_[2]!==null&&(typeof _[2]!="number"||_[2]<0||_[2]!==Math.floor(_[2])))return j.error('The length argument to "array" must be a positive integer literal',2);dt=_[2],ue++}me=ua(Ne,dt)}else me=ys[Ee];for(var Tt=[];ue<_.length;ue++){var Ct=j.parse(_[ue],ue,gn);if(!Ct)return null;Tt.push(Ct)}return new jo(me,Tt)},jo.prototype.evaluate=function(_){for(var j=0;j1)&&j.push(me)}}return j.concat(this.args.map(function(Ee){return Ee.serialize()}))};var Es=function(_){this.type=ca,this.sections=_};Es.parse=function(_,j){if(_.length<2)return j.error("Expected at least one argument.");var ue=_[1];if(!Array.isArray(ue)&&typeof ue=="object")return j.error("First argument must be an image or text section.");for(var me=[],Ee=!1,Ne=1;Ne<=_.length-1;++Ne){var Qe=_[Ne];if(Ee&&typeof Qe=="object"&&!Array.isArray(Qe)){Ee=!1;var dt=null;if(Qe["font-scale"]&&(dt=j.parse(Qe["font-scale"],1,Er),!dt))return null;var Tt=null;if(Qe["text-font"]&&(Tt=j.parse(Qe["text-font"],1,ua(Ir)),!Tt))return null;var Ct=null;if(Qe["text-color"]&&(Ct=j.parse(Qe["text-color"],1,On),!Ct))return null;var Wt=me[me.length-1];Wt.scale=dt,Wt.font=Tt,Wt.textColor=Ct}else{var or=j.parse(_[Ne],1,gn);if(!or)return null;var Qt=or.type.kind;if(Qt!=="string"&&Qt!=="value"&&Qt!=="null"&&Qt!=="resolvedImage")return j.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Ee=!0,me.push({content:or,scale:null,font:null,textColor:null})}}return new Es(me)},Es.prototype.evaluate=function(_){var j=function(ue){var me=ue.content.evaluate(_);return eo(me)===la?new Fu("",me,null,null,null):new Fu(gf(me),null,ue.scale?ue.scale.evaluate(_):null,ue.font?ue.font.evaluate(_).join(","):null,ue.textColor?ue.textColor.evaluate(_):null)};return new No(this.sections.map(j))},Es.prototype.eachChild=function(_){for(var j=0,ue=this.sections;j-1),ue},el.prototype.eachChild=function(_){_(this.input)},el.prototype.outputDefined=function(){return!1},el.prototype.serialize=function(){return["image",this.input.serialize()]};var Tl={"to-boolean":dn,"to-color":On,"to-number":Er,"to-string":Ir},Oo=function(_,j){this.type=_,this.args=j};Oo.parse=function(_,j){if(_.length<2)return j.error("Expected at least one argument.");var ue=_[0];if((ue==="to-boolean"||ue==="to-string")&&_.length!==2)return j.error("Expected one argument.");for(var me=Tl[ue],Ee=[],Ne=1;Ne<_.length;Ne++){var Qe=j.parse(_[Ne],Ne,gn);if(!Qe)return null;Ee.push(Qe)}return new Oo(me,Ee)},Oo.prototype.evaluate=function(_){if(this.type.kind==="boolean")return Boolean(this.args[0].evaluate(_));if(this.type.kind==="color"){for(var j,ue,me=0,Ee=this.args;me4?ue="Invalid rbga value "+JSON.stringify(j)+": expected an array containing either three or four numeric values.":ue=zh(j[0],j[1],j[2],j[3]),!ue))return new pi(j[0]/255,j[1]/255,j[2]/255,j[3])}throw new So(ue||"Could not parse color from value '"+(typeof j=="string"?j:String(JSON.stringify(j)))+"'")}else if(this.type.kind==="number"){for(var dt=null,Tt=0,Ct=this.args;Tt=_[2]||I[1]<=_[1]||I[3]>=_[3])}function $v(I,_){var j=Vc(I[0]),ue=jv(I[1]),me=Math.pow(2,_.z);return[Math.round(j*me*rl),Math.round(ue*me*rl)]}function Kv(I,_,j){var ue=I[0]-_[0],me=I[1]-_[1],Ee=I[0]-j[0],Ne=I[1]-j[1];return ue*Ne-Ee*me===0&&ue*Ee<=0&&me*Ne<=0}function Jv(I,_,j){return _[1]>I[1]!=j[1]>I[1]&&I[0]<(j[0]-_[0])*(I[1]-_[1])/(j[1]-_[1])+_[0]}function Gc(I,_){for(var j=!1,ue=0,me=_.length;ue0&&Wt<0||Ct<0&&Wt>0}function ed(I,_,j,ue){var me=[_[0]-I[0],_[1]-I[1]],Ee=[ue[0]-j[0],ue[1]-j[1]];return qv(Ee,me)===0?!1:!!(Bh(I,_,j,ue)&&Bh(j,ue,I,_))}function td(I,_,j){for(var ue=0,me=j;uej[2]){var me=ue*.5,Ee=I[0]-j[0]>me?-ue:j[0]-I[0]>me?ue:0;Ee===0&&(Ee=I[0]-j[2]>me?-ue:j[2]-I[0]>me?ue:0),I[0]+=Ee}Hc(_,I)}function rd(I){I[0]=I[1]=1/0,I[2]=I[3]=-1/0}function Sl(I,_,j,ue){for(var me=Math.pow(2,ue.z)*rl,Ee=[ue.x*rl,ue.y*rl],Ne=[],Qe=0,dt=I;Qe=0)return!1;var j=!0;return I.eachChild(function(ue){j&&!_u(ue,_)&&(j=!1)}),j}var nl=function(_,j){this.type=j.type,this.name=_,this.boundExpression=j};nl.parse=function(_,j){if(_.length!==2||typeof _[1]!="string")return j.error("'var' expression requires exactly one string literal argument.");var ue=_[1];return j.scope.has(ue)?new nl(ue,j.scope.get(ue)):j.error('Unknown variable "'+ue+'". Make sure "'+ue+'" has been bound in an enclosing "let" expression before using it.',1)},nl.prototype.evaluate=function(_){return this.boundExpression.evaluate(_)},nl.prototype.eachChild=function(){},nl.prototype.outputDefined=function(){return!1},nl.prototype.serialize=function(){return["var",this.name]};var El=function(_,j,ue,me,Ee){j===void 0&&(j=[]),me===void 0&&(me=new cn),Ee===void 0&&(Ee=[]),this.registry=_,this.path=j,this.key=j.map(function(Ne){return"["+Ne+"]"}).join(""),this.scope=me,this.errors=Ee,this.expectedType=ue};El.prototype.parse=function(_,j,ue,me,Ee){return Ee===void 0&&(Ee={}),j?this.concat(j,ue,me)._parse(_,Ee):this._parse(_,Ee)},El.prototype._parse=function(_,j){(_===null||typeof _=="string"||typeof _=="boolean"||typeof _=="number")&&(_=["literal",_]);function ue(Ct,Wt,or){return or==="assert"?new jo(Wt,[Ct]):or==="coerce"?new Oo(Wt,[Ct]):Ct}if(Array.isArray(_)){if(_.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var me=_[0];if(typeof me!="string")return this.error("Expression name must be a string, but found "+typeof me+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var Ee=this.registry[me];if(Ee){var Ne=Ee.parse(_,this);if(!Ne)return null;if(this.expectedType){var Qe=this.expectedType,dt=Ne.type;if((Qe.kind==="string"||Qe.kind==="number"||Qe.kind==="boolean"||Qe.kind==="object"||Qe.kind==="array")&&dt.kind==="value")Ne=ue(Ne,Qe,j.typeAnnotation||"assert");else if((Qe.kind==="color"||Qe.kind==="formatted"||Qe.kind==="resolvedImage")&&(dt.kind==="value"||dt.kind==="string"))Ne=ue(Ne,Qe,j.typeAnnotation||"coerce");else if(this.checkSubtype(Qe,dt))return null}if(!(Ne instanceof ms)&&Ne.type.kind!=="resolvedImage"&&Zc(Ne)){var Tt=new tl;try{Ne=new ms(Ne.type,Ne.evaluate(Tt))}catch(Ct){return this.error(Ct.message),null}}return Ne}return this.error('Unknown expression "'+me+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof _>"u"?this.error("'undefined' value invalid. Use null instead."):typeof _=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof _+" instead.")},El.prototype.concat=function(_,j,ue){var me=typeof _=="number"?this.path.concat(_):this.path,Ee=ue?this.scope.concat(ue):this.scope;return new El(this.registry,me,j||null,Ee,this.errors)},El.prototype.error=function(_){for(var j=[],ue=arguments.length-1;ue-- >0;)j[ue]=arguments[ue+1];var me=""+this.key+j.map(function(Ee){return"["+Ee+"]"}).join("");this.errors.push(new Mn(me,_))},El.prototype.checkSubtype=function(_,j){var ue=Xo(_,j);return ue&&this.error(ue),ue};function Zc(I){if(I instanceof nl)return Zc(I.boundExpression);if(I instanceof zo&&I.name==="error")return!1;if(I instanceof Ml)return!1;if(I instanceof Cs)return!1;var _=I instanceof Oo||I instanceof jo,j=!0;return I.eachChild(function(ue){_?j=j&&Zc(ue):j=j&&ue instanceof ms}),j?hu(I)&&_u(I,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function Ou(I,_){for(var j=I.length-1,ue=0,me=j,Ee=0,Ne,Qe;ue<=me;)if(Ee=Math.floor((ue+me)/2),Ne=I[Ee],Qe=I[Ee+1],Ne<=_){if(Ee===j||__)me=Ee-1;else throw new So("Input is not a number.");return 0}var Wl=function(_,j,ue){this.type=_,this.input=j,this.labels=[],this.outputs=[];for(var me=0,Ee=ue;me=Qe)return j.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Tt);var Wt=j.parse(dt,Ct,Ee);if(!Wt)return null;Ee=Ee||Wt.type,me.push([Qe,Wt])}return new Wl(Ee,ue,me)},Wl.prototype.evaluate=function(_){var j=this.labels,ue=this.outputs;if(j.length===1)return ue[0].evaluate(_);var me=this.input.evaluate(_);if(me<=j[0])return ue[0].evaluate(_);var Ee=j.length;if(me>=j[Ee-1])return ue[Ee-1].evaluate(_);var Ne=Ou(j,me);return ue[Ne].evaluate(_)},Wl.prototype.eachChild=function(_){_(this.input);for(var j=0,ue=this.outputs;j0&&_.push(this.labels[j]),_.push(this.outputs[j].serialize());return _};function lo(I,_,j){return I*(1-j)+_*j}function Xc(I,_,j){return new pi(lo(I.r,_.r,j),lo(I.g,_.g,j),lo(I.b,_.b,j),lo(I.a,_.a,j))}function rc(I,_,j){return I.map(function(ue,me){return lo(ue,_[me],j)})}var zu=Object.freeze({__proto__:null,number:lo,color:Xc,array:rc}),Hh=.95047,Vh=1,ku=1.08883,Bu=4/29,Ro=6/29,nc=3*Ro*Ro,ad=Ro*Ro*Ro,jc=Math.PI/180,id=180/Math.PI;function ac(I){return I>ad?Math.pow(I,.3333333333333333):I/nc+Bu}function xf(I){return I>Ro?I*I*I:nc*(I-Bu)}function $c(I){return 255*(I<=.0031308?12.92*I:1.055*Math.pow(I,.4166666666666667)-.055)}function Kc(I){return I/=255,I<=.04045?I/12.92:Math.pow((I+.055)/1.055,2.4)}function bf(I){var _=Kc(I.r),j=Kc(I.g),ue=Kc(I.b),me=ac((.4124564*_+.3575761*j+.1804375*ue)/Hh),Ee=ac((.2126729*_+.7151522*j+.072175*ue)/Vh),Ne=ac((.0193339*_+.119192*j+.9503041*ue)/ku);return{l:116*Ee-16,a:500*(me-Ee),b:200*(Ee-Ne),alpha:I.a}}function Jc(I){var _=(I.l+16)/116,j=isNaN(I.a)?_:_+I.a/500,ue=isNaN(I.b)?_:_-I.b/200;return _=Vh*xf(_),j=Hh*xf(j),ue=ku*xf(ue),new pi($c(3.2404542*j-1.5371385*_-.4985314*ue),$c(-.969266*j+1.8760108*_+.041556*ue),$c(.0556434*j-.2040259*_+1.0572252*ue),I.alpha)}function ic(I,_,j){return{l:lo(I.l,_.l,j),a:lo(I.a,_.a,j),b:lo(I.b,_.b,j),alpha:lo(I.alpha,_.alpha,j)}}function Qc(I){var _=bf(I),j=_.l,ue=_.a,me=_.b,Ee=Math.atan2(me,ue)*id;return{h:Ee<0?Ee+360:Ee,c:Math.sqrt(ue*ue+me*me),l:j,alpha:I.a}}function _i(I){var _=I.h*jc,j=I.c,ue=I.l;return Jc({l:ue,a:Math.cos(_)*j,b:Math.sin(_)*j,alpha:I.alpha})}function Gh(I,_,j){var ue=_-I;return I+j*(ue>180||ue<-180?ue-360*Math.round(ue/360):ue)}function ks(I,_,j){return{h:Gh(I.h,_.h,j),c:lo(I.c,_.c,j),l:lo(I.l,_.l,j),alpha:lo(I.alpha,_.alpha,j)}}var Uu={forward:bf,reverse:Jc,interpolate:ic},vu={forward:Qc,reverse:_i,interpolate:ks},qc=Object.freeze({__proto__:null,lab:Uu,hcl:vu}),co=function(_,j,ue,me,Ee){this.type=_,this.operator=j,this.interpolation=ue,this.input=me,this.labels=[],this.outputs=[];for(var Ne=0,Qe=Ee;Ne1}))return j.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);me={name:"cubic-bezier",controlPoints:dt}}else return j.error("Unknown interpolation type "+String(me[0]),1,0);if(_.length-1<4)return j.error("Expected at least 4 arguments, but found only "+(_.length-1)+".");if((_.length-1)%2!==0)return j.error("Expected an even number of arguments.");if(Ee=j.parse(Ee,2,Er),!Ee)return null;var Tt=[],Ct=null;ue==="interpolate-hcl"||ue==="interpolate-lab"?Ct=On:j.expectedType&&j.expectedType.kind!=="value"&&(Ct=j.expectedType);for(var Wt=0;Wt=or)return j.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',xr);var nn=j.parse(Qt,Ur,Ct);if(!nn)return null;Ct=Ct||nn.type,Tt.push([or,nn])}return Ct.kind!=="number"&&Ct.kind!=="color"&&!(Ct.kind==="array"&&Ct.itemType.kind==="number"&&typeof Ct.N=="number")?j.error("Type "+ya(Ct)+" is not interpolatable."):new co(Ct,ue,me,Ee,Tt)},co.prototype.evaluate=function(_){var j=this.labels,ue=this.outputs;if(j.length===1)return ue[0].evaluate(_);var me=this.input.evaluate(_);if(me<=j[0])return ue[0].evaluate(_);var Ee=j.length;if(me>=j[Ee-1])return ue[Ee-1].evaluate(_);var Ne=Ou(j,me),Qe=j[Ne],dt=j[Ne+1],Tt=co.interpolationFactor(this.interpolation,me,Qe,dt),Ct=ue[Ne].evaluate(_),Wt=ue[Ne+1].evaluate(_);return this.operator==="interpolate"?zu[this.type.kind.toLowerCase()](Ct,Wt,Tt):this.operator==="interpolate-hcl"?vu.reverse(vu.interpolate(vu.forward(Ct),vu.forward(Wt),Tt)):Uu.reverse(Uu.interpolate(Uu.forward(Ct),Uu.forward(Wt),Tt))},co.prototype.eachChild=function(_){_(this.input);for(var j=0,ue=this.outputs;j=ue.length)throw new So("Array index out of bounds: "+j+" > "+(ue.length-1)+".");if(j!==Math.floor(j))throw new So("Array index must be an integer, but found "+j+" instead.");return ue[j]},Dl.prototype.eachChild=function(_){_(this.index),_(this.input)},Dl.prototype.outputDefined=function(){return!1},Dl.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Yl=function(_,j){this.type=dn,this.needle=_,this.haystack=j};Yl.parse=function(_,j){if(_.length!==3)return j.error("Expected 2 arguments, but found "+(_.length-1)+" instead.");var ue=j.parse(_[1],1,gn),me=j.parse(_[2],2,gn);return!ue||!me?null:es(ue.type,[dn,Ir,Er,Pr,gn])?new Yl(ue,me):j.error("Expected first argument to be of type boolean, string, number or null, but found "+ya(ue.type)+" instead")},Yl.prototype.evaluate=function(_){var j=this.needle.evaluate(_),ue=this.haystack.evaluate(_);if(!ue)return!1;if(!ss(j,["boolean","string","number","null"]))throw new So("Expected first argument to be of type boolean, string, number or null, but found "+ya(eo(j))+" instead.");if(!ss(ue,["string","array"]))throw new So("Expected second argument to be of type array or string, but found "+ya(eo(ue))+" instead.");return ue.indexOf(j)>=0},Yl.prototype.eachChild=function(_){_(this.needle),_(this.haystack)},Yl.prototype.outputDefined=function(){return!0},Yl.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Zl=function(_,j,ue){this.type=Er,this.needle=_,this.haystack=j,this.fromIndex=ue};Zl.parse=function(_,j){if(_.length<=2||_.length>=5)return j.error("Expected 3 or 4 arguments, but found "+(_.length-1)+" instead.");var ue=j.parse(_[1],1,gn),me=j.parse(_[2],2,gn);if(!ue||!me)return null;if(!es(ue.type,[dn,Ir,Er,Pr,gn]))return j.error("Expected first argument to be of type boolean, string, number or null, but found "+ya(ue.type)+" instead");if(_.length===4){var Ee=j.parse(_[3],3,Er);return Ee?new Zl(ue,me,Ee):null}else return new Zl(ue,me)},Zl.prototype.evaluate=function(_){var j=this.needle.evaluate(_),ue=this.haystack.evaluate(_);if(!ss(j,["boolean","string","number","null"]))throw new So("Expected first argument to be of type boolean, string, number or null, but found "+ya(eo(j))+" instead.");if(!ss(ue,["string","array"]))throw new So("Expected second argument to be of type array or string, but found "+ya(eo(ue))+" instead.");if(this.fromIndex){var me=this.fromIndex.evaluate(_);return ue.indexOf(j,me)}return ue.indexOf(j)},Zl.prototype.eachChild=function(_){_(this.needle),_(this.haystack),this.fromIndex&&_(this.fromIndex)},Zl.prototype.outputDefined=function(){return!1},Zl.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var _=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),_]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Xl=function(_,j,ue,me,Ee,Ne){this.inputType=_,this.type=j,this.input=ue,this.cases=me,this.outputs=Ee,this.otherwise=Ne};Xl.parse=function(_,j){if(_.length<5)return j.error("Expected at least 4 arguments, but found only "+(_.length-1)+".");if(_.length%2!==1)return j.error("Expected an even number of arguments.");var ue,me;j.expectedType&&j.expectedType.kind!=="value"&&(me=j.expectedType);for(var Ee={},Ne=[],Qe=2;Qe<_.length-1;Qe+=2){var dt=_[Qe],Tt=_[Qe+1];Array.isArray(dt)||(dt=[dt]);var Ct=j.concat(Qe);if(dt.length===0)return Ct.error("Expected at least one branch label.");for(var Wt=0,or=dt;WtNumber.MAX_SAFE_INTEGER)return Ct.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Qt=="number"&&Math.floor(Qt)!==Qt)return Ct.error("Numeric branch labels must be integer values.");if(!ue)ue=eo(Qt);else if(Ct.checkSubtype(ue,eo(Qt)))return null;if(typeof Ee[String(Qt)]<"u")return Ct.error("Branch labels must be unique.");Ee[String(Qt)]=Ne.length}var xr=j.parse(Tt,Qe,me);if(!xr)return null;me=me||xr.type,Ne.push(xr)}var Ur=j.parse(_[1],1,gn);if(!Ur)return null;var nn=j.parse(_[_.length-1],_.length-1,me);return!nn||Ur.type.kind!=="value"&&j.concat(1).checkSubtype(ue,Ur.type)?null:new Xl(ue,me,Ur,Ee,Ne,nn)},Xl.prototype.evaluate=function(_){var j=this.input.evaluate(_),ue=eo(j)===this.inputType&&this.outputs[this.cases[j]]||this.otherwise;return ue.evaluate(_)},Xl.prototype.eachChild=function(_){_(this.input),this.outputs.forEach(_),_(this.otherwise)},Xl.prototype.outputDefined=function(){return this.outputs.every(function(_){return _.outputDefined()})&&this.otherwise.outputDefined()},Xl.prototype.serialize=function(){for(var _=this,j=["match",this.input.serialize()],ue=Object.keys(this.cases).sort(),me=[],Ee={},Ne=0,Qe=ue;Ne=5)return j.error("Expected 3 or 4 arguments, but found "+(_.length-1)+" instead.");var ue=j.parse(_[1],1,gn),me=j.parse(_[2],2,Er);if(!ue||!me)return null;if(!es(ue.type,[ua(gn),Ir,gn]))return j.error("Expected first argument to be of type array or string, but found "+ya(ue.type)+" instead");if(_.length===4){var Ee=j.parse(_[3],3,Er);return Ee?new al(ue.type,ue,me,Ee):null}else return new al(ue.type,ue,me)},al.prototype.evaluate=function(_){var j=this.input.evaluate(_),ue=this.beginIndex.evaluate(_);if(!ss(j,["string","array"]))throw new So("Expected first argument to be of type array or string, but found "+ya(eo(j))+" instead.");if(this.endIndex){var me=this.endIndex.evaluate(_);return j.slice(ue,me)}return j.slice(ue)},al.prototype.eachChild=function(_){_(this.input),_(this.beginIndex),this.endIndex&&_(this.endIndex)},al.prototype.outputDefined=function(){return!1},al.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var _=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),_]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Af(I,_){return I==="=="||I==="!="?_.kind==="boolean"||_.kind==="string"||_.kind==="number"||_.kind==="null"||_.kind==="value":_.kind==="string"||_.kind==="number"||_.kind==="value"}function Tf(I,_,j){return _===j}function oc(I,_,j){return _!==j}function od(I,_,j){return _j}function ld(I,_,j){return _<=j}function ud(I,_,j){return _>=j}function sc(I,_,j,ue){return ue.compare(_,j)===0}function Wh(I,_,j,ue){return!sc(I,_,j,ue)}function Hu(I,_,j,ue){return ue.compare(_,j)<0}function ko(I,_,j,ue){return ue.compare(_,j)>0}function fs(I,_,j,ue){return ue.compare(_,j)<=0}function Mf(I,_,j,ue){return ue.compare(_,j)>=0}function du(I,_,j){var ue=I!=="=="&&I!=="!=";return function(){function me(Ee,Ne,Qe){this.type=dn,this.lhs=Ee,this.rhs=Ne,this.collator=Qe,this.hasUntypedArgument=Ee.type.kind==="value"||Ne.type.kind==="value"}return me.parse=function(Ne,Qe){if(Ne.length!==3&&Ne.length!==4)return Qe.error("Expected two or three arguments.");var dt=Ne[0],Tt=Qe.parse(Ne[1],1,gn);if(!Tt)return null;if(!Af(dt,Tt.type))return Qe.concat(1).error('"'+dt+`" comparisons are not supported for type '`+ya(Tt.type)+"'.");var Ct=Qe.parse(Ne[2],2,gn);if(!Ct)return null;if(!Af(dt,Ct.type))return Qe.concat(2).error('"'+dt+`" comparisons are not supported for type '`+ya(Ct.type)+"'.");if(Tt.type.kind!==Ct.type.kind&&Tt.type.kind!=="value"&&Ct.type.kind!=="value")return Qe.error("Cannot compare types '"+ya(Tt.type)+"' and '"+ya(Ct.type)+"'.");ue&&(Tt.type.kind==="value"&&Ct.type.kind!=="value"?Tt=new jo(Ct.type,[Tt]):Tt.type.kind!=="value"&&Ct.type.kind==="value"&&(Ct=new jo(Tt.type,[Ct])));var Wt=null;if(Ne.length===4){if(Tt.type.kind!=="string"&&Ct.type.kind!=="string"&&Tt.type.kind!=="value"&&Ct.type.kind!=="value")return Qe.error("Cannot use collator to compare non-string types.");if(Wt=Qe.parse(Ne[3],3,ea),!Wt)return null}return new me(Tt,Ct,Wt)},me.prototype.evaluate=function(Ne){var Qe=this.lhs.evaluate(Ne),dt=this.rhs.evaluate(Ne);if(ue&&this.hasUntypedArgument){var Tt=eo(Qe),Ct=eo(dt);if(Tt.kind!==Ct.kind||!(Tt.kind==="string"||Tt.kind==="number"))throw new So('Expected arguments for "'+I+'" to be (string, string) or (number, number), but found ('+Tt.kind+", "+Ct.kind+") instead.")}if(this.collator&&!ue&&this.hasUntypedArgument){var Wt=eo(Qe),or=eo(dt);if(Wt.kind!=="string"||or.kind!=="string")return _(Ne,Qe,dt)}return this.collator?j(Ne,Qe,dt,this.collator.evaluate(Ne)):_(Ne,Qe,dt)},me.prototype.eachChild=function(Ne){Ne(this.lhs),Ne(this.rhs),this.collator&&Ne(this.collator)},me.prototype.outputDefined=function(){return!0},me.prototype.serialize=function(){var Ne=[I];return this.eachChild(function(Qe){Ne.push(Qe.serialize())}),Ne},me}()}var Sf=du("==",Tf,sc),lc=du("!=",oc,Wh),fd=du("<",od,Hu),Yh=du(">",sd,ko),Zh=du("<=",ld,fs),eh=du(">=",ud,Mf),jl=function(_,j,ue,me,Ee){this.type=Ir,this.number=_,this.locale=j,this.currency=ue,this.minFractionDigits=me,this.maxFractionDigits=Ee};jl.parse=function(_,j){if(_.length!==3)return j.error("Expected two arguments.");var ue=j.parse(_[1],1,Er);if(!ue)return null;var me=_[2];if(typeof me!="object"||Array.isArray(me))return j.error("NumberFormat options argument must be an object.");var Ee=null;if(me.locale&&(Ee=j.parse(me.locale,1,Ir),!Ee))return null;var Ne=null;if(me.currency&&(Ne=j.parse(me.currency,1,Ir),!Ne))return null;var Qe=null;if(me["min-fraction-digits"]&&(Qe=j.parse(me["min-fraction-digits"],1,Er),!Qe))return null;var dt=null;return me["max-fraction-digits"]&&(dt=j.parse(me["max-fraction-digits"],1,Er),!dt)?null:new jl(ue,Ee,Ne,Qe,dt)},jl.prototype.evaluate=function(_){return new Intl.NumberFormat(this.locale?this.locale.evaluate(_):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(_):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(_):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(_):void 0}).format(this.number.evaluate(_))},jl.prototype.eachChild=function(_){_(this.number),this.locale&&_(this.locale),this.currency&&_(this.currency),this.minFractionDigits&&_(this.minFractionDigits),this.maxFractionDigits&&_(this.maxFractionDigits)},jl.prototype.outputDefined=function(){return!1},jl.prototype.serialize=function(){var _={};return this.locale&&(_.locale=this.locale.serialize()),this.currency&&(_.currency=this.currency.serialize()),this.minFractionDigits&&(_["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(_["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),_]};var ho=function(_){this.type=Er,this.input=_};ho.parse=function(_,j){if(_.length!==2)return j.error("Expected 1 argument, but found "+(_.length-1)+" instead.");var ue=j.parse(_[1],1);return ue?ue.type.kind!=="array"&&ue.type.kind!=="string"&&ue.type.kind!=="value"?j.error("Expected argument of type string or array, but found "+ya(ue.type)+" instead."):new ho(ue):null},ho.prototype.evaluate=function(_){var j=this.input.evaluate(_);if(typeof j=="string")return j.length;if(Array.isArray(j))return j.length;throw new So("Expected value to be of type string or array, but found "+ya(eo(j))+" instead.")},ho.prototype.eachChild=function(_){_(this.input)},ho.prototype.outputDefined=function(){return!1},ho.prototype.serialize=function(){var _=["length"];return this.eachChild(function(j){_.push(j.serialize())}),_};var il={"==":Sf,"!=":lc,">":Yh,"<":fd,">=":eh,"<=":Zh,array:jo,at:Dl,boolean:jo,case:Bs,coalesce:us,collator:Ml,format:Es,image:el,in:Yl,"index-of":Zl,interpolate:co,"interpolate-hcl":co,"interpolate-lab":co,length:ho,let:Cl,literal:ms,match:Xl,number:jo,"number-format":jl,object:jo,slice:al,step:Wl,string:jo,"to-boolean":Oo,"to-color":Oo,"to-number":Oo,"to-string":Oo,var:nl,within:Cs};function th(I,_){var j=_[0],ue=_[1],me=_[2],Ee=_[3];j=j.evaluate(I),ue=ue.evaluate(I),me=me.evaluate(I);var Ne=Ee?Ee.evaluate(I):1,Qe=zh(j,ue,me,Ne);if(Qe)throw new So(Qe);return new pi(j/255*Ne,ue/255*Ne,me/255*Ne,Ne)}function Xh(I,_){return I in _}function pu(I,_){var j=_[I];return typeof j>"u"?null:j}function uc(I,_,j,ue){for(;j<=ue;){var me=j+ue>>1;if(_[me]===I)return!0;_[me]>I?ue=me-1:j=me+1}return!1}function Us(I){return{type:I}}zo.register(il,{error:[kn,[Ir],function(I,_){var j=_[0];throw new So(j.evaluate(I))}],typeof:[Ir,[gn],function(I,_){var j=_[0];return ya(eo(j.evaluate(I)))}],"to-rgba":[ua(Er,4),[On],function(I,_){var j=_[0];return j.evaluate(I).toArray()}],rgb:[On,[Er,Er,Er],th],rgba:[On,[Er,Er,Er,Er],th],has:{type:dn,overloads:[[[Ir],function(I,_){var j=_[0];return Xh(j.evaluate(I),I.properties())}],[[Ir,Yn],function(I,_){var j=_[0],ue=_[1];return Xh(j.evaluate(I),ue.evaluate(I))}]]},get:{type:gn,overloads:[[[Ir],function(I,_){var j=_[0];return pu(j.evaluate(I),I.properties())}],[[Ir,Yn],function(I,_){var j=_[0],ue=_[1];return pu(j.evaluate(I),ue.evaluate(I))}]]},"feature-state":[gn,[Ir],function(I,_){var j=_[0];return pu(j.evaluate(I),I.featureState||{})}],properties:[Yn,[],function(I){return I.properties()}],"geometry-type":[Ir,[],function(I){return I.geometryType()}],id:[gn,[],function(I){return I.id()}],zoom:[Er,[],function(I){return I.globals.zoom}],"heatmap-density":[Er,[],function(I){return I.globals.heatmapDensity||0}],"line-progress":[Er,[],function(I){return I.globals.lineProgress||0}],accumulated:[gn,[],function(I){return I.globals.accumulated===void 0?null:I.globals.accumulated}],"+":[Er,Us(Er),function(I,_){for(var j=0,ue=0,me=_;ue":[dn,[Ir,gn],function(I,_){var j=_[0],ue=_[1],me=I.properties()[j.value],Ee=ue.value;return typeof me==typeof Ee&&me>Ee}],"filter-id->":[dn,[gn],function(I,_){var j=_[0],ue=I.id(),me=j.value;return typeof ue==typeof me&&ue>me}],"filter-<=":[dn,[Ir,gn],function(I,_){var j=_[0],ue=_[1],me=I.properties()[j.value],Ee=ue.value;return typeof me==typeof Ee&&me<=Ee}],"filter-id-<=":[dn,[gn],function(I,_){var j=_[0],ue=I.id(),me=j.value;return typeof ue==typeof me&&ue<=me}],"filter->=":[dn,[Ir,gn],function(I,_){var j=_[0],ue=_[1],me=I.properties()[j.value],Ee=ue.value;return typeof me==typeof Ee&&me>=Ee}],"filter-id->=":[dn,[gn],function(I,_){var j=_[0],ue=I.id(),me=j.value;return typeof ue==typeof me&&ue>=me}],"filter-has":[dn,[gn],function(I,_){var j=_[0];return j.value in I.properties()}],"filter-has-id":[dn,[],function(I){return I.id()!==null&&I.id()!==void 0}],"filter-type-in":[dn,[ua(Ir)],function(I,_){var j=_[0];return j.value.indexOf(I.geometryType())>=0}],"filter-id-in":[dn,[ua(gn)],function(I,_){var j=_[0];return j.value.indexOf(I.id())>=0}],"filter-in-small":[dn,[Ir,ua(gn)],function(I,_){var j=_[0],ue=_[1];return ue.value.indexOf(I.properties()[j.value])>=0}],"filter-in-large":[dn,[Ir,ua(gn)],function(I,_){var j=_[0],ue=_[1];return uc(I.properties()[j.value],ue.value,0,ue.value.length-1)}],all:{type:dn,overloads:[[[dn,dn],function(I,_){var j=_[0],ue=_[1];return j.evaluate(I)&&ue.evaluate(I)}],[Us(dn),function(I,_){for(var j=0,ue=_;j-1}function Vu(I){return!!I.expression&&I.expression.interpolated}function Ci(I){return I instanceof Number?"number":I instanceof String?"string":I instanceof Boolean?"boolean":Array.isArray(I)?"array":I===null?"null":typeof I}function gu(I){return typeof I=="object"&&I!==null&&!Array.isArray(I)}function cc(I){return I}function hc(I,_){var j=_.type==="color",ue=I.stops&&typeof I.stops[0][0]=="object",me=ue||I.property!==void 0,Ee=ue||!me,Ne=I.type||(Vu(_)?"exponential":"interval");if(j&&(I=hn({},I),I.stops&&(I.stops=I.stops.map(function(Jn){return[Jn[0],pi.parse(Jn[1])]})),I.default?I.default=pi.parse(I.default):I.default=pi.parse(_.default)),I.colorSpace&&I.colorSpace!=="rgb"&&!qc[I.colorSpace])throw new Error("Unknown color space: "+I.colorSpace);var Qe,dt,Tt;if(Ne==="exponential")Qe=Gu;else if(Ne==="interval")Qe=nh;else if(Ne==="categorical"){Qe=cd,dt=Object.create(null);for(var Ct=0,Wt=I.stops;Ct=I.stops[ue-1][0])return I.stops[ue-1][1];var me=Ou(I.stops.map(function(Ee){return Ee[0]}),j);return I.stops[me][1]}function Gu(I,_,j){var ue=I.base!==void 0?I.base:1;if(Ci(j)!=="number")return $l(I.default,_.default);var me=I.stops.length;if(me===1||j<=I.stops[0][0])return I.stops[0][1];if(j>=I.stops[me-1][0])return I.stops[me-1][1];var Ee=Ou(I.stops.map(function(Wt){return Wt[0]}),j),Ne=jh(j,ue,I.stops[Ee][0],I.stops[Ee+1][0]),Qe=I.stops[Ee][1],dt=I.stops[Ee+1][1],Tt=zu[_.type]||cc;if(I.colorSpace&&I.colorSpace!=="rgb"){var Ct=qc[I.colorSpace];Tt=function(Wt,or){return Ct.reverse(Ct.interpolate(Ct.forward(Wt),Ct.forward(or),Ne))}}return typeof Qe.evaluate=="function"?{evaluate:function(){for(var or=[],Qt=arguments.length;Qt--;)or[Qt]=arguments[Qt];var xr=Qe.evaluate.apply(void 0,or),Ur=dt.evaluate.apply(void 0,or);if(!(xr===void 0||Ur===void 0))return Tt(xr,Ur,Ne)}}:Tt(Qe,dt,Ne)}function ah(I,_,j){return _.type==="color"?j=pi.parse(j):_.type==="formatted"?j=No.fromString(j.toString()):_.type==="resolvedImage"?j=ls.fromString(j.toString()):Ci(j)!==_.type&&(_.type!=="enum"||!_.values[j])&&(j=void 0),$l(j,I.default,_.default)}function jh(I,_,j,ue){var me=ue-j,Ee=I-j;return me===0?0:_===1?Ee/me:(Math.pow(_,Ee)-1)/(Math.pow(_,me)-1)}var Nl=function(_,j){this.expression=_,this._warningHistory={},this._evaluator=new tl,this._defaultValue=j?Kh(j):null,this._enumValues=j&&j.type==="enum"?j.values:null};Nl.prototype.evaluateWithoutErrorHandling=function(_,j,ue,me,Ee,Ne){return this._evaluator.globals=_,this._evaluator.feature=j,this._evaluator.featureState=ue,this._evaluator.canonical=me,this._evaluator.availableImages=Ee||null,this._evaluator.formattedSection=Ne,this.expression.evaluate(this._evaluator)},Nl.prototype.evaluate=function(_,j,ue,me,Ee,Ne){this._evaluator.globals=_,this._evaluator.feature=j||null,this._evaluator.featureState=ue||null,this._evaluator.canonical=me,this._evaluator.availableImages=Ee||null,this._evaluator.formattedSection=Ne||null;try{var Qe=this.expression.evaluate(this._evaluator);if(Qe==null||typeof Qe=="number"&&Qe!==Qe)return this._defaultValue;if(this._enumValues&&!(Qe in this._enumValues))throw new So("Expected value to be one of "+Object.keys(this._enumValues).map(function(dt){return JSON.stringify(dt)}).join(", ")+", but found "+JSON.stringify(Qe)+" instead.");return Qe}catch(dt){return this._warningHistory[dt.message]||(this._warningHistory[dt.message]=!0,typeof console<"u"&&console.warn(dt.message)),this._defaultValue}};function Kl(I){return Array.isArray(I)&&I.length>0&&typeof I[0]=="string"&&I[0]in il}function mu(I,_){var j=new El(il,[],_?vc(_):void 0),ue=j.parse(I,void 0,void 0,void 0,_&&_.type==="string"?{typeAnnotation:"coerce"}:void 0);return ue?fc(new Nl(ue,_)):Ll(j.errors)}var yu=function(_,j){this.kind=_,this._styleExpression=j,this.isStateDependent=_!=="constant"&&!yf(j.expression)};yu.prototype.evaluateWithoutErrorHandling=function(_,j,ue,me,Ee,Ne){return this._styleExpression.evaluateWithoutErrorHandling(_,j,ue,me,Ee,Ne)},yu.prototype.evaluate=function(_,j,ue,me,Ee,Ne){return this._styleExpression.evaluate(_,j,ue,me,Ee,Ne)};var cs=function(_,j,ue,me){this.kind=_,this.zoomStops=ue,this._styleExpression=j,this.isStateDependent=_!=="camera"&&!yf(j.expression),this.interpolationType=me};cs.prototype.evaluateWithoutErrorHandling=function(_,j,ue,me,Ee,Ne){return this._styleExpression.evaluateWithoutErrorHandling(_,j,ue,me,Ee,Ne)},cs.prototype.evaluate=function(_,j,ue,me,Ee,Ne){return this._styleExpression.evaluate(_,j,ue,me,Ee,Ne)},cs.prototype.interpolationFactor=function(_,j,ue){return this.interpolationType?co.interpolationFactor(this.interpolationType,_,j,ue):0};function xs(I,_){if(I=mu(I,_),I.result==="error")return I;var j=I.value.expression,ue=hu(j);if(!ue&&!Pl(_))return Ll([new Mn("","data expressions not supported")]);var me=_u(j,["zoom"]);if(!me&&!rh(_))return Ll([new Mn("","zoom expressions not supported")]);var Ee=Wu(j);if(!Ee&&!me)return Ll([new Mn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Ee instanceof Mn)return Ll([Ee]);if(Ee instanceof co&&!Vu(_))return Ll([new Mn("",'"interpolate" expressions cannot be used with this property')]);if(!Ee)return fc(ue?new yu("constant",I.value):new yu("source",I.value));var Ne=Ee instanceof co?Ee.interpolation:void 0;return fc(ue?new cs("camera",I.value,Ee.labels,Ne):new cs("composite",I.value,Ee.labels,Ne))}var xu=function(_,j){this._parameters=_,this._specification=j,hn(this,hc(this._parameters,this._specification))};xu.deserialize=function(_){return new xu(_._parameters,_._specification)},xu.serialize=function(_){return{_parameters:_._parameters,_specification:_._specification}};function $h(I,_){if(gu(I))return new xu(I,_);if(Kl(I)){var j=xs(I,_);if(j.result==="error")throw new Error(j.value.map(function(me){return me.key+": "+me.message}).join(", "));return j.value}else{var ue=I;return typeof I=="string"&&_.type==="color"&&(ue=pi.parse(I)),{kind:"constant",evaluate:function(){return ue}}}}function Wu(I){var _=null;if(I instanceof Cl)_=Wu(I.result);else if(I instanceof us)for(var j=0,ue=I.args;jue.maximum?[new Ar(_,j,j+" is greater than the maximum value "+ue.maximum)]:[]}function Ef(I){var _=I.valueSpec,j=vn(I.value.type),ue,me={},Ee,Ne,Qe=j!=="categorical"&&I.value.property===void 0,dt=!Qe,Tt=Ci(I.value.stops)==="array"&&Ci(I.value.stops[0])==="array"&&Ci(I.value.stops[0][0])==="object",Ct=Hs({key:I.key,value:I.value,valueSpec:I.styleSpec.function,style:I.style,styleSpec:I.styleSpec,objectElementValidators:{stops:Wt,default:xr}});return j==="identity"&&Qe&&Ct.push(new Ar(I.key,I.value,'missing required property "property"')),j!=="identity"&&!I.value.stops&&Ct.push(new Ar(I.key,I.value,'missing required property "stops"')),j==="exponential"&&I.valueSpec.expression&&!Vu(I.valueSpec)&&Ct.push(new Ar(I.key,I.value,"exponential functions not supported")),I.styleSpec.$version>=8&&(dt&&!Pl(I.valueSpec)?Ct.push(new Ar(I.key,I.value,"property functions not supported")):Qe&&!rh(I.valueSpec)&&Ct.push(new Ar(I.key,I.value,"zoom functions not supported"))),(j==="categorical"||Tt)&&I.value.property===void 0&&Ct.push(new Ar(I.key,I.value,'"property" property is required')),Ct;function Wt(Ur){if(j==="identity")return[new Ar(Ur.key,Ur.value,'identity function may not have a "stops" property')];var nn=[],en=Ur.value;return nn=nn.concat(ih({key:Ur.key,value:en,valueSpec:Ur.valueSpec,style:Ur.style,styleSpec:Ur.styleSpec,arrayElementValidator:or})),Ci(en)==="array"&&en.length===0&&nn.push(new Ar(Ur.key,en,"array must have at least one stop")),nn}function or(Ur){var nn=[],en=Ur.value,En=Ur.key;if(Ci(en)!=="array")return[new Ar(En,en,"array expected, "+Ci(en)+" found")];if(en.length!==2)return[new Ar(En,en,"array length 2 expected, length "+en.length+" found")];if(Tt){if(Ci(en[0])!=="object")return[new Ar(En,en,"object expected, "+Ci(en[0])+" found")];if(en[0].zoom===void 0)return[new Ar(En,en,"object stop key must have zoom")];if(en[0].value===void 0)return[new Ar(En,en,"object stop key must have value")];if(Ne&&Ne>vn(en[0].zoom))return[new Ar(En,en[0].zoom,"stop zoom values must appear in ascending order")];vn(en[0].zoom)!==Ne&&(Ne=vn(en[0].zoom),Ee=void 0,me={}),nn=nn.concat(Hs({key:En+"[0]",value:en[0],valueSpec:{zoom:{}},style:Ur.style,styleSpec:Ur.styleSpec,objectElementValidators:{zoom:Jl,value:Qt}}))}else nn=nn.concat(Qt({key:En+"[0]",value:en[0],valueSpec:{},style:Ur.style,styleSpec:Ur.styleSpec},en));return Kl(Pn(en[1]))?nn.concat([new Ar(En+"[1]",en[1],"expressions are not allowed in function stops.")]):nn.concat(ar({key:En+"[1]",value:en[1],valueSpec:_,style:Ur.style,styleSpec:Ur.styleSpec}))}function Qt(Ur,nn){var en=Ci(Ur.value),En=vn(Ur.value),yn=Ur.value!==null?Ur.value:nn;if(!ue)ue=en;else if(en!==ue)return[new Ar(Ur.key,yn,en+" stop domain type must match previous stop domain type "+ue)];if(en!=="number"&&en!=="string"&&en!=="boolean")return[new Ar(Ur.key,yn,"stop domain value must be a number, string, or boolean")];if(en!=="number"&&j!=="categorical"){var Sn="number expected, "+en+" found";return Pl(_)&&j===void 0&&(Sn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ar(Ur.key,yn,Sn)]}return j==="categorical"&&en==="number"&&(!isFinite(En)||Math.floor(En)!==En)?[new Ar(Ur.key,yn,"integer expected, found "+En)]:j!=="categorical"&&en==="number"&&Ee!==void 0&&En=2&&I[1]!=="$id"&&I[1]!=="$type";case"in":return I.length>=3&&(typeof I[1]!="string"||Array.isArray(I[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return I.length!==3||Array.isArray(I[1])||Array.isArray(I[2]);case"any":case"all":for(var _=0,j=I.slice(1);__?1:0}function Df(I){if(!Array.isArray(I))return!1;if(I[0]==="within")return!0;for(var _=1;_"||_==="<="||_===">="?pc(I[1],I[2],_):_==="any"?Qh(I.slice(1)):_==="all"?["all"].concat(I.slice(1).map(Ql)):_==="none"?["all"].concat(I.slice(1).map(Ql).map(bu)):_==="in"?sh(I[1],I.slice(2)):_==="!in"?bu(sh(I[1],I.slice(2))):_==="has"?lh(I[1]):_==="!has"?bu(lh(I[1])):_==="within"?I:!0;return j}function pc(I,_,j){switch(I){case"$type":return["filter-type-"+j,_];case"$id":return["filter-id-"+j,_];default:return["filter-"+j,I,_]}}function Qh(I){return["any"].concat(I.map(Ql))}function sh(I,_){if(_.length===0)return!1;switch(I){case"$type":return["filter-type-in",["literal",_]];case"$id":return["filter-id-in",["literal",_]];default:return _.length>200&&!_.some(function(j){return typeof j!=typeof _[0]})?["filter-in-large",I,["literal",_.sort(ol)]]:["filter-in-small",I,["literal",_]]}}function lh(I){switch(I){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",I]}}function bu(I){return["!",I]}function gc(I){return $o(Pn(I.value))?Rl(hn({},I,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Lf(I)}function Lf(I){var _=I.value,j=I.key;if(Ci(_)!=="array")return[new Ar(j,_,"array expected, "+Ci(_)+" found")];var ue=I.styleSpec,me,Ee=[];if(_.length<1)return[new Ar(j,_,"filter array must have at least 1 element")];switch(Ee=Ee.concat(dc({key:j+"[0]",value:_[0],valueSpec:ue.filter_operator,style:I.style,styleSpec:I.styleSpec})),vn(_[0])){case"<":case"<=":case">":case">=":_.length>=2&&vn(_[1])==="$type"&&Ee.push(new Ar(j,_,'"$type" cannot be use with operator "'+_[0]+'"'));case"==":case"!=":_.length!==3&&Ee.push(new Ar(j,_,'filter array for operator "'+_[0]+'" must have 3 elements'));case"in":case"!in":_.length>=2&&(me=Ci(_[1]),me!=="string"&&Ee.push(new Ar(j+"[1]",_[1],"string expected, "+me+" found")));for(var Ne=2;Ne<_.length;Ne++)me=Ci(_[Ne]),vn(_[1])==="$type"?Ee=Ee.concat(dc({key:j+"["+Ne+"]",value:_[Ne],valueSpec:ue.geometry_type,style:I.style,styleSpec:I.styleSpec})):me!=="string"&&me!=="number"&&me!=="boolean"&&Ee.push(new Ar(j+"["+Ne+"]",_[Ne],"string, number, or boolean expected, "+me+" found"));break;case"any":case"all":case"none":for(var Qe=1;Qe<_.length;Qe++)Ee=Ee.concat(Lf({key:j+"["+Qe+"]",value:_[Qe],style:I.style,styleSpec:I.styleSpec}));break;case"has":case"!has":me=Ci(_[1]),_.length!==2?Ee.push(new Ar(j,_,'filter array for "'+_[0]+'" operator must have 2 elements')):me!=="string"&&Ee.push(new Ar(j+"[1]",_[1],"string expected, "+me+" found"));break;case"within":me=Ci(_[1]),_.length!==2?Ee.push(new Ar(j,_,'filter array for "'+_[0]+'" operator must have 2 elements')):me!=="object"&&Ee.push(new Ar(j+"[1]",_[1],"object expected, "+me+" found"));break}return Ee}function qh(I,_){var j=I.key,ue=I.style,me=I.styleSpec,Ee=I.value,Ne=I.objectKey,Qe=me[_+"_"+I.layerType];if(!Qe)return[];var dt=Ne.match(/^(.*)-transition$/);if(_==="paint"&&dt&&Qe[dt[1]]&&Qe[dt[1]].transition)return ar({key:j,value:Ee,valueSpec:me.transition,style:ue,styleSpec:me});var Tt=I.valueSpec||Qe[Ne];if(!Tt)return[new Ar(j,Ee,'unknown property "'+Ne+'"')];var Ct;if(Ci(Ee)==="string"&&Pl(Tt)&&!Tt.tokens&&(Ct=/^{([^}]+)}$/.exec(Ee)))return[new Ar(j,Ee,'"'+Ne+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(Ct[1])+" }`.")];var Wt=[];return I.layerType==="symbol"&&(Ne==="text-field"&&ue&&!ue.glyphs&&Wt.push(new Ar(j,Ee,'use of "text-field" requires a style "glyphs" property')),Ne==="text-font"&&gu(Pn(Ee))&&vn(Ee.type)==="identity"&&Wt.push(new Ar(j,Ee,'"text-font" does not support identity functions'))),Wt.concat(ar({key:I.key,value:Ee,valueSpec:Tt,style:ue,styleSpec:me,expressionContext:"property",propertyType:_,propertyKey:Ne}))}function Pf(I){return qh(I,"paint")}function ev(I){return qh(I,"layout")}function Je(I){var _=[],j=I.value,ue=I.key,me=I.style,Ee=I.styleSpec;!j.type&&!j.ref&&_.push(new Ar(ue,j,'either "type" or "ref" is required'));var Ne=vn(j.type),Qe=vn(j.ref);if(j.id)for(var dt=vn(j.id),Tt=0;Tt=Ct[Qt+0]&&ue>=Ct[Qt+1])?(Ne[or]=!0,Ee.push(Tt[or])):Ne[or]=!1}}},za.prototype._forEachCell=function(I,_,j,ue,me,Ee,Ne,Qe){for(var dt=this._convertToCellCoord(I),Tt=this._convertToCellCoord(_),Ct=this._convertToCellCoord(j),Wt=this._convertToCellCoord(ue),or=dt;or<=Ct;or++)for(var Qt=Tt;Qt<=Wt;Qt++){var xr=this.d*Qt+or;if(!(Qe&&!Qe(this._convertFromCellCoord(or),this._convertFromCellCoord(Qt),this._convertFromCellCoord(or+1),this._convertFromCellCoord(Qt+1)))&&me.call(this,I,_,j,ue,xr,Ee,Ne,Qe))return}},za.prototype._convertFromCellCoord=function(I){return(I-this.padding)/this.scale},za.prototype._convertToCellCoord=function(I){return Math.max(0,Math.min(this.d-1,Math.floor(I*this.scale)+this.padding))},za.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var I=this.cells,_=_a+this.cells.length+1+1,j=0,ue=0;ue=0)){var Wt=I[Ct];Tt[Ct]=Oi[dt].shallow.indexOf(Ct)>=0?Wt:nt(Wt,_)}I instanceof Error&&(Tt.message=I.message)}if(Tt.$name)throw new Error("$name property is reserved for worker serialization logic.");return dt!=="Object"&&(Tt.$name=dt),Tt}throw new Error("can't serialize object of type "+typeof I)}function it(I){if(I==null||typeof I=="boolean"||typeof I=="number"||typeof I=="string"||I instanceof Boolean||I instanceof Number||I instanceof String||I instanceof Date||I instanceof RegExp||Ge(I)||tt(I)||ArrayBuffer.isView(I)||I instanceof Ai)return I;if(Array.isArray(I))return I.map(it);if(typeof I=="object"){var _=I.$name||"Object",j=Oi[_],ue=j.klass;if(!ue)throw new Error("can't deserialize unregistered class "+_);if(ue.deserialize)return ue.deserialize(I);for(var me=Object.create(ue.prototype),Ee=0,Ne=Object.keys(I);Ee=0?dt:it(dt)}}return me}throw new Error("can't deserialize object of type "+typeof I)}var Nt=function(){this.first=!0};Nt.prototype.update=function(_,j){var ue=Math.floor(_);return this.first?(this.first=!1,this.lastIntegerZoom=ue,this.lastIntegerZoomTime=0,this.lastZoom=_,this.lastFloorZoom=ue,!0):(this.lastFloorZoom>ue?(this.lastIntegerZoom=ue+1,this.lastIntegerZoomTime=j):this.lastFloorZoom=128&&I<=255},Arabic:function(I){return I>=1536&&I<=1791},"Arabic Supplement":function(I){return I>=1872&&I<=1919},"Arabic Extended-A":function(I){return I>=2208&&I<=2303},"Hangul Jamo":function(I){return I>=4352&&I<=4607},"Unified Canadian Aboriginal Syllabics":function(I){return I>=5120&&I<=5759},Khmer:function(I){return I>=6016&&I<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(I){return I>=6320&&I<=6399},"General Punctuation":function(I){return I>=8192&&I<=8303},"Letterlike Symbols":function(I){return I>=8448&&I<=8527},"Number Forms":function(I){return I>=8528&&I<=8591},"Miscellaneous Technical":function(I){return I>=8960&&I<=9215},"Control Pictures":function(I){return I>=9216&&I<=9279},"Optical Character Recognition":function(I){return I>=9280&&I<=9311},"Enclosed Alphanumerics":function(I){return I>=9312&&I<=9471},"Geometric Shapes":function(I){return I>=9632&&I<=9727},"Miscellaneous Symbols":function(I){return I>=9728&&I<=9983},"Miscellaneous Symbols and Arrows":function(I){return I>=11008&&I<=11263},"CJK Radicals Supplement":function(I){return I>=11904&&I<=12031},"Kangxi Radicals":function(I){return I>=12032&&I<=12255},"Ideographic Description Characters":function(I){return I>=12272&&I<=12287},"CJK Symbols and Punctuation":function(I){return I>=12288&&I<=12351},Hiragana:function(I){return I>=12352&&I<=12447},Katakana:function(I){return I>=12448&&I<=12543},Bopomofo:function(I){return I>=12544&&I<=12591},"Hangul Compatibility Jamo":function(I){return I>=12592&&I<=12687},Kanbun:function(I){return I>=12688&&I<=12703},"Bopomofo Extended":function(I){return I>=12704&&I<=12735},"CJK Strokes":function(I){return I>=12736&&I<=12783},"Katakana Phonetic Extensions":function(I){return I>=12784&&I<=12799},"Enclosed CJK Letters and Months":function(I){return I>=12800&&I<=13055},"CJK Compatibility":function(I){return I>=13056&&I<=13311},"CJK Unified Ideographs Extension A":function(I){return I>=13312&&I<=19903},"Yijing Hexagram Symbols":function(I){return I>=19904&&I<=19967},"CJK Unified Ideographs":function(I){return I>=19968&&I<=40959},"Yi Syllables":function(I){return I>=40960&&I<=42127},"Yi Radicals":function(I){return I>=42128&&I<=42191},"Hangul Jamo Extended-A":function(I){return I>=43360&&I<=43391},"Hangul Syllables":function(I){return I>=44032&&I<=55215},"Hangul Jamo Extended-B":function(I){return I>=55216&&I<=55295},"Private Use Area":function(I){return I>=57344&&I<=63743},"CJK Compatibility Ideographs":function(I){return I>=63744&&I<=64255},"Arabic Presentation Forms-A":function(I){return I>=64336&&I<=65023},"Vertical Forms":function(I){return I>=65040&&I<=65055},"CJK Compatibility Forms":function(I){return I>=65072&&I<=65103},"Small Form Variants":function(I){return I>=65104&&I<=65135},"Arabic Presentation Forms-B":function(I){return I>=65136&&I<=65279},"Halfwidth and Fullwidth Forms":function(I){return I>=65280&&I<=65519}};function Ht(I){for(var _=0,j=I;_=65097&&I<=65103)||pt["CJK Compatibility Ideographs"](I)||pt["CJK Compatibility"](I)||pt["CJK Radicals Supplement"](I)||pt["CJK Strokes"](I)||pt["CJK Symbols and Punctuation"](I)&&!(I>=12296&&I<=12305)&&!(I>=12308&&I<=12319)&&I!==12336||pt["CJK Unified Ideographs Extension A"](I)||pt["CJK Unified Ideographs"](I)||pt["Enclosed CJK Letters and Months"](I)||pt["Hangul Compatibility Jamo"](I)||pt["Hangul Jamo Extended-A"](I)||pt["Hangul Jamo Extended-B"](I)||pt["Hangul Jamo"](I)||pt["Hangul Syllables"](I)||pt.Hiragana(I)||pt["Ideographic Description Characters"](I)||pt.Kanbun(I)||pt["Kangxi Radicals"](I)||pt["Katakana Phonetic Extensions"](I)||pt.Katakana(I)&&I!==12540||pt["Halfwidth and Fullwidth Forms"](I)&&I!==65288&&I!==65289&&I!==65293&&!(I>=65306&&I<=65310)&&I!==65339&&I!==65341&&I!==65343&&!(I>=65371&&I<=65503)&&I!==65507&&!(I>=65512&&I<=65519)||pt["Small Form Variants"](I)&&!(I>=65112&&I<=65118)&&!(I>=65123&&I<=65126)||pt["Unified Canadian Aboriginal Syllabics"](I)||pt["Unified Canadian Aboriginal Syllabics Extended"](I)||pt["Vertical Forms"](I)||pt["Yijing Hexagram Symbols"](I)||pt["Yi Syllables"](I)||pt["Yi Radicals"](I))}function jr(I){return!!(pt["Latin-1 Supplement"](I)&&(I===167||I===169||I===174||I===177||I===188||I===189||I===190||I===215||I===247)||pt["General Punctuation"](I)&&(I===8214||I===8224||I===8225||I===8240||I===8241||I===8251||I===8252||I===8258||I===8263||I===8264||I===8265||I===8273)||pt["Letterlike Symbols"](I)||pt["Number Forms"](I)||pt["Miscellaneous Technical"](I)&&(I>=8960&&I<=8967||I>=8972&&I<=8991||I>=8996&&I<=9e3||I===9003||I>=9085&&I<=9114||I>=9150&&I<=9165||I===9167||I>=9169&&I<=9179||I>=9186&&I<=9215)||pt["Control Pictures"](I)&&I!==9251||pt["Optical Character Recognition"](I)||pt["Enclosed Alphanumerics"](I)||pt["Geometric Shapes"](I)||pt["Miscellaneous Symbols"](I)&&!(I>=9754&&I<=9759)||pt["Miscellaneous Symbols and Arrows"](I)&&(I>=11026&&I<=11055||I>=11088&&I<=11097||I>=11192&&I<=11243)||pt["CJK Symbols and Punctuation"](I)||pt.Katakana(I)||pt["Private Use Area"](I)||pt["CJK Compatibility Forms"](I)||pt["Small Form Variants"](I)||pt["Halfwidth and Fullwidth Forms"](I)||I===8734||I===8756||I===8757||I>=9984&&I<=10087||I>=10102&&I<=10131||I===65532||I===65533)}function tn(I){return!(Sr(I)||jr(I))}function Rr(I){return pt.Arabic(I)||pt["Arabic Supplement"](I)||pt["Arabic Extended-A"](I)||pt["Arabic Presentation Forms-A"](I)||pt["Arabic Presentation Forms-B"](I)}function Hr(I){return I>=1424&&I<=2303||pt["Arabic Presentation Forms-A"](I)||pt["Arabic Presentation Forms-B"](I)}function Zr(I,_){return!(!_&&Hr(I)||I>=2304&&I<=3583||I>=3840&&I<=4255||pt.Khmer(I))}function rn(I){for(var _=0,j=I;_-1&&(Wn=Xr.error),Bn&&Bn(I)};function Ma(){Ta.fire(new Zt("pluginStateChange",{pluginStatus:Wn,pluginURL:Kn}))}var Ta=new sr,Za=function(){return Wn},Pa=function(I){return I({pluginStatus:Wn,pluginURL:Kn}),Ta.on("pluginStateChange",I),I},Va=function(I,_,j){if(j===void 0&&(j=!1),Wn===Xr.deferred||Wn===Xr.loading||Wn===Xr.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Kn=fe.resolveURL(I),Wn=Xr.deferred,Bn=_,Ma(),j||fi()},fi=function(){if(Wn!==Xr.deferred||!Kn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Wn=Xr.loading,Ma(),Kn&&St({url:Kn},function(I){I?ia(I):(Wn=Xr.loaded,Ma())})},gi={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Wn===Xr.loaded||gi.applyArabicShaping!=null},isLoading:function(){return Wn===Xr.loading},setState:function(_){Wn=_.pluginStatus,Kn=_.pluginURL},isParsed:function(){return gi.applyArabicShaping!=null&&gi.processBidirectionalText!=null&&gi.processStyledBidirectionalText!=null},getPluginURL:function(){return Kn}},Di=function(){!gi.isLoading()&&!gi.isLoaded()&&Za()==="deferred"&&fi()},Un=function(_,j){this.zoom=_,j?(this.now=j.now,this.fadeDuration=j.fadeDuration,this.zoomHistory=j.zoomHistory,this.transition=j.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Nt,this.transition={})};Un.prototype.isSupportedScript=function(_){return fn(_,gi.isLoaded())},Un.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Un.prototype.getCrossfadeParameters=function(){var _=this.zoom,j=_-Math.floor(_),ue=this.crossFadingFactor();return _>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:j+(1-j)*ue}:{fromScale:.5,toScale:1,t:1-(1-ue)*j}};var Ga=function(_,j){this.property=_,this.value=j,this.expression=$h(j===void 0?_.specification.default:j,_.specification)};Ga.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Ga.prototype.possiblyEvaluate=function(_,j,ue){return this.property.possiblyEvaluate(this,_,j,ue)};var Ua=function(_){this.property=_,this.value=new Ga(_,void 0)};Ua.prototype.transitioned=function(_,j){return new ji(this.property,this.value,j,h({},_.transition,this.transition),_.now)},Ua.prototype.untransitioned=function(){return new ji(this.property,this.value,null,{},0)};var ri=function(_){this._properties=_,this._values=Object.create(_.defaultTransitionablePropertyValues)};ri.prototype.getValue=function(_){return E(this._values[_].value.value)},ri.prototype.setValue=function(_,j){this._values.hasOwnProperty(_)||(this._values[_]=new Ua(this._values[_].property)),this._values[_].value=new Ga(this._values[_].property,j===null?void 0:E(j))},ri.prototype.getTransition=function(_){return E(this._values[_].transition)},ri.prototype.setTransition=function(_,j){this._values.hasOwnProperty(_)||(this._values[_]=new Ua(this._values[_].property)),this._values[_].transition=E(j)||void 0},ri.prototype.serialize=function(){for(var _={},j=0,ue=Object.keys(this._values);jthis.end)return this.prior=null,Ee;if(this.value.isDataDriven())return this.prior=null,Ee;if(meNe.zoomHistory.lastIntegerZoom?{from:ue,to:me}:{from:Ee,to:me}},_.prototype.interpolate=function(ue){return ue},_}(Da),vo=function(_){this.specification=_};vo.prototype.possiblyEvaluate=function(_,j,ue,me){if(_.value!==void 0)if(_.expression.kind==="constant"){var Ee=_.expression.evaluate(j,null,{},ue,me);return this._calculate(Ee,Ee,Ee,j)}else return this._calculate(_.expression.evaluate(new Un(Math.floor(j.zoom-1),j)),_.expression.evaluate(new Un(Math.floor(j.zoom),j)),_.expression.evaluate(new Un(Math.floor(j.zoom+1),j)),j)},vo.prototype._calculate=function(_,j,ue,me){var Ee=me.zoom;return Ee>me.zoomHistory.lastIntegerZoom?{from:_,to:j}:{from:ue,to:j}},vo.prototype.interpolate=function(_){return _};var bs=function(_){this.specification=_};bs.prototype.possiblyEvaluate=function(_,j,ue,me){return!!_.expression.evaluate(j,null,{},ue,me)},bs.prototype.interpolate=function(){return!1};var Fo=function(_){this.properties=_,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var j in _){var ue=_[j];ue.specification.overridable&&this.overridableProperties.push(j);var me=this.defaultPropertyValues[j]=new Ga(ue,void 0),Ee=this.defaultTransitionablePropertyValues[j]=new Ua(ue);this.defaultTransitioningPropertyValues[j]=Ee.untransitioned(),this.defaultPossiblyEvaluatedValues[j]=me.possiblyEvaluate({})}};ve("DataDrivenProperty",Da),ve("DataConstantProperty",wa),ve("CrossFadedDataDrivenProperty",Wi),ve("CrossFadedProperty",vo),ve("ColorRampProperty",bs);var rs="-transition",Ji=function(I){function _(j,ue){if(I.call(this),this.id=j.id,this.type=j.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},j.type!=="custom"&&(j=j,this.metadata=j.metadata,this.minzoom=j.minzoom,this.maxzoom=j.maxzoom,j.type!=="background"&&(this.source=j.source,this.sourceLayer=j["source-layer"],this.filter=j.filter),ue.layout&&(this._unevaluatedLayout=new mo(ue.layout)),ue.paint)){this._transitionablePaint=new ri(ue.paint);for(var me in j.paint)this.setPaintProperty(me,j.paint[me],{validate:!1});for(var Ee in j.layout)this.setLayoutProperty(Ee,j.layout[Ee],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Pi(ue.paint)}}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},_.prototype.getLayoutProperty=function(ue){return ue==="visibility"?this.visibility:this._unevaluatedLayout.getValue(ue)},_.prototype.setLayoutProperty=function(ue,me,Ee){if(Ee===void 0&&(Ee={}),me!=null){var Ne="layers."+this.id+".layout."+ue;if(this._validate(pa,Ne,ue,me,Ee))return}if(ue==="visibility"){this.visibility=me;return}this._unevaluatedLayout.setValue(ue,me)},_.prototype.getPaintProperty=function(ue){return S(ue,rs)?this._transitionablePaint.getTransition(ue.slice(0,-rs.length)):this._transitionablePaint.getValue(ue)},_.prototype.setPaintProperty=function(ue,me,Ee){if(Ee===void 0&&(Ee={}),me!=null){var Ne="layers."+this.id+".paint."+ue;if(this._validate(Nn,Ne,ue,me,Ee))return!1}if(S(ue,rs))return this._transitionablePaint.setTransition(ue.slice(0,-rs.length),me||void 0),!1;var Qe=this._transitionablePaint._values[ue],dt=Qe.property.specification["property-type"]==="cross-faded-data-driven",Tt=Qe.value.isDataDriven(),Ct=Qe.value;this._transitionablePaint.setValue(ue,me),this._handleSpecialPaintPropertyUpdate(ue);var Wt=this._transitionablePaint._values[ue].value,or=Wt.isDataDriven();return or||Tt||dt||this._handleOverridablePaintPropertyUpdate(ue,Ct,Wt)},_.prototype._handleSpecialPaintPropertyUpdate=function(ue){},_.prototype._handleOverridablePaintPropertyUpdate=function(ue,me,Ee){return!1},_.prototype.isHidden=function(ue){return this.minzoom&&ue=this.maxzoom?!0:this.visibility==="none"},_.prototype.updateTransitions=function(ue){this._transitioningPaint=this._transitionablePaint.transitioned(ue,this._transitioningPaint)},_.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},_.prototype.recalculate=function(ue,me){ue.getCrossfadeParameters&&(this._crossfadeParameters=ue.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(ue,void 0,me)),this.paint=this._transitioningPaint.possiblyEvaluate(ue,void 0,me)},_.prototype.serialize=function(){var ue={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(ue.layout=ue.layout||{},ue.layout.visibility=this.visibility),P(ue,function(me,Ee){return me!==void 0&&!(Ee==="layout"&&!Object.keys(me).length)&&!(Ee==="paint"&&!Object.keys(me).length)})},_.prototype._validate=function(ue,me,Ee,Ne,Qe){return Qe===void 0&&(Qe={}),Qe&&Qe.validate===!1?!1:Na(this,ue.call(mn,{key:me,layerType:this.type,objectKey:Ee,value:Ne,styleSpec:Xt,style:{glyphs:!0,sprite:!0}}))},_.prototype.is3D=function(){return!1},_.prototype.isTileClipped=function(){return!1},_.prototype.hasOffscreenPass=function(){return!1},_.prototype.resize=function(){},_.prototype.isStateDependent=function(){for(var ue in this.paint._values){var me=this.paint.get(ue);if(!(!(me instanceof Gi)||!Pl(me.property.specification))&&(me.value.kind==="source"||me.value.kind==="composite")&&me.value.isStateDependent)return!0}return!1},_}(sr),Ds={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},zi=function(_,j){this._structArray=_,this._pos1=j*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},sl=128,Ls=5,si=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};si.serialize=function(_,j){return _._trim(),j&&(_.isTransferred=!0,j.push(_.arrayBuffer)),{length:_.length,arrayBuffer:_.arrayBuffer}},si.deserialize=function(_){var j=Object.create(this.prototype);return j.arrayBuffer=_.arrayBuffer,j.length=_.length,j.capacity=_.arrayBuffer.byteLength/j.bytesPerElement,j._refreshViews(),j},si.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},si.prototype.clear=function(){this.length=0},si.prototype.resize=function(_){this.reserve(_),this.length=_},si.prototype.reserve=function(_){if(_>this.capacity){this.capacity=Math.max(_,Math.floor(this.capacity*Ls),sl),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var j=this.uint8;this._refreshViews(),j&&this.uint8.set(j)}},si.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function Yi(I,_){_===void 0&&(_=1);var j=0,ue=0,me=I.map(function(Ne){var Qe=tv(Ne.type),dt=j=uh(j,Math.max(_,Qe)),Tt=Ne.components||1;return ue=Math.max(ue,Qe),j+=Qe*Tt,{name:Ne.name,type:Ne.type,components:Tt,offset:dt}}),Ee=uh(j,Math.max(ue,_));return{members:me,size:Ee,alignment:_}}function tv(I){return Ds[I].BYTES_PER_ELEMENT}function uh(I,_){return Math.ceil(I/_)*_}var vd=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me){var Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,ue,me)},_.prototype.emplace=function(ue,me,Ee){var Ne=ue*2;return this.int16[Ne+0]=me,this.int16[Ne+1]=Ee,ue},_}(si);vd.prototype.bytesPerElement=4,ve("StructArrayLayout2i4",vd);var mc=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me,Ee,Ne){var Qe=this.length;return this.resize(Qe+1),this.emplace(Qe,ue,me,Ee,Ne)},_.prototype.emplace=function(ue,me,Ee,Ne,Qe){var dt=ue*4;return this.int16[dt+0]=me,this.int16[dt+1]=Ee,this.int16[dt+2]=Ne,this.int16[dt+3]=Qe,ue},_}(si);mc.prototype.bytesPerElement=8,ve("StructArrayLayout4i8",mc);var rv=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me,Ee,Ne,Qe,dt){var Tt=this.length;return this.resize(Tt+1),this.emplace(Tt,ue,me,Ee,Ne,Qe,dt)},_.prototype.emplace=function(ue,me,Ee,Ne,Qe,dt,Tt){var Ct=ue*6;return this.int16[Ct+0]=me,this.int16[Ct+1]=Ee,this.int16[Ct+2]=Ne,this.int16[Ct+3]=Qe,this.int16[Ct+4]=dt,this.int16[Ct+5]=Tt,ue},_}(si);rv.prototype.bytesPerElement=12,ve("StructArrayLayout2i4i12",rv);var Qd=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me,Ee,Ne,Qe,dt){var Tt=this.length;return this.resize(Tt+1),this.emplace(Tt,ue,me,Ee,Ne,Qe,dt)},_.prototype.emplace=function(ue,me,Ee,Ne,Qe,dt,Tt){var Ct=ue*4,Wt=ue*8;return this.int16[Ct+0]=me,this.int16[Ct+1]=Ee,this.uint8[Wt+4]=Ne,this.uint8[Wt+5]=Qe,this.uint8[Wt+6]=dt,this.uint8[Wt+7]=Tt,ue},_}(si);Qd.prototype.bytesPerElement=8,ve("StructArrayLayout2i4ub8",Qd);var Vs=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me,Ee,Ne,Qe,dt,Tt,Ct,Wt,or){var Qt=this.length;return this.resize(Qt+1),this.emplace(Qt,ue,me,Ee,Ne,Qe,dt,Tt,Ct,Wt,or)},_.prototype.emplace=function(ue,me,Ee,Ne,Qe,dt,Tt,Ct,Wt,or,Qt){var xr=ue*9,Ur=ue*18;return this.uint16[xr+0]=me,this.uint16[xr+1]=Ee,this.uint16[xr+2]=Ne,this.uint16[xr+3]=Qe,this.uint16[xr+4]=dt,this.uint16[xr+5]=Tt,this.uint16[xr+6]=Ct,this.uint16[xr+7]=Wt,this.uint8[Ur+16]=or,this.uint8[Ur+17]=Qt,ue},_}(si);Vs.prototype.bytesPerElement=18,ve("StructArrayLayout8ui2ub18",Vs);var yc=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me,Ee,Ne,Qe,dt,Tt,Ct,Wt,or,Qt,xr){var Ur=this.length;return this.resize(Ur+1),this.emplace(Ur,ue,me,Ee,Ne,Qe,dt,Tt,Ct,Wt,or,Qt,xr)},_.prototype.emplace=function(ue,me,Ee,Ne,Qe,dt,Tt,Ct,Wt,or,Qt,xr,Ur){var nn=ue*12;return this.int16[nn+0]=me,this.int16[nn+1]=Ee,this.int16[nn+2]=Ne,this.int16[nn+3]=Qe,this.uint16[nn+4]=dt,this.uint16[nn+5]=Tt,this.uint16[nn+6]=Ct,this.uint16[nn+7]=Wt,this.int16[nn+8]=or,this.int16[nn+9]=Qt,this.int16[nn+10]=xr,this.int16[nn+11]=Ur,ue},_}(si);yc.prototype.bytesPerElement=24,ve("StructArrayLayout4i4ui4i24",yc);var P0=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me,Ee){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,ue,me,Ee)},_.prototype.emplace=function(ue,me,Ee,Ne){var Qe=ue*3;return this.float32[Qe+0]=me,this.float32[Qe+1]=Ee,this.float32[Qe+2]=Ne,ue},_}(si);P0.prototype.bytesPerElement=12,ve("StructArrayLayout3f12",P0);var N0=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue){var me=this.length;return this.resize(me+1),this.emplace(me,ue)},_.prototype.emplace=function(ue,me){var Ee=ue*1;return this.uint32[Ee+0]=me,ue},_}(si);N0.prototype.bytesPerElement=4,ve("StructArrayLayout1ul4",N0);var dd=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me,Ee,Ne,Qe,dt,Tt,Ct,Wt){var or=this.length;return this.resize(or+1),this.emplace(or,ue,me,Ee,Ne,Qe,dt,Tt,Ct,Wt)},_.prototype.emplace=function(ue,me,Ee,Ne,Qe,dt,Tt,Ct,Wt,or){var Qt=ue*10,xr=ue*5;return this.int16[Qt+0]=me,this.int16[Qt+1]=Ee,this.int16[Qt+2]=Ne,this.int16[Qt+3]=Qe,this.int16[Qt+4]=dt,this.int16[Qt+5]=Tt,this.uint32[xr+3]=Ct,this.uint16[Qt+8]=Wt,this.uint16[Qt+9]=or,ue},_}(si);dd.prototype.bytesPerElement=20,ve("StructArrayLayout6i1ul2ui20",dd);var qd=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me,Ee,Ne,Qe,dt){var Tt=this.length;return this.resize(Tt+1),this.emplace(Tt,ue,me,Ee,Ne,Qe,dt)},_.prototype.emplace=function(ue,me,Ee,Ne,Qe,dt,Tt){var Ct=ue*6;return this.int16[Ct+0]=me,this.int16[Ct+1]=Ee,this.int16[Ct+2]=Ne,this.int16[Ct+3]=Qe,this.int16[Ct+4]=dt,this.int16[Ct+5]=Tt,ue},_}(si);qd.prototype.bytesPerElement=12,ve("StructArrayLayout2i2i2i12",qd);var Nf=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me,Ee,Ne,Qe){var dt=this.length;return this.resize(dt+1),this.emplace(dt,ue,me,Ee,Ne,Qe)},_.prototype.emplace=function(ue,me,Ee,Ne,Qe,dt){var Tt=ue*4,Ct=ue*8;return this.float32[Tt+0]=me,this.float32[Tt+1]=Ee,this.float32[Tt+2]=Ne,this.int16[Ct+6]=Qe,this.int16[Ct+7]=dt,ue},_}(si);Nf.prototype.bytesPerElement=16,ve("StructArrayLayout2f1f2i16",Nf);var ll=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me,Ee,Ne){var Qe=this.length;return this.resize(Qe+1),this.emplace(Qe,ue,me,Ee,Ne)},_.prototype.emplace=function(ue,me,Ee,Ne,Qe){var dt=ue*12,Tt=ue*3;return this.uint8[dt+0]=me,this.uint8[dt+1]=Ee,this.float32[Tt+1]=Ne,this.float32[Tt+2]=Qe,ue},_}(si);ll.prototype.bytesPerElement=12,ve("StructArrayLayout2ub2f12",ll);var Rf=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me,Ee){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,ue,me,Ee)},_.prototype.emplace=function(ue,me,Ee,Ne){var Qe=ue*3;return this.uint16[Qe+0]=me,this.uint16[Qe+1]=Ee,this.uint16[Qe+2]=Ne,ue},_}(si);Rf.prototype.bytesPerElement=6,ve("StructArrayLayout3ui6",Rf);var pd=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me,Ee,Ne,Qe,dt,Tt,Ct,Wt,or,Qt,xr,Ur,nn,en,En,yn){var Sn=this.length;return this.resize(Sn+1),this.emplace(Sn,ue,me,Ee,Ne,Qe,dt,Tt,Ct,Wt,or,Qt,xr,Ur,nn,en,En,yn)},_.prototype.emplace=function(ue,me,Ee,Ne,Qe,dt,Tt,Ct,Wt,or,Qt,xr,Ur,nn,en,En,yn,Sn){var Rn=ue*24,Vn=ue*12,qn=ue*48;return this.int16[Rn+0]=me,this.int16[Rn+1]=Ee,this.uint16[Rn+2]=Ne,this.uint16[Rn+3]=Qe,this.uint32[Vn+2]=dt,this.uint32[Vn+3]=Tt,this.uint32[Vn+4]=Ct,this.uint16[Rn+10]=Wt,this.uint16[Rn+11]=or,this.uint16[Rn+12]=Qt,this.float32[Vn+7]=xr,this.float32[Vn+8]=Ur,this.uint8[qn+36]=nn,this.uint8[qn+37]=en,this.uint8[qn+38]=En,this.uint32[Vn+10]=yn,this.int16[Rn+22]=Sn,ue},_}(si);pd.prototype.bytesPerElement=48,ve("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",pd);var ep=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me,Ee,Ne,Qe,dt,Tt,Ct,Wt,or,Qt,xr,Ur,nn,en,En,yn,Sn,Rn,Vn,qn,Jn,La,da,Aa,Wa,Ea,Ca){var Ja=this.length;return this.resize(Ja+1),this.emplace(Ja,ue,me,Ee,Ne,Qe,dt,Tt,Ct,Wt,or,Qt,xr,Ur,nn,en,En,yn,Sn,Rn,Vn,qn,Jn,La,da,Aa,Wa,Ea,Ca)},_.prototype.emplace=function(ue,me,Ee,Ne,Qe,dt,Tt,Ct,Wt,or,Qt,xr,Ur,nn,en,En,yn,Sn,Rn,Vn,qn,Jn,La,da,Aa,Wa,Ea,Ca,Ja){var Ha=ue*34,mi=ue*17;return this.int16[Ha+0]=me,this.int16[Ha+1]=Ee,this.int16[Ha+2]=Ne,this.int16[Ha+3]=Qe,this.int16[Ha+4]=dt,this.int16[Ha+5]=Tt,this.int16[Ha+6]=Ct,this.int16[Ha+7]=Wt,this.uint16[Ha+8]=or,this.uint16[Ha+9]=Qt,this.uint16[Ha+10]=xr,this.uint16[Ha+11]=Ur,this.uint16[Ha+12]=nn,this.uint16[Ha+13]=en,this.uint16[Ha+14]=En,this.uint16[Ha+15]=yn,this.uint16[Ha+16]=Sn,this.uint16[Ha+17]=Rn,this.uint16[Ha+18]=Vn,this.uint16[Ha+19]=qn,this.uint16[Ha+20]=Jn,this.uint16[Ha+21]=La,this.uint16[Ha+22]=da,this.uint32[mi+12]=Aa,this.float32[mi+13]=Wa,this.float32[mi+14]=Ea,this.float32[mi+15]=Ca,this.float32[mi+16]=Ja,ue},_}(si);ep.prototype.bytesPerElement=68,ve("StructArrayLayout8i15ui1ul4f68",ep);var nv=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue){var me=this.length;return this.resize(me+1),this.emplace(me,ue)},_.prototype.emplace=function(ue,me){var Ee=ue*1;return this.float32[Ee+0]=me,ue},_}(si);nv.prototype.bytesPerElement=4,ve("StructArrayLayout1f4",nv);var R0=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me,Ee){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,ue,me,Ee)},_.prototype.emplace=function(ue,me,Ee,Ne){var Qe=ue*3;return this.int16[Qe+0]=me,this.int16[Qe+1]=Ee,this.int16[Qe+2]=Ne,ue},_}(si);R0.prototype.bytesPerElement=6,ve("StructArrayLayout3i6",R0);var xc=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me,Ee){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,ue,me,Ee)},_.prototype.emplace=function(ue,me,Ee,Ne){var Qe=ue*2,dt=ue*4;return this.uint32[Qe+0]=me,this.uint16[dt+2]=Ee,this.uint16[dt+3]=Ne,ue},_}(si);xc.prototype.bytesPerElement=8,ve("StructArrayLayout1ul2ui8",xc);var gd=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me){var Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,ue,me)},_.prototype.emplace=function(ue,me,Ee){var Ne=ue*2;return this.uint16[Ne+0]=me,this.uint16[Ne+1]=Ee,ue},_}(si);gd.prototype.bytesPerElement=4,ve("StructArrayLayout2ui4",gd);var av=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue){var me=this.length;return this.resize(me+1),this.emplace(me,ue)},_.prototype.emplace=function(ue,me){var Ee=ue*1;return this.uint16[Ee+0]=me,ue},_}(si);av.prototype.bytesPerElement=2,ve("StructArrayLayout1ui2",av);var bc=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me){var Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,ue,me)},_.prototype.emplace=function(ue,me,Ee){var Ne=ue*2;return this.float32[Ne+0]=me,this.float32[Ne+1]=Ee,ue},_}(si);bc.prototype.bytesPerElement=8,ve("StructArrayLayout2f8",bc);var F0=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(ue,me,Ee,Ne){var Qe=this.length;return this.resize(Qe+1),this.emplace(Qe,ue,me,Ee,Ne)},_.prototype.emplace=function(ue,me,Ee,Ne,Qe){var dt=ue*4;return this.float32[dt+0]=me,this.float32[dt+1]=Ee,this.float32[dt+2]=Ne,this.float32[dt+3]=Qe,ue},_}(si);F0.prototype.bytesPerElement=16,ve("StructArrayLayout4f16",F0);var am=function(I){function _(){I.apply(this,arguments)}I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_;var j={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return j.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},j.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},j.x1.get=function(){return this._structArray.int16[this._pos2+2]},j.y1.get=function(){return this._structArray.int16[this._pos2+3]},j.x2.get=function(){return this._structArray.int16[this._pos2+4]},j.y2.get=function(){return this._structArray.int16[this._pos2+5]},j.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},j.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},j.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},j.anchorPoint.get=function(){return new r(this.anchorPointX,this.anchorPointY)},Object.defineProperties(_.prototype,j),_}(zi);am.prototype.size=20;var wc=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype.get=function(ue){return new am(this,ue)},_}(dd);ve("CollisionBoxArray",wc);var I0=function(I){function _(){I.apply(this,arguments)}I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_;var j={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return j.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},j.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},j.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},j.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},j.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},j.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},j.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},j.segment.get=function(){return this._structArray.uint16[this._pos2+10]},j.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},j.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},j.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},j.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},j.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},j.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},j.placedOrientation.set=function(ue){this._structArray.uint8[this._pos1+37]=ue},j.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},j.hidden.set=function(ue){this._structArray.uint8[this._pos1+38]=ue},j.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},j.crossTileID.set=function(ue){this._structArray.uint32[this._pos4+10]=ue},j.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(_.prototype,j),_}(zi);I0.prototype.size=48;var iv=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype.get=function(ue){return new I0(this,ue)},_}(pd);ve("PlacedSymbolArray",iv);var im=function(I){function _(){I.apply(this,arguments)}I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_;var j={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return j.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},j.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},j.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},j.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},j.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},j.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},j.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},j.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},j.key.get=function(){return this._structArray.uint16[this._pos2+8]},j.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},j.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},j.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},j.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},j.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},j.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},j.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},j.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},j.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},j.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},j.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},j.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},j.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},j.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},j.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},j.crossTileID.set=function(ue){this._structArray.uint32[this._pos4+12]=ue},j.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},j.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},j.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},j.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(_.prototype,j),_}(zi);im.prototype.size=68;var om=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype.get=function(ue){return new im(this,ue)},_}(ep);ve("SymbolInstanceArray",om);var wu=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype.getoffsetX=function(ue){return this.float32[ue*1+0]},_}(nv);ve("GlyphOffsetArray",wu);var sm=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype.getx=function(ue){return this.int16[ue*3+0]},_.prototype.gety=function(ue){return this.int16[ue*3+1]},_.prototype.gettileUnitDistanceFromAnchor=function(ue){return this.int16[ue*3+2]},_}(R0);ve("SymbolLineVertexArray",sm);var lm=function(I){function _(){I.apply(this,arguments)}I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_;var j={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return j.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},j.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},j.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(_.prototype,j),_}(zi);lm.prototype.size=8;var _0=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype.get=function(ue){return new lm(this,ue)},_}(xc);ve("FeatureIndexArray",_0);var um=Yi([{name:"a_pos",components:2,type:"Int16"}],4),ge=um.members,ee=function(_){_===void 0&&(_=[]),this.segments=_};ee.prototype.prepareSegment=function(_,j,ue,me){var Ee=this.segments[this.segments.length-1];return _>ee.MAX_VERTEX_ARRAY_LENGTH&&G("Max vertices per segment is "+ee.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+_),(!Ee||Ee.vertexLength+_>ee.MAX_VERTEX_ARRAY_LENGTH||Ee.sortKey!==me)&&(Ee={vertexOffset:j.length,primitiveOffset:ue.length,vertexLength:0,primitiveLength:0},me!==void 0&&(Ee.sortKey=me),this.segments.push(Ee)),Ee},ee.prototype.get=function(){return this.segments},ee.prototype.destroy=function(){for(var _=0,j=this.segments;_>>16)*dt&65535)<<16)&4294967295,Ct=Ct<<15|Ct>>>17,Ct=(Ct&65535)*Tt+(((Ct>>>16)*Tt&65535)<<16)&4294967295,Ne^=Ct,Ne=Ne<<13|Ne>>>19,Qe=(Ne&65535)*5+(((Ne>>>16)*5&65535)<<16)&4294967295,Ne=(Qe&65535)+27492+(((Qe>>>16)+58964&65535)<<16);switch(Ct=0,me){case 3:Ct^=(j.charCodeAt(Wt+2)&255)<<16;case 2:Ct^=(j.charCodeAt(Wt+1)&255)<<8;case 1:Ct^=j.charCodeAt(Wt)&255,Ct=(Ct&65535)*dt+(((Ct>>>16)*dt&65535)<<16)&4294967295,Ct=Ct<<15|Ct>>>17,Ct=(Ct&65535)*Tt+(((Ct>>>16)*Tt&65535)<<16)&4294967295,Ne^=Ct}return Ne^=j.length,Ne^=Ne>>>16,Ne=(Ne&65535)*2246822507+(((Ne>>>16)*2246822507&65535)<<16)&4294967295,Ne^=Ne>>>13,Ne=(Ne&65535)*3266489909+(((Ne>>>16)*3266489909&65535)<<16)&4294967295,Ne^=Ne>>>16,Ne>>>0}I.exports=_}),ze=y(function(I){function _(j,ue){for(var me=j.length,Ee=ue^me,Ne=0,Qe;me>=4;)Qe=j.charCodeAt(Ne)&255|(j.charCodeAt(++Ne)&255)<<8|(j.charCodeAt(++Ne)&255)<<16|(j.charCodeAt(++Ne)&255)<<24,Qe=(Qe&65535)*1540483477+(((Qe>>>16)*1540483477&65535)<<16),Qe^=Qe>>>24,Qe=(Qe&65535)*1540483477+(((Qe>>>16)*1540483477&65535)<<16),Ee=(Ee&65535)*1540483477+(((Ee>>>16)*1540483477&65535)<<16)^Qe,me-=4,++Ne;switch(me){case 3:Ee^=(j.charCodeAt(Ne+2)&255)<<16;case 2:Ee^=(j.charCodeAt(Ne+1)&255)<<8;case 1:Ee^=j.charCodeAt(Ne)&255,Ee=(Ee&65535)*1540483477+(((Ee>>>16)*1540483477&65535)<<16)}return Ee^=Ee>>>13,Ee=(Ee&65535)*1540483477+(((Ee>>>16)*1540483477&65535)<<16),Ee^=Ee>>>15,Ee>>>0}I.exports=_}),$e=xe,ft=xe,At=ze;$e.murmur3=ft,$e.murmur2=At;var kt=function(){this.ids=[],this.positions=[],this.indexed=!1};kt.prototype.add=function(_,j,ue,me){this.ids.push(ur(_)),this.positions.push(j,ue,me)},kt.prototype.getPositions=function(_){for(var j=ur(_),ue=0,me=this.ids.length-1;ue>1;this.ids[Ee]>=j?me=Ee:ue=Ee+1}for(var Ne=[];this.ids[ue]===j;){var Qe=this.positions[3*ue],dt=this.positions[3*ue+1],Tt=this.positions[3*ue+2];Ne.push({index:Qe,start:dt,end:Tt}),ue++}return Ne},kt.serialize=function(_,j){var ue=new Float64Array(_.ids),me=new Uint32Array(_.positions);return yr(ue,me,0,ue.length-1),j&&j.push(ue.buffer,me.buffer),{ids:ue,positions:me}},kt.deserialize=function(_){var j=new kt;return j.ids=_.ids,j.positions=_.positions,j.indexed=!0,j};var Jt=Math.pow(2,53)-1;function ur(I){var _=+I;return!isNaN(_)&&_<=Jt?_:$e(String(I))}function yr(I,_,j,ue){for(;j>1],Ee=j-1,Ne=ue+1;;){do Ee++;while(I[Ee]me);if(Ee>=Ne)break;Fr(I,Ee,Ne),Fr(_,3*Ee,3*Ne),Fr(_,3*Ee+1,3*Ne+1),Fr(_,3*Ee+2,3*Ne+2)}Ne-jLi.max||Ne.yLi.max)&&(G("Geometry exceeds allowed extent, reduce your vector tile buffer size"),Ne.x=s(Ne.x,Li.min,Li.max),Ne.y=s(Ne.y,Li.min,Li.max))}return j}function ui(I,_,j,ue,me){I.emplaceBack(_*2+(ue+1)/2,j*2+(me+1)/2)}var Zi=function(_){this.zoom=_.zoom,this.overscaling=_.overscaling,this.layers=_.layers,this.layerIds=this.layers.map(function(j){return j.id}),this.index=_.index,this.hasPattern=!1,this.layoutVertexArray=new vd,this.indexArray=new Rf,this.segments=new ee,this.programConfigurations=new Xa(ge,_.layers,_.zoom),this.stateDependentLayerIds=this.layers.filter(function(j){return j.isStateDependent()}).map(function(j){return j.id})};Zi.prototype.populate=function(_,j,ue){var me=this.layers[0],Ee=[],Ne=null;me.type==="circle"&&(Ne=me.layout.get("circle-sort-key"));for(var Qe=0,dt=_;Qe=Ra||or<0||or>=Ra)){var Qt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,_.sortKey),xr=Qt.vertexLength;ui(this.layoutVertexArray,Wt,or,-1,-1),ui(this.layoutVertexArray,Wt,or,1,-1),ui(this.layoutVertexArray,Wt,or,1,1),ui(this.layoutVertexArray,Wt,or,-1,1),this.indexArray.emplaceBack(xr,xr+1,xr+2),this.indexArray.emplaceBack(xr,xr+3,xr+2),Qt.vertexLength+=4,Qt.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,_,ue,{},me)},ve("CircleBucket",Zi,{omit:["layers"]});function ja(I,_){for(var j=0;j=3){for(var Ee=0;Ee1){if(eu(I,_))return!0;for(var ue=0;ue<_.length;ue++)if(Zu(_[ue],I,j))return!0}for(var me=0;me1?I.distSqr(j):I.distSqr(j.sub(_)._mult(me)._add(_))}function Xu(I,_){for(var j=!1,ue,me,Ee,Ne=0;Ne_.y!=Ee.y>_.y&&_.x<(Ee.x-me.x)*(_.y-me.y)/(Ee.y-me.y)+me.x&&(j=!j)}return j}function Gs(I,_){for(var j=!1,ue=0,me=I.length-1;ue_.y!=Ne.y>_.y&&_.x<(Ne.x-Ee.x)*(_.y-Ee.y)/(Ne.y-Ee.y)+Ee.x&&(j=!j)}return j}function Ac(I,_,j,ue,me){for(var Ee=0,Ne=I;Ee=Qe.x&&me>=Qe.y)return!0}var dt=[new r(_,j),new r(_,me),new r(ue,me),new r(ue,j)];if(I.length>2)for(var Tt=0,Ct=dt;Ttme.x&&_.x>me.x||I.yme.y&&_.y>me.y)return!1;var Ee=z(I,_,j[0]);return Ee!==z(I,_,j[1])||Ee!==z(I,_,j[2])||Ee!==z(I,_,j[3])}function Fl(I,_,j){var ue=_.paint.get(I).value;return ue.kind==="constant"?ue.value:j.programConfigurations.get(_.id).getMaxValue(I)}function ju(I){return Math.sqrt(I[0]*I[0]+I[1]*I[1])}function Au(I,_,j,ue,me){if(!_[0]&&!_[1])return I;var Ee=r.convert(_)._mult(me);j==="viewport"&&Ee._rotate(-ue);for(var Ne=[],Qe=0;Qe0&&(Ee=1/Math.sqrt(Ee)),I[0]=_[0]*Ee,I[1]=_[1]*Ee,I[2]=_[2]*Ee,I}function n7(I,_){return I[0]*_[0]+I[1]*_[1]+I[2]*_[2]}function a7(I,_,j){var ue=_[0],me=_[1],Ee=_[2],Ne=j[0],Qe=j[1],dt=j[2];return I[0]=me*dt-Ee*Qe,I[1]=Ee*Ne-ue*dt,I[2]=ue*Qe-me*Ne,I}function i7(I,_,j){var ue=_[0],me=_[1],Ee=_[2];return I[0]=ue*j[0]+me*j[3]+Ee*j[6],I[1]=ue*j[1]+me*j[4]+Ee*j[7],I[2]=ue*j[2]+me*j[5]+Ee*j[8],I}var o7=ox;(function(){var I=xd();return function(_,j,ue,me,Ee,Ne){var Qe,dt;for(j||(j=3),ue||(ue=0),me?dt=Math.min(me*j+ue,_.length):dt=_.length,Qe=ue;QeI.width||me.height>I.height||j.x>I.width-me.width||j.y>I.height-me.height)throw new RangeError("out of range source coordinates for image copy");if(me.width>_.width||me.height>_.height||ue.x>_.width-me.width||ue.y>_.height-me.height)throw new RangeError("out of range destination coordinates for image copy");for(var Ne=I.data,Qe=_.data,dt=0;dt80*j){Qe=Tt=I[0],dt=Ct=I[1];for(var xr=j;xrTt&&(Tt=Wt),or>Ct&&(Ct=or);Qt=Math.max(Tt-Qe,Ct-dt),Qt=Qt!==0?1/Qt:0}return k0(Ee,Ne,j,Qe,dt,Qt),Ne}function sw(I,_,j,ue,me){var Ee,Ne;if(me===vx(I,_,j,ue)>0)for(Ee=_;Ee=_;Ee-=ue)Ne=fw(Ee,I[Ee],I[Ee+1],Ne);return Ne&&vm(Ne,Ne.next)&&(U0(Ne),Ne=Ne.next),Ne}function lv(I,_){if(!I)return I;_||(_=I);var j=I,ue;do if(ue=!1,!j.steiner&&(vm(j,j.next)||Uo(j.prev,j,j.next)===0)){if(U0(j),j=_=j.prev,j===j.next)break;ue=!0}else j=j.next;while(ue||j!==_);return _}function k0(I,_,j,ue,me,Ee,Ne){if(!!I){!Ne&&Ee&&R7(I,ue,me,Ee);for(var Qe=I,dt,Tt;I.prev!==I.next;){if(dt=I.prev,Tt=I.next,Ee?M7(I,ue,me,Ee):T7(I)){_.push(dt.i/j),_.push(I.i/j),_.push(Tt.i/j),U0(I),I=Tt.next,Qe=Tt.next;continue}if(I=Tt,I===Qe){Ne?Ne===1?(I=S7(lv(I),_,j),k0(I,_,j,ue,me,Ee,2)):Ne===2&&E7(I,_,j,ue,me,Ee):k0(lv(I),_,j,ue,me,Ee,1);break}}}}function T7(I){var _=I.prev,j=I,ue=I.next;if(Uo(_,j,ue)>=0)return!1;for(var me=I.next.next;me!==I.prev;){if(sp(_.x,_.y,j.x,j.y,ue.x,ue.y,me.x,me.y)&&Uo(me.prev,me,me.next)>=0)return!1;me=me.next}return!0}function M7(I,_,j,ue){var me=I.prev,Ee=I,Ne=I.next;if(Uo(me,Ee,Ne)>=0)return!1;for(var Qe=me.xEe.x?me.x>Ne.x?me.x:Ne.x:Ee.x>Ne.x?Ee.x:Ne.x,Ct=me.y>Ee.y?me.y>Ne.y?me.y:Ne.y:Ee.y>Ne.y?Ee.y:Ne.y,Wt=cx(Qe,dt,_,j,ue),or=cx(Tt,Ct,_,j,ue),Qt=I.prevZ,xr=I.nextZ;Qt&&Qt.z>=Wt&&xr&&xr.z<=or;){if(Qt!==I.prev&&Qt!==I.next&&sp(me.x,me.y,Ee.x,Ee.y,Ne.x,Ne.y,Qt.x,Qt.y)&&Uo(Qt.prev,Qt,Qt.next)>=0||(Qt=Qt.prevZ,xr!==I.prev&&xr!==I.next&&sp(me.x,me.y,Ee.x,Ee.y,Ne.x,Ne.y,xr.x,xr.y)&&Uo(xr.prev,xr,xr.next)>=0))return!1;xr=xr.nextZ}for(;Qt&&Qt.z>=Wt;){if(Qt!==I.prev&&Qt!==I.next&&sp(me.x,me.y,Ee.x,Ee.y,Ne.x,Ne.y,Qt.x,Qt.y)&&Uo(Qt.prev,Qt,Qt.next)>=0)return!1;Qt=Qt.prevZ}for(;xr&&xr.z<=or;){if(xr!==I.prev&&xr!==I.next&&sp(me.x,me.y,Ee.x,Ee.y,Ne.x,Ne.y,xr.x,xr.y)&&Uo(xr.prev,xr,xr.next)>=0)return!1;xr=xr.nextZ}return!0}function S7(I,_,j){var ue=I;do{var me=ue.prev,Ee=ue.next.next;!vm(me,Ee)&&lw(me,ue,ue.next,Ee)&&B0(me,Ee)&&B0(Ee,me)&&(_.push(me.i/j),_.push(ue.i/j),_.push(Ee.i/j),U0(ue),U0(ue.next),ue=I=Ee),ue=ue.next}while(ue!==I);return lv(ue)}function E7(I,_,j,ue,me,Ee){var Ne=I;do{for(var Qe=Ne.next.next;Qe!==Ne.prev;){if(Ne.i!==Qe.i&&_7(Ne,Qe)){var dt=uw(Ne,Qe);Ne=lv(Ne,Ne.next),dt=lv(dt,dt.next),k0(Ne,_,j,ue,me,Ee),k0(dt,_,j,ue,me,Ee);return}Qe=Qe.next}Ne=Ne.next}while(Ne!==I)}function C7(I,_,j,ue){var me=[],Ee,Ne,Qe,dt,Tt;for(Ee=0,Ne=_.length;Ee=j.next.y&&j.next.y!==j.y){var Qe=j.x+(me-j.y)*(j.next.x-j.x)/(j.next.y-j.y);if(Qe<=ue&&Qe>Ee){if(Ee=Qe,Qe===ue){if(me===j.y)return j;if(me===j.next.y)return j.next}Ne=j.x=j.x&&j.x>=Tt&&ue!==j.x&&sp(meNe.x||j.x===Ne.x&&N7(Ne,j)))&&(Ne=j,Wt=or)),j=j.next;while(j!==dt);return Ne}function N7(I,_){return Uo(I.prev,I,_.prev)<0&&Uo(_.next,I,I.next)<0}function R7(I,_,j,ue){var me=I;do me.z===null&&(me.z=cx(me.x,me.y,_,j,ue)),me.prevZ=me.prev,me.nextZ=me.next,me=me.next;while(me!==I);me.prevZ.nextZ=null,me.prevZ=null,F7(me)}function F7(I){var _,j,ue,me,Ee,Ne,Qe,dt,Tt=1;do{for(j=I,I=null,Ee=null,Ne=0;j;){for(Ne++,ue=j,Qe=0,_=0;_0||dt>0&&ue;)Qe!==0&&(dt===0||!ue||j.z<=ue.z)?(me=j,j=j.nextZ,Qe--):(me=ue,ue=ue.nextZ,dt--),Ee?Ee.nextZ=me:I=me,me.prevZ=Ee,Ee=me;j=ue}Ee.nextZ=null,Tt*=2}while(Ne>1);return I}function cx(I,_,j,ue,me){return I=32767*(I-j)*me,_=32767*(_-ue)*me,I=(I|I<<8)&16711935,I=(I|I<<4)&252645135,I=(I|I<<2)&858993459,I=(I|I<<1)&1431655765,_=(_|_<<8)&16711935,_=(_|_<<4)&252645135,_=(_|_<<2)&858993459,_=(_|_<<1)&1431655765,I|_<<1}function I7(I){var _=I,j=I;do(_.x=0&&(I-Ne)*(ue-Qe)-(j-Ne)*(_-Qe)>=0&&(j-Ne)*(Ee-Qe)-(me-Ne)*(ue-Qe)>=0}function _7(I,_){return I.next.i!==_.i&&I.prev.i!==_.i&&!O7(I,_)&&(B0(I,_)&&B0(_,I)&&z7(I,_)&&(Uo(I.prev,I,_.prev)||Uo(I,_.prev,_))||vm(I,_)&&Uo(I.prev,I,I.next)>0&&Uo(_.prev,_,_.next)>0)}function Uo(I,_,j){return(_.y-I.y)*(j.x-_.x)-(_.x-I.x)*(j.y-_.y)}function vm(I,_){return I.x===_.x&&I.y===_.y}function lw(I,_,j,ue){var me=pm(Uo(I,_,j)),Ee=pm(Uo(I,_,ue)),Ne=pm(Uo(j,ue,I)),Qe=pm(Uo(j,ue,_));return!!(me!==Ee&&Ne!==Qe||me===0&&dm(I,j,_)||Ee===0&&dm(I,ue,_)||Ne===0&&dm(j,I,ue)||Qe===0&&dm(j,_,ue))}function dm(I,_,j){return _.x<=Math.max(I.x,j.x)&&_.x>=Math.min(I.x,j.x)&&_.y<=Math.max(I.y,j.y)&&_.y>=Math.min(I.y,j.y)}function pm(I){return I>0?1:I<0?-1:0}function O7(I,_){var j=I;do{if(j.i!==I.i&&j.next.i!==I.i&&j.i!==_.i&&j.next.i!==_.i&&lw(j,j.next,I,_))return!0;j=j.next}while(j!==I);return!1}function B0(I,_){return Uo(I.prev,I,I.next)<0?Uo(I,_,I.next)>=0&&Uo(I,I.prev,_)>=0:Uo(I,_,I.prev)<0||Uo(I,I.next,_)<0}function z7(I,_){var j=I,ue=!1,me=(I.x+_.x)/2,Ee=(I.y+_.y)/2;do j.y>Ee!=j.next.y>Ee&&j.next.y!==j.y&&me<(j.next.x-j.x)*(Ee-j.y)/(j.next.y-j.y)+j.x&&(ue=!ue),j=j.next;while(j!==I);return ue}function uw(I,_){var j=new hx(I.i,I.x,I.y),ue=new hx(_.i,_.x,_.y),me=I.next,Ee=_.prev;return I.next=_,_.prev=I,j.next=me,me.prev=j,ue.next=j,j.prev=ue,Ee.next=ue,ue.prev=Ee,ue}function fw(I,_,j,ue){var me=new hx(I,_,j);return ue?(me.next=ue.next,me.prev=ue,ue.next.prev=me,ue.next=me):(me.prev=me,me.next=me),me}function U0(I){I.next.prev=I.prev,I.prev.next=I.next,I.prevZ&&(I.prevZ.nextZ=I.nextZ),I.nextZ&&(I.nextZ.prevZ=I.prevZ)}function hx(I,_,j){this.i=I,this.x=_,this.y=j,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}hm.deviation=function(I,_,j,ue){var me=_&&_.length,Ee=me?_[0]*j:I.length,Ne=Math.abs(vx(I,0,Ee,j));if(me)for(var Qe=0,dt=_.length;Qe0&&(ue+=I[me-1].length,j.holes.push(ue))}return j},fx.default=A7;function k7(I,_,j,ue,me){cw(I,_,j||0,ue||I.length-1,me||B7)}function cw(I,_,j,ue,me){for(;ue>j;){if(ue-j>600){var Ee=ue-j+1,Ne=_-j+1,Qe=Math.log(Ee),dt=.5*Math.exp(2*Qe/3),Tt=.5*Math.sqrt(Qe*dt*(Ee-dt)/Ee)*(Ne-Ee/2<0?-1:1),Ct=Math.max(j,Math.floor(_-Ne*dt/Ee+Tt)),Wt=Math.min(ue,Math.floor(_+(Ee-Ne)*dt/Ee+Tt));cw(I,_,Ct,Wt,me)}var or=I[_],Qt=j,xr=ue;for(H0(I,j,_),me(I[ue],or)>0&&H0(I,j,ue);Qt0;)xr--}me(I[j],or)===0?H0(I,j,xr):(xr++,H0(I,xr,ue)),xr<=_&&(j=xr+1),_<=xr&&(ue=xr-1)}}function H0(I,_,j){var ue=I[_];I[_]=I[j],I[j]=ue}function B7(I,_){return I<_?-1:I>_?1:0}function dx(I,_){var j=I.length;if(j<=1)return[I];for(var ue=[],me,Ee,Ne=0;Ne1)for(var dt=0;dt>3}if(ue--,j===1||j===2)me+=I.readSVarint(),Ee+=I.readSVarint(),j===1&&(Qe&&Ne.push(Qe),Qe=[]),Qe.push(new r(me,Ee));else if(j===7)Qe&&Qe.push(Qe[0].clone());else throw new Error("unknown command "+j)}return Qe&&Ne.push(Qe),Ne},lp.prototype.bbox=function(){var I=this._pbf;I.pos=this._geometry;for(var _=I.readVarint()+I.pos,j=1,ue=0,me=0,Ee=0,Ne=1/0,Qe=-1/0,dt=1/0,Tt=-1/0;I.pos<_;){if(ue<=0){var Ct=I.readVarint();j=Ct&7,ue=Ct>>3}if(ue--,j===1||j===2)me+=I.readSVarint(),Ee+=I.readSVarint(),meQe&&(Qe=me),EeTt&&(Tt=Ee);else if(j!==7)throw new Error("unknown command "+j)}return[Ne,dt,Qe,Tt]},lp.prototype.toGeoJSON=function(I,_,j){var ue=this.extent*Math.pow(2,j),me=this.extent*I,Ee=this.extent*_,Ne=this.loadGeometry(),Qe=lp.types[this.type],dt,Tt;function Ct(Qt){for(var xr=0;xr>3;_=ue===1?I.readString():ue===2?I.readFloat():ue===3?I.readDouble():ue===4?I.readVarint64():ue===5?I.readVarint():ue===6?I.readSVarint():ue===7?I.readBoolean():null}return _}pw.prototype.feature=function(I){if(I<0||I>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[I];var _=this._pbf.readVarint()+this._pbf.pos;return new vw(this._pbf,_,this.extent,this._keys,this._values)};var q7=e9;function e9(I,_){this.layers=I.readFields(t9,{},_)}function t9(I,_,j){if(I===3){var ue=new dw(j,j.readVarint()+j.pos);ue.length&&(_[ue.name]=ue)}}var r9=q7,n9=vw,a9=dw,up={VectorTile:r9,VectorTileFeature:n9,VectorTileLayer:a9},i9=up.VectorTileFeature.types,o9=500,mx=Math.pow(2,13);function V0(I,_,j,ue,me,Ee,Ne,Qe){I.emplaceBack(_,j,Math.floor(ue*mx)*2+Ne,me*mx*2,Ee*mx*2,Math.round(Qe))}var _f=function(_){this.zoom=_.zoom,this.overscaling=_.overscaling,this.layers=_.layers,this.layerIds=this.layers.map(function(j){return j.id}),this.index=_.index,this.hasPattern=!1,this.layoutVertexArray=new rv,this.indexArray=new Rf,this.programConfigurations=new Xa(hw,_.layers,_.zoom),this.segments=new ee,this.stateDependentLayerIds=this.layers.filter(function(j){return j.isStateDependent()}).map(function(j){return j.id})};_f.prototype.populate=function(_,j,ue){this.features=[],this.hasPattern=px("fill-extrusion",this.layers,j);for(var me=0,Ee=_;me=1){var Sn=nn[En-1];if(!s9(yn,Sn)){Qt.vertexLength+4>ee.MAX_VERTEX_ARRAY_LENGTH&&(Qt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Rn=yn.sub(Sn)._perp()._unit(),Vn=Sn.dist(yn);en+Vn>32768&&(en=0),V0(this.layoutVertexArray,yn.x,yn.y,Rn.x,Rn.y,0,0,en),V0(this.layoutVertexArray,yn.x,yn.y,Rn.x,Rn.y,0,1,en),en+=Vn,V0(this.layoutVertexArray,Sn.x,Sn.y,Rn.x,Rn.y,0,0,en),V0(this.layoutVertexArray,Sn.x,Sn.y,Rn.x,Rn.y,0,1,en);var qn=Qt.vertexLength;this.indexArray.emplaceBack(qn,qn+2,qn+1),this.indexArray.emplaceBack(qn+1,qn+2,qn+3),Qt.vertexLength+=4,Qt.primitiveLength+=2}}}}if(Qt.vertexLength+Tt>ee.MAX_VERTEX_ARRAY_LENGTH&&(Qt=this.segments.prepareSegment(Tt,this.layoutVertexArray,this.indexArray)),i9[_.type]==="Polygon"){for(var Jn=[],La=[],da=Qt.vertexLength,Aa=0,Wa=dt;AaRa)||I.y===_.y&&(I.y<0||I.y>Ra)}function l9(I){return I.every(function(_){return _.x<0})||I.every(function(_){return _.x>Ra})||I.every(function(_){return _.y<0})||I.every(function(_){return _.y>Ra})}var u9=new Fo({"fill-extrusion-opacity":new wa(Xt["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Da(Xt["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new wa(Xt["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new wa(Xt["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Wi(Xt["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Da(Xt["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Da(Xt["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new wa(Xt["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),f9={paint:u9},c9=function(I){function _(j){I.call(this,j,f9)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype.createBucket=function(ue){return new _f(ue)},_.prototype.queryRadius=function(){return ju(this.paint.get("fill-extrusion-translate"))},_.prototype.is3D=function(){return!0},_.prototype.queryIntersectsFeature=function(ue,me,Ee,Ne,Qe,dt,Tt,Ct){var Wt=Au(ue,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),dt.angle,Tt),or=this.paint.get("fill-extrusion-height").evaluate(me,Ee),Qt=this.paint.get("fill-extrusion-base").evaluate(me,Ee),xr=d9(Wt,Ct,dt,0),Ur=v9(Ne,Qt,or,Ct),nn=Ur[0],en=Ur[1];return h9(nn,en,xr)},_}(Ji);function G0(I,_){return I.x*_.x+I.y*_.y}function gw(I,_){if(I.length===1){for(var j=0,ue=_[j++],me;!me||ue.equals(me);)if(me=_[j++],!me)return 1/0;for(;j<_.length;j++){var Ee=_[j],Ne=I[0],Qe=me.sub(ue),dt=Ee.sub(ue),Tt=Ne.sub(ue),Ct=G0(Qe,Qe),Wt=G0(Qe,dt),or=G0(dt,dt),Qt=G0(Tt,Qe),xr=G0(Tt,dt),Ur=Ct*or-Wt*Wt,nn=(or*Qt-Wt*xr)/Ur,en=(Ct*xr-Wt*Qt)/Ur,En=1-nn-en,yn=ue.z*En+me.z*nn+Ee.z*en;if(isFinite(yn))return yn}return 1/0}else{for(var Sn=1/0,Rn=0,Vn=_;Rn=2&&_[Tt-1].equals(_[Tt-2]);)Tt--;for(var Ct=0;Ct0;if(Jn&&En>Ct){var da=Qt.dist(xr);if(da>2*Wt){var Aa=Qt.sub(Qt.sub(xr)._mult(Wt/da)._round());this.updateDistance(xr,Aa),this.addCurrentVertex(Aa,nn,0,0,or),xr=Aa}}var Wa=xr&&Ur,Ea=Wa?ue:dt?"butt":me;if(Wa&&Ea==="round"&&(VnEe&&(Ea="bevel"),Ea==="bevel"&&(Vn>2&&(Ea="flipbevel"),Vn100)yn=en.mult(-1);else{var Ca=Vn*nn.add(en).mag()/nn.sub(en).mag();yn._perp()._mult(Ca*(La?-1:1))}this.addCurrentVertex(Qt,yn,0,0,or),this.addCurrentVertex(Qt,yn.mult(-1),0,0,or)}else if(Ea==="bevel"||Ea==="fakeround"){var Ja=-Math.sqrt(Vn*Vn-1),Ha=La?Ja:0,mi=La?0:Ja;if(xr&&this.addCurrentVertex(Qt,nn,Ha,mi,or),Ea==="fakeround")for(var Vi=Math.round(qn*180/Math.PI/x9),yi=1;yi2*Wt){var Go=Qt.add(Ur.sub(Qt)._mult(Wt/as)._round());this.updateDistance(Qt,Go),this.addCurrentVertex(Go,en,0,0,or),Qt=Go}}}}},hl.prototype.addCurrentVertex=function(_,j,ue,me,Ee,Ne){Ne===void 0&&(Ne=!1);var Qe=j.x+j.y*ue,dt=j.y-j.x*ue,Tt=-j.x+j.y*me,Ct=-j.y-j.x*me;this.addHalfVertex(_,Qe,dt,Ne,!1,ue,Ee),this.addHalfVertex(_,Tt,Ct,Ne,!0,-me,Ee),this.distance>bw/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(_,j,ue,me,Ee,Ne))},hl.prototype.addHalfVertex=function(_,j,ue,me,Ee,Ne,Qe){var dt=_.x,Tt=_.y,Ct=this.scaledDistance*xw;this.layoutVertexArray.emplaceBack((dt<<1)+(me?1:0),(Tt<<1)+(Ee?1:0),Math.round(yw*j)+128,Math.round(yw*ue)+128,(Ne===0?0:Ne<0?-1:1)+1|(Ct&63)<<2,Ct>>6);var Wt=Qe.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Wt),Qe.primitiveLength++),Ee?this.e2=Wt:this.e1=Wt},hl.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(bw-1):this.distance},hl.prototype.updateDistance=function(_,j){this.distance+=_.dist(j),this.updateScaledDistance()},ve("LineBucket",hl,{omit:["layers","patternFeatures"]});var w9=new Fo({"line-cap":new wa(Xt.layout_line["line-cap"]),"line-join":new Da(Xt.layout_line["line-join"]),"line-miter-limit":new wa(Xt.layout_line["line-miter-limit"]),"line-round-limit":new wa(Xt.layout_line["line-round-limit"]),"line-sort-key":new Da(Xt.layout_line["line-sort-key"])}),A9=new Fo({"line-opacity":new Da(Xt.paint_line["line-opacity"]),"line-color":new Da(Xt.paint_line["line-color"]),"line-translate":new wa(Xt.paint_line["line-translate"]),"line-translate-anchor":new wa(Xt.paint_line["line-translate-anchor"]),"line-width":new Da(Xt.paint_line["line-width"]),"line-gap-width":new Da(Xt.paint_line["line-gap-width"]),"line-offset":new Da(Xt.paint_line["line-offset"]),"line-blur":new Da(Xt.paint_line["line-blur"]),"line-dasharray":new vo(Xt.paint_line["line-dasharray"]),"line-pattern":new Wi(Xt.paint_line["line-pattern"]),"line-gradient":new bs(Xt.paint_line["line-gradient"])}),ww={paint:A9,layout:w9},T9=function(I){function _(){I.apply(this,arguments)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype.possiblyEvaluate=function(ue,me){return me=new Un(Math.floor(me.zoom),{now:me.now,fadeDuration:me.fadeDuration,zoomHistory:me.zoomHistory,transition:me.transition}),I.prototype.possiblyEvaluate.call(this,ue,me)},_.prototype.evaluate=function(ue,me,Ee,Ne){return me=h({},me,{zoom:Math.floor(me.zoom)}),I.prototype.evaluate.call(this,ue,me,Ee,Ne)},_}(Da),Aw=new T9(ww.paint.properties["line-width"].specification);Aw.useIntegerZoom=!0;var M9=function(I){function _(j){I.call(this,j,ww)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype._handleSpecialPaintPropertyUpdate=function(ue){ue==="line-gradient"&&this._updateGradient()},_.prototype._updateGradient=function(){var ue=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=iw(ue,"lineProgress"),this.gradientTexture=null},_.prototype.recalculate=function(ue,me){I.prototype.recalculate.call(this,ue,me),this.paint._values["line-floorwidth"]=Aw.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,ue)},_.prototype.createBucket=function(ue){return new hl(ue)},_.prototype.queryRadius=function(ue){var me=ue,Ee=Tw(Fl("line-width",this,me),Fl("line-gap-width",this,me)),Ne=Fl("line-offset",this,me);return Ee/2+Math.abs(Ne)+ju(this.paint.get("line-translate"))},_.prototype.queryIntersectsFeature=function(ue,me,Ee,Ne,Qe,dt,Tt){var Ct=Au(ue,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),dt.angle,Tt),Wt=Tt/2*Tw(this.paint.get("line-width").evaluate(me,Ee),this.paint.get("line-gap-width").evaluate(me,Ee)),or=this.paint.get("line-offset").evaluate(me,Ee);return or&&(Ne=S9(Ne,or*Tt)),Bo(Ct,Ne,Wt)},_.prototype.isTileClipped=function(){return!0},_}(Ji);function Tw(I,_){return _>0?_+2*I:I}function S9(I,_){for(var j=[],ue=new r(0,0),me=0;me":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};function R9(I){for(var _="",j=0;j>1,Ct=-7,Wt=j?me-1:0,or=j?-1:1,Qt=I[_+Wt];for(Wt+=or,Ee=Qt&(1<<-Ct)-1,Qt>>=-Ct,Ct+=Qe;Ct>0;Ee=Ee*256+I[_+Wt],Wt+=or,Ct-=8);for(Ne=Ee&(1<<-Ct)-1,Ee>>=-Ct,Ct+=ue;Ct>0;Ne=Ne*256+I[_+Wt],Wt+=or,Ct-=8);if(Ee===0)Ee=1-Tt;else{if(Ee===dt)return Ne?NaN:(Qt?-1:1)*(1/0);Ne=Ne+Math.pow(2,ue),Ee=Ee-Tt}return(Qt?-1:1)*Ne*Math.pow(2,Ee-ue)},I9=function(I,_,j,ue,me,Ee){var Ne,Qe,dt,Tt=Ee*8-me-1,Ct=(1<>1,or=me===23?Math.pow(2,-24)-Math.pow(2,-77):0,Qt=ue?0:Ee-1,xr=ue?1:-1,Ur=_<0||_===0&&1/_<0?1:0;for(_=Math.abs(_),isNaN(_)||_===1/0?(Qe=isNaN(_)?1:0,Ne=Ct):(Ne=Math.floor(Math.log(_)/Math.LN2),_*(dt=Math.pow(2,-Ne))<1&&(Ne--,dt*=2),Ne+Wt>=1?_+=or/dt:_+=or*Math.pow(2,1-Wt),_*dt>=2&&(Ne++,dt/=2),Ne+Wt>=Ct?(Qe=0,Ne=Ct):Ne+Wt>=1?(Qe=(_*dt-1)*Math.pow(2,me),Ne=Ne+Wt):(Qe=_*Math.pow(2,Wt-1)*Math.pow(2,me),Ne=0));me>=8;I[j+Qt]=Qe&255,Qt+=xr,Qe/=256,me-=8);for(Ne=Ne<0;I[j+Qt]=Ne&255,Qt+=xr,Ne/=256,Tt-=8);I[j+Qt-xr]|=Ur*128},gm={read:F9,write:I9},mm=Qi;function Qi(I){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(I)?I:new Uint8Array(I||0),this.pos=0,this.type=0,this.length=this.buf.length}Qi.Varint=0,Qi.Fixed64=1,Qi.Bytes=2,Qi.Fixed32=5;var xx=(1<<16)*(1<<16),Sw=1/xx,_9=12,Ew=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Qi.prototype={destroy:function(){this.buf=null},readFields:function(I,_,j){for(j=j||this.length;this.pos>3,Ee=this.pos;this.type=ue&7,I(me,_,this),this.pos===Ee&&this.skip(ue)}return _},readMessage:function(I,_){return this.readFields(I,_,this.readVarint()+this.pos)},readFixed32:function(){var I=ym(this.buf,this.pos);return this.pos+=4,I},readSFixed32:function(){var I=Dw(this.buf,this.pos);return this.pos+=4,I},readFixed64:function(){var I=ym(this.buf,this.pos)+ym(this.buf,this.pos+4)*xx;return this.pos+=8,I},readSFixed64:function(){var I=ym(this.buf,this.pos)+Dw(this.buf,this.pos+4)*xx;return this.pos+=8,I},readFloat:function(){var I=gm.read(this.buf,this.pos,!0,23,4);return this.pos+=4,I},readDouble:function(){var I=gm.read(this.buf,this.pos,!0,52,8);return this.pos+=8,I},readVarint:function(I){var _=this.buf,j,ue;return ue=_[this.pos++],j=ue&127,ue<128||(ue=_[this.pos++],j|=(ue&127)<<7,ue<128)||(ue=_[this.pos++],j|=(ue&127)<<14,ue<128)||(ue=_[this.pos++],j|=(ue&127)<<21,ue<128)?j:(ue=_[this.pos],j|=(ue&15)<<28,O9(j,I,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var I=this.readVarint();return I%2===1?(I+1)/-2:I/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var I=this.readVarint()+this.pos,_=this.pos;return this.pos=I,I-_>=_9&&Ew?K9(this.buf,_,I):$9(this.buf,_,I)},readBytes:function(){var I=this.readVarint()+this.pos,_=this.buf.subarray(this.pos,I);return this.pos=I,_},readPackedVarint:function(I,_){if(this.type!==Qi.Bytes)return I.push(this.readVarint(_));var j=ch(this);for(I=I||[];this.pos127;);else if(_===Qi.Bytes)this.pos=this.readVarint()+this.pos;else if(_===Qi.Fixed32)this.pos+=4;else if(_===Qi.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+_)},writeTag:function(I,_){this.writeVarint(I<<3|_)},realloc:function(I){for(var _=this.length||16;_268435455||I<0){z9(I,this);return}this.realloc(4),this.buf[this.pos++]=I&127|(I>127?128:0),!(I<=127)&&(this.buf[this.pos++]=(I>>>=7)&127|(I>127?128:0),!(I<=127)&&(this.buf[this.pos++]=(I>>>=7)&127|(I>127?128:0),!(I<=127)&&(this.buf[this.pos++]=I>>>7&127)))},writeSVarint:function(I){this.writeVarint(I<0?-I*2-1:I*2)},writeBoolean:function(I){this.writeVarint(Boolean(I))},writeString:function(I){I=String(I),this.realloc(I.length*4),this.pos++;var _=this.pos;this.pos=J9(this.buf,I,this.pos);var j=this.pos-_;j>=128&&Cw(_,j,this),this.pos=_-1,this.writeVarint(j),this.pos+=j},writeFloat:function(I){this.realloc(4),gm.write(this.buf,I,this.pos,!0,23,4),this.pos+=4},writeDouble:function(I){this.realloc(8),gm.write(this.buf,I,this.pos,!0,52,8),this.pos+=8},writeBytes:function(I){var _=I.length;this.writeVarint(_),this.realloc(_);for(var j=0;j<_;j++)this.buf[this.pos++]=I[j]},writeRawMessage:function(I,_){this.pos++;var j=this.pos;I(_,this);var ue=this.pos-j;ue>=128&&Cw(j,ue,this),this.pos=j-1,this.writeVarint(ue),this.pos+=ue},writeMessage:function(I,_,j){this.writeTag(I,Qi.Bytes),this.writeRawMessage(_,j)},writePackedVarint:function(I,_){_.length&&this.writeMessage(I,U9,_)},writePackedSVarint:function(I,_){_.length&&this.writeMessage(I,H9,_)},writePackedBoolean:function(I,_){_.length&&this.writeMessage(I,W9,_)},writePackedFloat:function(I,_){_.length&&this.writeMessage(I,V9,_)},writePackedDouble:function(I,_){_.length&&this.writeMessage(I,G9,_)},writePackedFixed32:function(I,_){_.length&&this.writeMessage(I,Y9,_)},writePackedSFixed32:function(I,_){_.length&&this.writeMessage(I,Z9,_)},writePackedFixed64:function(I,_){_.length&&this.writeMessage(I,X9,_)},writePackedSFixed64:function(I,_){_.length&&this.writeMessage(I,j9,_)},writeBytesField:function(I,_){this.writeTag(I,Qi.Bytes),this.writeBytes(_)},writeFixed32Field:function(I,_){this.writeTag(I,Qi.Fixed32),this.writeFixed32(_)},writeSFixed32Field:function(I,_){this.writeTag(I,Qi.Fixed32),this.writeSFixed32(_)},writeFixed64Field:function(I,_){this.writeTag(I,Qi.Fixed64),this.writeFixed64(_)},writeSFixed64Field:function(I,_){this.writeTag(I,Qi.Fixed64),this.writeSFixed64(_)},writeVarintField:function(I,_){this.writeTag(I,Qi.Varint),this.writeVarint(_)},writeSVarintField:function(I,_){this.writeTag(I,Qi.Varint),this.writeSVarint(_)},writeStringField:function(I,_){this.writeTag(I,Qi.Bytes),this.writeString(_)},writeFloatField:function(I,_){this.writeTag(I,Qi.Fixed32),this.writeFloat(_)},writeDoubleField:function(I,_){this.writeTag(I,Qi.Fixed64),this.writeDouble(_)},writeBooleanField:function(I,_){this.writeVarintField(I,Boolean(_))}};function O9(I,_,j){var ue=j.buf,me,Ee;if(Ee=ue[j.pos++],me=(Ee&112)>>4,Ee<128||(Ee=ue[j.pos++],me|=(Ee&127)<<3,Ee<128)||(Ee=ue[j.pos++],me|=(Ee&127)<<10,Ee<128)||(Ee=ue[j.pos++],me|=(Ee&127)<<17,Ee<128)||(Ee=ue[j.pos++],me|=(Ee&127)<<24,Ee<128)||(Ee=ue[j.pos++],me|=(Ee&1)<<31,Ee<128))return fp(I,me,_);throw new Error("Expected varint not more than 10 bytes")}function ch(I){return I.type===Qi.Bytes?I.readVarint()+I.pos:I.pos+1}function fp(I,_,j){return j?_*4294967296+(I>>>0):(_>>>0)*4294967296+(I>>>0)}function z9(I,_){var j,ue;if(I>=0?(j=I%4294967296|0,ue=I/4294967296|0):(j=~(-I%4294967296),ue=~(-I/4294967296),j^4294967295?j=j+1|0:(j=0,ue=ue+1|0)),I>=18446744073709552e3||I<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");_.realloc(10),k9(j,ue,_),B9(ue,_)}function k9(I,_,j){j.buf[j.pos++]=I&127|128,I>>>=7,j.buf[j.pos++]=I&127|128,I>>>=7,j.buf[j.pos++]=I&127|128,I>>>=7,j.buf[j.pos++]=I&127|128,I>>>=7,j.buf[j.pos]=I&127}function B9(I,_){var j=(I&7)<<4;_.buf[_.pos++]|=j|((I>>>=3)?128:0),I&&(_.buf[_.pos++]=I&127|((I>>>=7)?128:0),I&&(_.buf[_.pos++]=I&127|((I>>>=7)?128:0),I&&(_.buf[_.pos++]=I&127|((I>>>=7)?128:0),I&&(_.buf[_.pos++]=I&127|((I>>>=7)?128:0),I&&(_.buf[_.pos++]=I&127)))))}function Cw(I,_,j){var ue=_<=16383?1:_<=2097151?2:_<=268435455?3:Math.floor(Math.log(_)/(Math.LN2*7));j.realloc(ue);for(var me=j.pos-1;me>=I;me--)j.buf[me+ue]=j.buf[me]}function U9(I,_){for(var j=0;j>>8,I[j+2]=_>>>16,I[j+3]=_>>>24}function Dw(I,_){return(I[_]|I[_+1]<<8|I[_+2]<<16)+(I[_+3]<<24)}function $9(I,_,j){for(var ue="",me=_;me239?4:Ee>223?3:Ee>191?2:1;if(me+Qe>j)break;var dt,Tt,Ct;Qe===1?Ee<128&&(Ne=Ee):Qe===2?(dt=I[me+1],(dt&192)===128&&(Ne=(Ee&31)<<6|dt&63,Ne<=127&&(Ne=null))):Qe===3?(dt=I[me+1],Tt=I[me+2],(dt&192)===128&&(Tt&192)===128&&(Ne=(Ee&15)<<12|(dt&63)<<6|Tt&63,(Ne<=2047||Ne>=55296&&Ne<=57343)&&(Ne=null))):Qe===4&&(dt=I[me+1],Tt=I[me+2],Ct=I[me+3],(dt&192)===128&&(Tt&192)===128&&(Ct&192)===128&&(Ne=(Ee&15)<<18|(dt&63)<<12|(Tt&63)<<6|Ct&63,(Ne<=65535||Ne>=1114112)&&(Ne=null))),Ne===null?(Ne=65533,Qe=1):Ne>65535&&(Ne-=65536,ue+=String.fromCharCode(Ne>>>10&1023|55296),Ne=56320|Ne&1023),ue+=String.fromCharCode(Ne),me+=Qe}return ue}function K9(I,_,j){return Ew.decode(I.subarray(_,j))}function J9(I,_,j){for(var ue=0,me,Ee;ue<_.length;ue++){if(me=_.charCodeAt(ue),me>55295&&me<57344)if(Ee)if(me<56320){I[j++]=239,I[j++]=191,I[j++]=189,Ee=me;continue}else me=Ee-55296<<10|me-56320|65536,Ee=null;else{me>56319||ue+1===_.length?(I[j++]=239,I[j++]=191,I[j++]=189):Ee=me;continue}else Ee&&(I[j++]=239,I[j++]=191,I[j++]=189,Ee=null);me<128?I[j++]=me:(me<2048?I[j++]=me>>6|192:(me<65536?I[j++]=me>>12|224:(I[j++]=me>>18|240,I[j++]=me>>12&63|128),I[j++]=me>>6&63|128),I[j++]=me&63|128)}return j}var bx=3;function Q9(I,_,j){I===1&&j.readMessage(q9,_)}function q9(I,_,j){if(I===3){var ue=j.readMessage(eL,{}),me=ue.id,Ee=ue.bitmap,Ne=ue.width,Qe=ue.height,dt=ue.left,Tt=ue.top,Ct=ue.advance;_.push({id:me,bitmap:new bd({width:Ne+2*bx,height:Qe+2*bx},Ee),metrics:{width:Ne,height:Qe,left:dt,top:Tt,advance:Ct}})}}function eL(I,_,j){I===1?_.id=j.readVarint():I===2?_.bitmap=j.readBytes():I===3?_.width=j.readVarint():I===4?_.height=j.readVarint():I===5?_.left=j.readSVarint():I===6?_.top=j.readSVarint():I===7&&(_.advance=j.readVarint())}function tL(I){return new mm(I).readFields(Q9,[])}var Lw=bx;function Pw(I){for(var _=0,j=0,ue=0,me=I;ue=0;Qt--){var xr=Qe[Qt];if(!(or.w>xr.w||or.h>xr.h)){if(or.x=xr.x,or.y=xr.y,Tt=Math.max(Tt,or.y+or.h),dt=Math.max(dt,or.x+or.w),or.w===xr.w&&or.h===xr.h){var Ur=Qe.pop();Qt=0&&me>=_&&Tc[this.text.charCodeAt(me)];me--)ue--;this.text=this.text.substring(_,ue),this.sectionIndex=this.sectionIndex.slice(_,ue)},Ns.prototype.substring=function(_,j){var ue=new Ns;return ue.text=this.text.substring(_,j),ue.sectionIndex=this.sectionIndex.slice(_,j),ue.sections=this.sections,ue},Ns.prototype.toString=function(){return this.text},Ns.prototype.getMaxScale=function(){var _=this;return this.sectionIndex.reduce(function(j,ue){return Math.max(j,_.sections[ue].scale)},0)},Ns.prototype.addTextSection=function(_,j){this.text+=_.text,this.sections.push(hp.forText(_.scale,_.fontStack||j));for(var ue=this.sections.length-1,me=0;me<_.text.length;++me)this.sectionIndex.push(ue)},Ns.prototype.addImageSection=function(_){var j=_.image?_.image.name:"";if(j.length===0){G("Can't add FormattedSection with an empty image.");return}var ue=this.getNextImageSectionCharCode();if(!ue){G("Reached maximum number of images "+(Rw-Nw+2));return}this.text+=String.fromCharCode(ue),this.sections.push(hp.forImage(j)),this.sectionIndex.push(this.sections.length-1)},Ns.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=Rw?null:++this.imageSectionID:(this.imageSectionID=Nw,this.imageSectionID)};function nL(I,_){for(var j=[],ue=I.text,me=0,Ee=0,Ne=_;Ee=0,Ct=0,Wt=0;Wt0&&Go>La&&(La=Go)}else{var xi=j[Aa.fontStack],hi=xi&&xi[Ea];if(hi&&hi.rect)Ha=hi.rect,Ja=hi.metrics;else{var $i=_[Aa.fontStack],qi=$i&&$i[Ea];if(!qi)continue;Ja=qi.metrics}Ca=(Rn-Aa.scale)*vs}yi?(I.verticalizable=!0,Jn.push({glyph:Ea,imageName:mi,x:or,y:Qt+Ca,vertical:yi,scale:Aa.scale,fontStack:Aa.fontStack,sectionIndex:Wa,metrics:Ja,rect:Ha}),or+=Vi*Aa.scale+Tt):(Jn.push({glyph:Ea,imageName:mi,x:or,y:Qt+Ca,vertical:yi,scale:Aa.scale,fontStack:Aa.fontStack,sectionIndex:Wa,metrics:Ja,rect:Ha}),or+=Ja.advance*Aa.scale+Tt)}if(Jn.length!==0){var Rs=or-Tt;xr=Math.max(Rs,xr),sL(Jn,0,Jn.length-1,nn,La)}or=0;var Fs=Ee*Rn+La;qn.lineOffset=Math.max(La,Vn),Qt+=Fs,Ur=Math.max(Fs,Ur),++en}var is=Qt-X0,Ws=Ax(Ne),Ys=Ws.horizontalAlign,Ko=Ws.verticalAlign;lL(I.positionedLines,nn,Ys,Ko,xr,Ur,Ee,is,me.length),I.top+=-Ko*is,I.bottom=I.top+is,I.left+=-Ys*xr,I.right=I.left+xr}function sL(I,_,j,ue,me){if(!(!ue&&!me))for(var Ee=I[j],Ne=Ee.metrics.advance*Ee.scale,Qe=(I[j].x+Ne)*ue,dt=_;dt<=j;dt++)I[dt].x-=Qe,I[dt].y+=me}function lL(I,_,j,ue,me,Ee,Ne,Qe,dt){var Tt=(_-j)*me,Ct=0;Ee!==Ne?Ct=-Qe*ue-X0:Ct=(-ue*dt+.5)*Ne;for(var Wt=0,or=I;Wt-j/2;){if(Ne--,Ne<0)return!1;Qe-=I[Ne].dist(Ee),Ee=I[Ne]}Qe+=I[Ne].dist(I[Ne+1]),Ne++;for(var dt=[],Tt=0;Qeue;)Tt-=dt.shift().angleDelta;if(Tt>me)return!1;Ne++,Qe+=Wt.dist(or)}return!0}function Hw(I){for(var _=0,j=0;jTt){var xr=(Tt-dt)/Qt,Ur=lo(Wt.x,or.x,xr),nn=lo(Wt.y,or.y,xr),en=new vp(Ur,nn,or.angleTo(Wt),Ct);return en._round(),!Ne||Uw(I,en,Qe,Ne,_)?en:void 0}dt+=Qt}}function hL(I,_,j,ue,me,Ee,Ne,Qe,dt){var Tt=Vw(ue,Ee,Ne),Ct=Gw(ue,me),Wt=Ct*Ne,or=I[0].x===0||I[0].x===dt||I[0].y===0||I[0].y===dt;_-Wt<_/4&&(_=Wt+_/4);var Qt=Ee*2,xr=or?_/2*Qe%_:(Ct/2+Qt)*Ne*Qe%_;return Ww(I,xr,_,Tt,j,Wt,or,!1,dt)}function Ww(I,_,j,ue,me,Ee,Ne,Qe,dt){for(var Tt=Ee/2,Ct=Hw(I),Wt=0,or=_-j,Qt=[],xr=0;xr=0&&Sn=0&&Rn=0&&or+Tt<=Ct){var Vn=new vp(Sn,Rn,En,xr);Vn._round(),(!ue||Uw(I,Vn,Ee,ue,me))&&Qt.push(Vn)}}Wt+=en}return!Qe&&!Qt.length&&!Ne&&(Qt=Ww(I,Wt/2,j,ue,me,Ee,Ne,!0,dt)),Qt}function Yw(I,_,j,ue,me){for(var Ee=[],Ne=0;Ne=ue&&Wt.x>=ue)&&(Ct.x>=ue?Ct=new r(ue,Ct.y+(Wt.y-Ct.y)*((ue-Ct.x)/(Wt.x-Ct.x)))._round():Wt.x>=ue&&(Wt=new r(ue,Ct.y+(Wt.y-Ct.y)*((ue-Ct.x)/(Wt.x-Ct.x)))._round()),!(Ct.y>=me&&Wt.y>=me)&&(Ct.y>=me?Ct=new r(Ct.x+(Wt.x-Ct.x)*((me-Ct.y)/(Wt.y-Ct.y)),me)._round():Wt.y>=me&&(Wt=new r(Ct.x+(Wt.x-Ct.x)*((me-Ct.y)/(Wt.y-Ct.y)),me)._round()),(!dt||!Ct.equals(dt[dt.length-1]))&&(dt=[Ct],Ee.push(dt)),dt.push(Wt)))))}return Ee}var dp=Il;function Zw(I,_,j,ue){var me=[],Ee=I.image,Ne=Ee.pixelRatio,Qe=Ee.paddedRect.w-2*dp,dt=Ee.paddedRect.h-2*dp,Tt=I.right-I.left,Ct=I.bottom-I.top,Wt=Ee.stretchX||[[0,Qe]],or=Ee.stretchY||[[0,dt]],Qt=function(xi,hi){return xi+hi[1]-hi[0]},xr=Wt.reduce(Qt,0),Ur=or.reduce(Qt,0),nn=Qe-xr,en=dt-Ur,En=0,yn=xr,Sn=0,Rn=Ur,Vn=0,qn=nn,Jn=0,La=en;if(Ee.content&&ue){var da=Ee.content;En=wm(Wt,0,da[0]),Sn=wm(or,0,da[1]),yn=wm(Wt,da[0],da[2]),Rn=wm(or,da[1],da[3]),Vn=da[0]-En,Jn=da[1]-Sn,qn=da[2]-da[0]-yn,La=da[3]-da[1]-Rn}var Aa=function(xi,hi,$i,qi){var xo=Am(xi.stretch-En,yn,Tt,I.left),Co=Tm(xi.fixed-Vn,qn,xi.stretch,xr),as=Am(hi.stretch-Sn,Rn,Ct,I.top),Go=Tm(hi.fixed-Jn,La,hi.stretch,Ur),Rs=Am($i.stretch-En,yn,Tt,I.left),Fs=Tm($i.fixed-Vn,qn,$i.stretch,xr),is=Am(qi.stretch-Sn,Rn,Ct,I.top),Ws=Tm(qi.fixed-Jn,La,qi.stretch,Ur),Ys=new r(xo,as),Ko=new r(Rs,as),Zs=new r(Rs,is),ru=new r(xo,is),dh=new r(Co/Ne,Go/Ne),cv=new r(Fs/Ne,Ws/Ne),hv=_*Math.PI/180;if(hv){var vv=Math.sin(hv),Ap=Math.cos(hv),Ku=[Ap,-vv,vv,Ap];Ys._matMult(Ku),Ko._matMult(Ku),ru._matMult(Ku),Zs._matMult(Ku)}var Lm=xi.stretch+xi.fixed,Nx=$i.stretch+$i.fixed,Pm=hi.stretch+hi.fixed,Rx=qi.stretch+qi.fixed,Tu={x:Ee.paddedRect.x+dp+Lm,y:Ee.paddedRect.y+dp+Pm,w:Nx-Lm,h:Rx-Pm},Tp=qn/Ne/Tt,Nm=La/Ne/Ct;return{tl:Ys,tr:Ko,bl:ru,br:Zs,tex:Tu,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:dh,pixelOffsetBR:cv,minFontScaleX:Tp,minFontScaleY:Nm,isSDF:j}};if(!ue||!Ee.stretchX&&!Ee.stretchY)me.push(Aa({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Qe+1},{fixed:0,stretch:dt+1}));else for(var Wa=Xw(Wt,nn,xr),Ea=Xw(or,en,Ur),Ca=0;Ca0&&(xr=Math.max(10,xr),this.circleDiameter=xr)}else{var Ur=Ne.top*Qe-dt,nn=Ne.bottom*Qe+dt,en=Ne.left*Qe-dt,En=Ne.right*Qe+dt,yn=Ne.collisionPadding;if(yn&&(en-=yn[0]*Qe,Ur-=yn[1]*Qe,En+=yn[2]*Qe,nn+=yn[3]*Qe),Ct){var Sn=new r(en,Ur),Rn=new r(En,Ur),Vn=new r(en,nn),qn=new r(En,nn),Jn=Ct*Math.PI/180;Sn._rotate(Jn),Rn._rotate(Jn),Vn._rotate(Jn),qn._rotate(Jn),en=Math.min(Sn.x,Rn.x,Vn.x,qn.x),En=Math.max(Sn.x,Rn.x,Vn.x,qn.x),Ur=Math.min(Sn.y,Rn.y,Vn.y,qn.y),nn=Math.max(Sn.y,Rn.y,Vn.y,qn.y)}_.emplaceBack(j.x,j.y,en,Ur,En,nn,ue,me,Ee)}this.boxEndIndex=_.length},pp=function(_,j){if(_===void 0&&(_=[]),j===void 0&&(j=dL),this.data=_,this.length=this.data.length,this.compare=j,this.length>0)for(var ue=(this.length>>1)-1;ue>=0;ue--)this._down(ue)};pp.prototype.push=function(_){this.data.push(_),this.length++,this._up(this.length-1)},pp.prototype.pop=function(){if(this.length!==0){var _=this.data[0],j=this.data.pop();return this.length--,this.length>0&&(this.data[0]=j,this._down(0)),_}},pp.prototype.peek=function(){return this.data[0]},pp.prototype._up=function(_){for(var j=this,ue=j.data,me=j.compare,Ee=ue[_];_>0;){var Ne=_-1>>1,Qe=ue[Ne];if(me(Ee,Qe)>=0)break;ue[_]=Qe,_=Ne}ue[_]=Ee},pp.prototype._down=function(_){for(var j=this,ue=j.data,me=j.compare,Ee=this.length>>1,Ne=ue[_];_=0)break;ue[_]=dt,_=Qe}ue[_]=Ne};function dL(I,_){return I<_?-1:I>_?1:0}function pL(I,_,j){_===void 0&&(_=1),j===void 0&&(j=!1);for(var ue=1/0,me=1/0,Ee=-1/0,Ne=-1/0,Qe=I[0],dt=0;dtEe)&&(Ee=Tt.x),(!dt||Tt.y>Ne)&&(Ne=Tt.y)}var Ct=Ee-ue,Wt=Ne-me,or=Math.min(Ct,Wt),Qt=or/2,xr=new pp([],gL);if(or===0)return new r(ue,me);for(var Ur=ue;Uren.d||!en.d)&&(en=yn,j&&console.log("found best %d after %d probes",Math.round(1e4*yn.d)/1e4,En)),!(yn.max-en.d<=_)&&(Qt=yn.h/2,xr.push(new gp(yn.p.x-Qt,yn.p.y-Qt,Qt,I)),xr.push(new gp(yn.p.x+Qt,yn.p.y-Qt,Qt,I)),xr.push(new gp(yn.p.x-Qt,yn.p.y+Qt,Qt,I)),xr.push(new gp(yn.p.x+Qt,yn.p.y+Qt,Qt,I)),En+=4)}return j&&(console.log("num probes: "+En),console.log("best distance: "+en.d)),en.p}function gL(I,_){return _.max-I.max}function gp(I,_,j,ue){this.p=new r(I,_),this.h=j,this.d=mL(this.p,ue),this.max=this.d+this.h*Math.SQRT2}function mL(I,_){for(var j=!1,ue=1/0,me=0;me<_.length;me++)for(var Ee=_[me],Ne=0,Qe=Ee.length,dt=Qe-1;NeI.y!=Ct.y>I.y&&I.x<(Ct.x-Tt.x)*(I.y-Tt.y)/(Ct.y-Tt.y)+Tt.x&&(j=!j),ue=Math.min(ue,Ff(I,Tt,Ct))}return(j?1:-1)*Math.sqrt(ue)}function yL(I){for(var _=0,j=0,ue=0,me=I[0],Ee=0,Ne=me.length,Qe=Ne-1;Ee=Ra||Ku.y<0||Ku.y>=Ra||wL(I,Ku,Ap,j,ue,me,Ea,I.layers[0],I.collisionBoxArray,_.index,_.sourceLayerIndex,I.index,en,Rn,Jn,dt,yn,Vn,La,Qt,_,Ee,Tt,Ct,Ne)};if(da==="line")for(var Ja=0,Ha=Yw(_.geometry,0,0,Ra,Ra);Ja1){var as=cL(Co,qn,j.vertical||xr,ue,Ur,En);as&&Ca(Co,as)}}else if(_.type==="Polygon")for(var Go=0,Rs=dx(_.geometry,0);Gouv&&G(I.layerIds[0]+': Value for "text-size" is >= '+j0+'. Reduce your "text-size".')):nn.kind==="composite"&&(en=[Of*Qt.compositeTextSizes[0].evaluate(Ne,{},xr),Of*Qt.compositeTextSizes[1].evaluate(Ne,{},xr)],(en[0]>uv||en[1]>uv)&&G(I.layerIds[0]+': Value for "text-size" is >= '+j0+'. Reduce your "text-size".')),I.addSymbols(I.text,Ur,en,Qe,Ee,Ne,Tt,_,dt.lineStartIndex,dt.lineLength,or,xr);for(var En=0,yn=Ct;Enuv&&G(I.layerIds[0]+': Value for "icon-size" is >= '+j0+'. Reduce your "icon-size".')):Ys.kind==="composite"&&(Ko=[Of*Rn.compositeIconSizes[0].evaluate(Sn,{},qn),Of*Rn.compositeIconSizes[1].evaluate(Sn,{},qn)],(Ko[0]>uv||Ko[1]>uv)&&G(I.layerIds[0]+': Value for "icon-size" is >= '+j0+'. Reduce your "icon-size".')),I.addSymbols(I.icon,is,Ko,yn,En,Sn,!1,_,da.lineStartIndex,da.lineLength,-1,qn),yi=I.icon.placedSymbolArray.length-1,Ws&&(Ha=Ws.length*4,I.addSymbols(I.icon,Ws,Ko,yn,En,Sn,tu.vertical,_,da.lineStartIndex,da.lineLength,-1,qn),xi=I.icon.placedSymbolArray.length-1)}for(var Zs in ue.horizontal){var ru=ue.horizontal[Zs];if(!Aa){$i=$e(ru.text);var dh=Qe.layout.get("text-rotate").evaluate(Sn,{},qn);Aa=new Mm(dt,_,Tt,Ct,Wt,ru,or,Qt,xr,dh)}var cv=ru.positionedLines.length===1;if(mi+=$w(I,_,ru,Ee,Qe,xr,Sn,Ur,da,ue.vertical?tu.horizontal:tu.horizontalOnly,cv?Object.keys(ue.horizontal):[Zs],hi,yi,Rn,qn),cv)break}ue.vertical&&(Vi+=$w(I,_,ue.vertical,Ee,Qe,xr,Sn,Ur,da,tu.vertical,["vertical"],hi,xi,Rn,qn));var hv=Aa?Aa.boxStartIndex:I.collisionBoxArray.length,vv=Aa?Aa.boxEndIndex:I.collisionBoxArray.length,Ap=Ea?Ea.boxStartIndex:I.collisionBoxArray.length,Ku=Ea?Ea.boxEndIndex:I.collisionBoxArray.length,Lm=Wa?Wa.boxStartIndex:I.collisionBoxArray.length,Nx=Wa?Wa.boxEndIndex:I.collisionBoxArray.length,Pm=Ca?Ca.boxStartIndex:I.collisionBoxArray.length,Rx=Ca?Ca.boxEndIndex:I.collisionBoxArray.length,Tu=-1,Tp=function(J0,hA){return J0&&J0.circleDiameter?Math.max(J0.circleDiameter,hA):hA};Tu=Tp(Aa,Tu),Tu=Tp(Ea,Tu),Tu=Tp(Wa,Tu),Tu=Tp(Ca,Tu);var Nm=Tu>-1?1:0;Nm&&(Tu*=Jn/vs),I.glyphOffsetArray.length>=Hi.MAX_GLYPHS&&G("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Sn.sortKey!==void 0&&I.addToSortKeyRanges(I.symbolInstances.length,Sn.sortKey),I.symbolInstances.emplaceBack(_.x,_.y,hi.right>=0?hi.right:-1,hi.center>=0?hi.center:-1,hi.left>=0?hi.left:-1,hi.vertical||-1,yi,xi,$i,hv,vv,Ap,Ku,Lm,Nx,Pm,Rx,Tt,mi,Vi,Ja,Ha,Nm,0,or,qi,xo,Tu)}function AL(I,_,j,ue){var me=I.compareText;if(!(_ in me))me[_]=[];else for(var Ee=me[_],Ne=Ee.length-1;Ne>=0;Ne--)if(ue.dist(Ee[Ne])0)&&(Ne.value.kind!=="constant"||Ne.value.value.length>0),Ct=dt.value.kind!=="constant"||!!dt.value.value||Object.keys(dt.parameters).length>0,Wt=Ee.get("symbol-sort-key");if(this.features=[],!(!Tt&&!Ct)){for(var or=j.iconDependencies,Qt=j.glyphDependencies,xr=j.availableImages,Ur=new Un(this.zoom),nn=0,en=_;nn=0;for(var Vi=0,yi=La.sections;Vi=0;dt--)Ne[dt]={x:j[dt].x,y:j[dt].y,tileUnitDistanceFromAnchor:Ee},dt>0&&(Ee+=j[dt-1].dist(j[dt]));for(var Tt=0;Tt0},Hi.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Hi.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Hi.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Hi.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Hi.prototype.addIndicesForPlacedSymbol=function(_,j){for(var ue=_.placedSymbolArray.get(j),me=ue.vertexStartIndex+ue.numGlyphs*4,Ee=ue.vertexStartIndex;Ee1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(_),this.sortedAngle=_,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var ue=0,me=this.symbolInstanceIndexes;ue=0&&Tt.indexOf(Qe)===dt&&j.addIndicesForPlacedSymbol(j.text,Qe)}),Ne.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Ne.verticalPlacedTextSymbolIndex),Ne.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ne.placedIconSymbolIndex),Ne.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ne.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},ve("SymbolBucket",Hi,{omit:["layers","collisionBoxArray","features","compareText"]}),Hi.MAX_GLYPHS=65535,Hi.addDynamicAttributes=Ex;function EL(I,_){return _.replace(/{([^{}]+)}/g,function(j,ue){return ue in I?String(I[ue]):""})}var CL=new Fo({"symbol-placement":new wa(Xt.layout_symbol["symbol-placement"]),"symbol-spacing":new wa(Xt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new wa(Xt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Da(Xt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new wa(Xt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new wa(Xt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new wa(Xt.layout_symbol["icon-ignore-placement"]),"icon-optional":new wa(Xt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new wa(Xt.layout_symbol["icon-rotation-alignment"]),"icon-size":new Da(Xt.layout_symbol["icon-size"]),"icon-text-fit":new wa(Xt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new wa(Xt.layout_symbol["icon-text-fit-padding"]),"icon-image":new Da(Xt.layout_symbol["icon-image"]),"icon-rotate":new Da(Xt.layout_symbol["icon-rotate"]),"icon-padding":new wa(Xt.layout_symbol["icon-padding"]),"icon-keep-upright":new wa(Xt.layout_symbol["icon-keep-upright"]),"icon-offset":new Da(Xt.layout_symbol["icon-offset"]),"icon-anchor":new Da(Xt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new wa(Xt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new wa(Xt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new wa(Xt.layout_symbol["text-rotation-alignment"]),"text-field":new Da(Xt.layout_symbol["text-field"]),"text-font":new Da(Xt.layout_symbol["text-font"]),"text-size":new Da(Xt.layout_symbol["text-size"]),"text-max-width":new Da(Xt.layout_symbol["text-max-width"]),"text-line-height":new wa(Xt.layout_symbol["text-line-height"]),"text-letter-spacing":new Da(Xt.layout_symbol["text-letter-spacing"]),"text-justify":new Da(Xt.layout_symbol["text-justify"]),"text-radial-offset":new Da(Xt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new wa(Xt.layout_symbol["text-variable-anchor"]),"text-anchor":new Da(Xt.layout_symbol["text-anchor"]),"text-max-angle":new wa(Xt.layout_symbol["text-max-angle"]),"text-writing-mode":new wa(Xt.layout_symbol["text-writing-mode"]),"text-rotate":new Da(Xt.layout_symbol["text-rotate"]),"text-padding":new wa(Xt.layout_symbol["text-padding"]),"text-keep-upright":new wa(Xt.layout_symbol["text-keep-upright"]),"text-transform":new Da(Xt.layout_symbol["text-transform"]),"text-offset":new Da(Xt.layout_symbol["text-offset"]),"text-allow-overlap":new wa(Xt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new wa(Xt.layout_symbol["text-ignore-placement"]),"text-optional":new wa(Xt.layout_symbol["text-optional"])}),DL=new Fo({"icon-opacity":new Da(Xt.paint_symbol["icon-opacity"]),"icon-color":new Da(Xt.paint_symbol["icon-color"]),"icon-halo-color":new Da(Xt.paint_symbol["icon-halo-color"]),"icon-halo-width":new Da(Xt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Da(Xt.paint_symbol["icon-halo-blur"]),"icon-translate":new wa(Xt.paint_symbol["icon-translate"]),"icon-translate-anchor":new wa(Xt.paint_symbol["icon-translate-anchor"]),"text-opacity":new Da(Xt.paint_symbol["text-opacity"]),"text-color":new Da(Xt.paint_symbol["text-color"],{runtimeType:On,getOverride:function(I){return I.textColor},hasOverride:function(I){return!!I.textColor}}),"text-halo-color":new Da(Xt.paint_symbol["text-halo-color"]),"text-halo-width":new Da(Xt.paint_symbol["text-halo-width"]),"text-halo-blur":new Da(Xt.paint_symbol["text-halo-blur"]),"text-translate":new wa(Xt.paint_symbol["text-translate"]),"text-translate-anchor":new wa(Xt.paint_symbol["text-translate-anchor"])}),Cx={paint:DL,layout:CL},xp=function(_){this.type=_.property.overrides?_.property.overrides.runtimeType:Pr,this.defaultValue=_};xp.prototype.evaluate=function(_){if(_.formattedSection){var j=this.defaultValue.property.overrides;if(j&&j.hasOverride(_.formattedSection))return j.getOverride(_.formattedSection)}return _.feature&&_.featureState?this.defaultValue.evaluate(_.feature,_.featureState):this.defaultValue.property.specification.default},xp.prototype.eachChild=function(_){if(!this.defaultValue.isConstant()){var j=this.defaultValue.value;_(j._styleExpression.expression)}},xp.prototype.outputDefined=function(){return!1},xp.prototype.serialize=function(){return null},ve("FormatSectionOverride",xp,{omit:["defaultValue"]});var LL=function(I){function _(j){I.call(this,j,Cx)}return I&&(_.__proto__=I),_.prototype=Object.create(I&&I.prototype),_.prototype.constructor=_,_.prototype.recalculate=function(ue,me){if(I.prototype.recalculate.call(this,ue,me),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var Ee=this.layout.get("text-writing-mode");if(Ee){for(var Ne=[],Qe=0,dt=Ee;Qe",targetMapId:me,sourceMapId:Ne.mapId})}}},bp.prototype.receive=function(_){var j=_.data,ue=j.id;if(!!ue&&!(j.targetMapId&&this.mapId!==j.targetMapId))if(j.type===""){delete this.tasks[ue];var me=this.cancelCallbacks[ue];delete this.cancelCallbacks[ue],me&&me()}else B()||j.mustQueue?(this.tasks[ue]=j,this.taskQueue.push(ue),this.invoker.trigger()):this.processTask(ue,j)},bp.prototype.process=function(){if(!!this.taskQueue.length){var _=this.taskQueue.shift(),j=this.tasks[_];delete this.tasks[_],this.taskQueue.length&&this.invoker.trigger(),j&&this.processTask(_,j)}},bp.prototype.processTask=function(_,j){var ue=this;if(j.type===""){var me=this.callbacks[_];delete this.callbacks[_],me&&(j.error?me(it(j.error)):me(null,it(j.data)))}else{var Ee=!1,Ne=re(this.globalScope)?void 0:[],Qe=j.hasCallback?function(or,Qt){Ee=!0,delete ue.cancelCallbacks[_],ue.target.postMessage({id:_,type:"",sourceMapId:ue.mapId,error:or?nt(or):null,data:nt(Qt,Ne)},Ne)}:function(or){Ee=!0},dt=null,Tt=it(j.data);if(this.parent[j.type])dt=this.parent[j.type](j.sourceMapId,Tt,Qe);else if(this.parent.getWorkerSource){var Ct=j.type.split("."),Wt=this.parent.getWorkerSource(j.sourceMapId,Ct[0],Tt.source);dt=Wt[Ct[1]](Tt,Qe)}else Qe(new Error("Could not find function "+j.type));!Ee&&dt&&dt.cancel&&(this.cancelCallbacks[_]=dt.cancel)}},bp.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function UL(I,_,j){_=Math.pow(2,j)-_-1;var ue=tA(I*256,_*256,j),me=tA((I+1)*256,(_+1)*256,j);return ue[0]+","+ue[1]+","+me[0]+","+me[1]}function tA(I,_,j){var ue=2*Math.PI*6378137/256/Math.pow(2,j),me=I*ue-2*Math.PI*6378137/2,Ee=_*ue-2*Math.PI*6378137/2;return[me,Ee]}var Ho=function(_,j){_&&(j?this.setSouthWest(_).setNorthEast(j):_.length===4?this.setSouthWest([_[0],_[1]]).setNorthEast([_[2],_[3]]):this.setSouthWest(_[0]).setNorthEast(_[1]))};Ho.prototype.setNorthEast=function(_){return this._ne=_ instanceof ao?new ao(_.lng,_.lat):ao.convert(_),this},Ho.prototype.setSouthWest=function(_){return this._sw=_ instanceof ao?new ao(_.lng,_.lat):ao.convert(_),this},Ho.prototype.extend=function(_){var j=this._sw,ue=this._ne,me,Ee;if(_ instanceof ao)me=_,Ee=_;else if(_ instanceof Ho){if(me=_._sw,Ee=_._ne,!me||!Ee)return this}else{if(Array.isArray(_))if(_.length===4||_.every(Array.isArray)){var Ne=_;return this.extend(Ho.convert(Ne))}else{var Qe=_;return this.extend(ao.convert(Qe))}return this}return!j&&!ue?(this._sw=new ao(me.lng,me.lat),this._ne=new ao(Ee.lng,Ee.lat)):(j.lng=Math.min(me.lng,j.lng),j.lat=Math.min(me.lat,j.lat),ue.lng=Math.max(Ee.lng,ue.lng),ue.lat=Math.max(Ee.lat,ue.lat)),this},Ho.prototype.getCenter=function(){return new ao((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Ho.prototype.getSouthWest=function(){return this._sw},Ho.prototype.getNorthEast=function(){return this._ne},Ho.prototype.getNorthWest=function(){return new ao(this.getWest(),this.getNorth())},Ho.prototype.getSouthEast=function(){return new ao(this.getEast(),this.getSouth())},Ho.prototype.getWest=function(){return this._sw.lng},Ho.prototype.getSouth=function(){return this._sw.lat},Ho.prototype.getEast=function(){return this._ne.lng},Ho.prototype.getNorth=function(){return this._ne.lat},Ho.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Ho.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Ho.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Ho.prototype.contains=function(_){var j=ao.convert(_),ue=j.lng,me=j.lat,Ee=this._sw.lat<=me&&me<=this._ne.lat,Ne=this._sw.lng<=ue&&ue<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Ne=this._sw.lng>=ue&&ue>=this._ne.lng),Ee&&Ne},Ho.convert=function(_){return!_||_ instanceof Ho?_:new Ho(_)};var rA=63710088e-1,ao=function(_,j){if(isNaN(_)||isNaN(j))throw new Error("Invalid LngLat object: ("+_+", "+j+")");if(this.lng=+_,this.lat=+j,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};ao.prototype.wrap=function(){return new ao(b(this.lng,-180,180),this.lat)},ao.prototype.toArray=function(){return[this.lng,this.lat]},ao.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},ao.prototype.distanceTo=function(_){var j=Math.PI/180,ue=this.lat*j,me=_.lat*j,Ee=Math.sin(ue)*Math.sin(me)+Math.cos(ue)*Math.cos(me)*Math.cos((_.lng-this.lng)*j),Ne=rA*Math.acos(Math.min(Ee,1));return Ne},ao.prototype.toBounds=function(_){_===void 0&&(_=0);var j=40075017,ue=360*_/j,me=ue/Math.cos(Math.PI/180*this.lat);return new Ho(new ao(this.lng-me,this.lat-ue),new ao(this.lng+me,this.lat+ue))},ao.convert=function(_){if(_ instanceof ao)return _;if(Array.isArray(_)&&(_.length===2||_.length===3))return new ao(Number(_[0]),Number(_[1]));if(!Array.isArray(_)&&typeof _=="object"&&_!==null)return new ao(Number("lng"in _?_.lng:_.lon),Number(_.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var nA=2*Math.PI*rA;function aA(I){return nA*Math.cos(I*Math.PI/180)}function iA(I){return(180+I)/360}function oA(I){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+I*Math.PI/360)))/360}function sA(I,_){return I/aA(_)}function HL(I){return I*360-180}function Lx(I){var _=180-I*360;return 360/Math.PI*Math.atan(Math.exp(_*Math.PI/180))-90}function VL(I,_){return I*aA(Lx(_))}function GL(I){return 1/Math.cos(I*Math.PI/180)}var Ad=function(_,j,ue){ue===void 0&&(ue=0),this.x=+_,this.y=+j,this.z=+ue};Ad.fromLngLat=function(_,j){j===void 0&&(j=0);var ue=ao.convert(_);return new Ad(iA(ue.lng),oA(ue.lat),sA(j,ue.lat))},Ad.prototype.toLngLat=function(){return new ao(HL(this.x),Lx(this.y))},Ad.prototype.toAltitude=function(){return VL(this.z,this.y)},Ad.prototype.meterInMercatorCoordinateUnits=function(){return 1/nA*GL(Lx(this.y))};var Td=function(_,j,ue){this.z=_,this.x=j,this.y=ue,this.key=K0(0,_,_,j,ue)};Td.prototype.equals=function(_){return this.z===_.z&&this.x===_.x&&this.y===_.y},Td.prototype.url=function(_,j){var ue=UL(this.x,this.y,this.z),me=WL(this.z,this.x,this.y);return _[(this.x+this.y)%_.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(j==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",me).replace("{bbox-epsg-3857}",ue)},Td.prototype.getTilePoint=function(_){var j=Math.pow(2,this.z);return new r((_.x*j-this.x)*Ra,(_.y*j-this.y)*Ra)},Td.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var lA=function(_,j){this.wrap=_,this.canonical=j,this.key=K0(_,j.z,j.z,j.x,j.y)},Vo=function(_,j,ue,me,Ee){this.overscaledZ=_,this.wrap=j,this.canonical=new Td(ue,+me,+Ee),this.key=K0(j,_,ue,me,Ee)};Vo.prototype.equals=function(_){return this.overscaledZ===_.overscaledZ&&this.wrap===_.wrap&&this.canonical.equals(_.canonical)},Vo.prototype.scaledTo=function(_){var j=this.canonical.z-_;return _>this.canonical.z?new Vo(_,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Vo(_,this.wrap,_,this.canonical.x>>j,this.canonical.y>>j)},Vo.prototype.calculateScaledKey=function(_,j){var ue=this.canonical.z-_;return _>this.canonical.z?K0(this.wrap*+j,_,this.canonical.z,this.canonical.x,this.canonical.y):K0(this.wrap*+j,_,_,this.canonical.x>>ue,this.canonical.y>>ue)},Vo.prototype.isChildOf=function(_){if(_.wrap!==this.wrap)return!1;var j=this.canonical.z-_.canonical.z;return _.overscaledZ===0||_.overscaledZ>j&&_.canonical.y===this.canonical.y>>j},Vo.prototype.children=function(_){if(this.overscaledZ>=_)return[new Vo(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var j=this.canonical.z+1,ue=this.canonical.x*2,me=this.canonical.y*2;return[new Vo(j,this.wrap,j,ue,me),new Vo(j,this.wrap,j,ue+1,me),new Vo(j,this.wrap,j,ue,me+1),new Vo(j,this.wrap,j,ue+1,me+1)]},Vo.prototype.isLessThan=function(_){return this.wrap<_.wrap?!0:this.wrap>_.wrap?!1:this.overscaledZ<_.overscaledZ?!0:this.overscaledZ>_.overscaledZ?!1:this.canonical.x<_.canonical.x?!0:this.canonical.x>_.canonical.x?!1:this.canonical.y<_.canonical.y},Vo.prototype.wrapped=function(){return new Vo(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},Vo.prototype.unwrapTo=function(_){return new Vo(this.overscaledZ,_,this.canonical.z,this.canonical.x,this.canonical.y)},Vo.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},Vo.prototype.toUnwrapped=function(){return new lA(this.wrap,this.canonical)},Vo.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},Vo.prototype.getTilePoint=function(_){return this.canonical.getTilePoint(new Ad(_.x-this.wrap,_.y))};function K0(I,_,j,ue,me){I*=2,I<0&&(I=I*-1-1);var Ee=1<0;Ee--)me=1<=this.dim+1||j<-1||j>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(j+1)*this.stride+(_+1)},hh.prototype._unpackMapbox=function(_,j,ue){return(_*256*256+j*256+ue)/10-1e4},hh.prototype._unpackTerrarium=function(_,j,ue){return _*256+j+ue/256-32768},hh.prototype.getPixels=function(){return new cl({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},hh.prototype.backfillBorder=function(_,j,ue){if(this.dim!==_.dim)throw new Error("dem dimension mismatch");var me=j*this.dim,Ee=j*this.dim+this.dim,Ne=ue*this.dim,Qe=ue*this.dim+this.dim;switch(j){case-1:me=Ee-1;break;case 1:Ee=me+1;break}switch(ue){case-1:Ne=Qe-1;break;case 1:Qe=Ne+1;break}for(var dt=-j*this.dim,Tt=-ue*this.dim,Ct=Ne;Ct=0&&Wt[3]>=0&&dt.insert(Qe,Wt[0],Wt[1],Wt[2],Wt[3])}},vh.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new up.VectorTile(new mm(this.rawTileData)).layers,this.sourceLayerCoder=new Cm(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},vh.prototype.query=function(_,j,ue,me){var Ee=this;this.loadVTLayers();for(var Ne=_.params||{},Qe=Ra/_.tileSize/_.scale,dt=Cf(Ne.filter),Tt=_.queryGeometry,Ct=_.queryPadding*Qe,Wt=fA(Tt),or=this.grid.query(Wt.minX-Ct,Wt.minY-Ct,Wt.maxX+Ct,Wt.maxY+Ct),Qt=fA(_.cameraQueryGeometry),xr=this.grid3D.query(Qt.minX-Ct,Qt.minY-Ct,Qt.maxX+Ct,Qt.maxY+Ct,function(Vn,qn,Jn,La){return Ac(_.cameraQueryGeometry,Vn-Ct,qn-Ct,Jn+Ct,La+Ct)}),Ur=0,nn=xr;Urme)Ee=!1;else if(!j)Ee=!0;else if(this.expirationTime=pr.maxzoom)&&pr.visibility!=="none"){a(hr,this.zoom,St);var wr=$t[pr.id]=pr.createBucket({index:Kt.bucketLayerIDs.length,layers:hr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:It,sourceID:this.source});wr.populate(_t,ir,this.tileID.canonical),Kt.bucketLayerIDs.push(hr.map(function(mr){return mr.id}))}}}}var vr,Jr,_r,Br,wn=t.mapObject(ir.glyphDependencies,function(mr){return Object.keys(mr).map(Number)});Object.keys(wn).length?Dt.send("getGlyphs",{uid:this.uid,stacks:wn},function(mr,cr){vr||(vr=mr,Jr=cr,In.call(zt))}):Jr={};var Kr=Object.keys(ir.iconDependencies);Kr.length?Dt.send("getImages",{icons:Kr,source:this.source,tileID:this.tileID,type:"icons"},function(mr,cr){vr||(vr=mr,_r=cr,In.call(zt))}):_r={};var Fn=Object.keys(ir.patternDependencies);Fn.length?Dt.send("getImages",{icons:Fn,source:this.source,tileID:this.tileID,type:"patterns"},function(mr,cr){vr||(vr=mr,Br=cr,In.call(zt))}):Br={},In.call(this);function In(){if(vr)return Mt(vr);if(Jr&&_r&&Br){var mr=new n(Jr),cr=new t.ImageAtlas(_r,Br);for(var zr in $t){var kr=$t[zr];kr instanceof t.SymbolBucket?(a(kr.layers,this.zoom,St),t.performSymbolLayout(kr,Jr,mr.positions,_r,cr.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):kr.hasPattern&&(kr instanceof t.LineBucket||kr instanceof t.FillBucket||kr instanceof t.FillExtrusionBucket)&&(a(kr.layers,this.zoom,St),kr.addFeatures(ir,this.tileID.canonical,cr.patternPositions))}this.status="done",Mt(null,{buckets:t.values($t).filter(function(un){return!un.isEmpty()}),featureIndex:Kt,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:mr.image,imageAtlas:cr,glyphMap:this.returnDependencies?Jr:null,iconMap:this.returnDependencies?_r:null,glyphPositions:this.returnDependencies?mr.positions:null})}}};function a(ht,ut,wt){for(var St=new t.EvaluationParameters(ut),Dt=0,Mt=ht;Dt=0!=!!ut&&ht.reverse()}var x=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,C=function(ut){this._feature=ut,this.extent=t.EXTENT,this.type=ut.type,this.properties=ut.tags,"id"in ut&&!isNaN(ut.id)&&(this.id=parseInt(ut.id,10))};C.prototype.loadGeometry=function(){if(this._feature.type===1){for(var ut=[],wt=0,St=this._feature.geometry;wt"u"&&(St.push(Vt),Kt=St.length-1,Mt[Vt]=Kt),ut.writeVarint(Kt);var $t=wt.properties[Vt],ir=typeof $t;ir!=="string"&&ir!=="boolean"&&ir!=="number"&&($t=JSON.stringify($t));var Mr=ir+":"+$t,Xe=zt[Mr];typeof Xe>"u"&&(Dt.push($t),Xe=Dt.length-1,zt[Mr]=Xe),ut.writeVarint(Xe)}}function W(ht,ut){return(ut<<3)+(ht&7)}function q(ht){return ht<<1^ht>>31}function re(ht,ut){for(var wt=ht.loadGeometry(),St=ht.type,Dt=0,Mt=0,zt=wt.length,Vt=0;Vt>1;he(ht,ut,zt,St,Dt,Mt%2),le(ht,ut,wt,St,zt-1,Mt+1),le(ht,ut,wt,zt+1,Dt,Mt+1)}}function he(ht,ut,wt,St,Dt,Mt){for(;Dt>St;){if(Dt-St>600){var zt=Dt-St+1,Vt=wt-St+1,Kt=Math.log(zt),$t=.5*Math.exp(2*Kt/3),ir=.5*Math.sqrt(Kt*$t*(zt-$t)/zt)*(Vt-zt/2<0?-1:1),Mr=Math.max(St,Math.floor(wt-Vt*$t/zt+ir)),Xe=Math.min(Dt,Math.floor(wt+(zt-Vt)*$t/zt+ir));he(ht,ut,wt,Mr,Xe,Mt)}var je=ut[2*wt+Mt],It=St,_t=Dt;for($(ht,ut,St,wt),ut[2*Dt+Mt]>je&&$(ht,ut,St,Dt);It<_t;){for($(ht,ut,It,_t),It++,_t--;ut[2*It+Mt]je;)_t--}ut[2*St+Mt]===je?$(ht,ut,St,_t):(_t++,$(ht,ut,_t,Dt)),_t<=wt&&(St=_t+1),wt<=_t&&(Dt=_t-1)}}function $(ht,ut,wt,St){Z(ht,wt,St),Z(ut,2*wt,2*St),Z(ut,2*wt+1,2*St+1)}function Z(ht,ut,wt){var St=ht[ut];ht[ut]=ht[wt],ht[wt]=St}function K(ht,ut,wt,St,Dt,Mt,zt){for(var Vt=[0,ht.length-1,0],Kt=[],$t,ir;Vt.length;){var Mr=Vt.pop(),Xe=Vt.pop(),je=Vt.pop();if(Xe-je<=zt){for(var It=je;It<=Xe;It++)$t=ut[2*It],ir=ut[2*It+1],$t>=wt&&$t<=Dt&&ir>=St&&ir<=Mt&&Kt.push(ht[It]);continue}var _t=Math.floor((je+Xe)/2);$t=ut[2*_t],ir=ut[2*_t+1],$t>=wt&&$t<=Dt&&ir>=St&&ir<=Mt&&Kt.push(ht[_t]);var Zt=(Mr+1)%2;(Mr===0?wt<=$t:St<=ir)&&(Vt.push(je),Vt.push(_t-1),Vt.push(Zt)),(Mr===0?Dt>=$t:Mt>=ir)&&(Vt.push(_t+1),Vt.push(Xe),Vt.push(Zt))}return Kt}function Q(ht,ut,wt,St,Dt,Mt){for(var zt=[0,ht.length-1,0],Vt=[],Kt=Dt*Dt;zt.length;){var $t=zt.pop(),ir=zt.pop(),Mr=zt.pop();if(ir-Mr<=Mt){for(var Xe=Mr;Xe<=ir;Xe++)ae(ut[2*Xe],ut[2*Xe+1],wt,St)<=Kt&&Vt.push(ht[Xe]);continue}var je=Math.floor((Mr+ir)/2),It=ut[2*je],_t=ut[2*je+1];ae(It,_t,wt,St)<=Kt&&Vt.push(ht[je]);var Zt=($t+1)%2;($t===0?wt-Dt<=It:St-Dt<=_t)&&(zt.push(Mr),zt.push(je-1),zt.push(Zt)),($t===0?wt+Dt>=It:St+Dt>=_t)&&(zt.push(je+1),zt.push(ir),zt.push(Zt))}return Vt}function ae(ht,ut,wt,St){var Dt=ht-wt,Mt=ut-St;return Dt*Dt+Mt*Mt}var fe=function(ht){return ht[0]},te=function(ht){return ht[1]},ne=function(ut,wt,St,Dt,Mt){wt===void 0&&(wt=fe),St===void 0&&(St=te),Dt===void 0&&(Dt=64),Mt===void 0&&(Mt=Float64Array),this.nodeSize=Dt,this.points=ut;for(var zt=ut.length<65536?Uint16Array:Uint32Array,Vt=this.ids=new zt(ut.length),Kt=this.coords=new Mt(ut.length*2),$t=0;$t=Dt;ir--){var Mr=+Date.now();Kt=this._cluster(Kt,ir),this.trees[ir]=new ne(Kt,ke,We,zt,Float32Array),St&&console.log("z%d: %d clusters in %dms",ir,Kt.length,+Date.now()-Mr)}return St&&console.timeEnd("total time"),this},oe.prototype.getClusters=function(ut,wt){var St=((ut[0]+180)%360+360)%360-180,Dt=Math.max(-90,Math.min(90,ut[1])),Mt=ut[2]===180?180:((ut[2]+180)%360+360)%360-180,zt=Math.max(-90,Math.min(90,ut[3]));if(ut[2]-ut[0]>=360)St=-180,Mt=180;else if(St>Mt){var Vt=this.getClusters([St,Dt,180,zt],wt),Kt=this.getClusters([-180,Dt,Mt,zt],wt);return Vt.concat(Kt)}for(var $t=this.trees[this._limitZoom(wt)],ir=$t.range(Fe(St),Ie(zt),Fe(Mt),Ie(Dt)),Mr=[],Xe=0,je=ir;Xe1?this._map(ir,!0):null,rr=($t<<5)+(wt+1)+this.points.length,sr=0,nr=Xe;sr>5},oe.prototype._getOriginZoom=function(ut){return(ut-this.points.length)%32},oe.prototype._map=function(ut,wt){if(ut.numPoints)return wt?De({},ut.properties):ut.properties;var St=this.points[ut.index].properties,Dt=this.options.map(St);return wt&&Dt===St?De({},Dt):Dt};function de(ht,ut,wt,St,Dt){return{x:ht,y:ut,zoom:1/0,id:wt,parentId:-1,numPoints:St,properties:Dt}}function we(ht,ut){var wt=ht.geometry.coordinates,St=wt[0],Dt=wt[1];return{x:Fe(St),y:Ie(Dt),zoom:1/0,index:ut,parentId:-1}}function Se(ht){return{type:"Feature",id:ht.id,properties:Te(ht),geometry:{type:"Point",coordinates:[Me(ht.x),Ae(ht.y)]}}}function Te(ht){var ut=ht.numPoints,wt=ut>=1e4?Math.round(ut/1e3)+"k":ut>=1e3?Math.round(ut/100)/10+"k":ut;return De(De({},ht.properties),{cluster:!0,cluster_id:ht.id,point_count:ut,point_count_abbreviated:wt})}function Fe(ht){return ht/360+.5}function Ie(ht){var ut=Math.sin(ht*Math.PI/180),wt=.5-.25*Math.log((1+ut)/(1-ut))/Math.PI;return wt<0?0:wt>1?1:wt}function Me(ht){return(ht-.5)*360}function Ae(ht){var ut=(180-ht*360)*Math.PI/180;return 360*Math.atan(Math.exp(ut))/Math.PI-90}function De(ht,ut){for(var wt in ut)ht[wt]=ut[wt];return ht}function ke(ht){return ht.x}function We(ht){return ht.y}function _e(ht,ut,wt,St){for(var Dt=St,Mt=wt-ut>>1,zt=wt-ut,Vt,Kt=ht[ut],$t=ht[ut+1],ir=ht[wt],Mr=ht[wt+1],Xe=ut+3;XeDt)Vt=Xe,Dt=je;else if(je===Dt){var It=Math.abs(Xe-Mt);ItSt&&(Vt-ut>3&&_e(ht,ut,Vt,St),ht[Vt+2]=Dt,wt-Vt>3&&_e(ht,Vt,wt,St))}function Ye(ht,ut,wt,St,Dt,Mt){var zt=Dt-wt,Vt=Mt-St;if(zt!==0||Vt!==0){var Kt=((ht-wt)*zt+(ut-St)*Vt)/(zt*zt+Vt*Vt);Kt>1?(wt=Dt,St=Mt):Kt>0&&(wt+=zt*Kt,St+=Vt*Kt)}return zt=ht-wt,Vt=ut-St,zt*zt+Vt*Vt}function Pe(ht,ut,wt,St){var Dt={id:typeof ht>"u"?null:ht,type:ut,geometry:wt,tags:St,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return Ve(Dt),Dt}function Ve(ht){var ut=ht.geometry,wt=ht.type;if(wt==="Point"||wt==="MultiPoint"||wt==="LineString")Ze(ht,ut);else if(wt==="Polygon"||wt==="MultiLineString")for(var St=0;St0&&(St?zt+=(Dt*$t-Kt*Mt)/2:zt+=Math.sqrt(Math.pow(Kt-Dt,2)+Math.pow($t-Mt,2))),Dt=Kt,Mt=$t}var ir=ut.length-3;ut[2]=1,_e(ut,0,ir,wt),ut[ir+2]=1,ut.size=Math.abs(zt),ut.start=0,ut.end=ut.size}function Et(ht,ut,wt,St){for(var Dt=0;Dt1?1:wt}function Be(ht,ut,wt,St,Dt,Mt,zt,Vt){if(wt/=ut,St/=ut,Mt>=wt&&zt=St)return null;for(var Kt=[],$t=0;$t=wt&&It=St)continue;var _t=[];if(Xe==="Point"||Xe==="MultiPoint")rt(Mr,_t,wt,St,Dt);else if(Xe==="LineString")ot(Mr,_t,wt,St,Dt,!1,Vt.lineMetrics);else if(Xe==="MultiLineString")Oe(Mr,_t,wt,St,Dt,!1);else if(Xe==="Polygon")Oe(Mr,_t,wt,St,Dt,!0);else if(Xe==="MultiPolygon")for(var Zt=0;Zt=wt&&zt<=St&&(ut.push(ht[Mt]),ut.push(ht[Mt+1]),ut.push(ht[Mt+2]))}}function ot(ht,ut,wt,St,Dt,Mt,zt){for(var Vt=qe(ht),Kt=Dt===0?pe:be,$t=ht.start,ir,Mr,Xe=0;Xewt&&(Mr=Kt(Vt,je,It,Zt,rr,wt),zt&&(Vt.start=$t+ir*Mr)):sr>St?nr=wt&&(Mr=Kt(Vt,je,It,Zt,rr,wt),Bt=!0),nr>St&&sr<=St&&(Mr=Kt(Vt,je,It,Zt,rr,St),Bt=!0),!Mt&&Bt&&(zt&&(Vt.end=$t+ir*Mr),ut.push(Vt),Vt=qe(ht)),zt&&($t+=ir)}var hr=ht.length-3;je=ht[hr],It=ht[hr+1],_t=ht[hr+2],sr=Dt===0?je:It,sr>=wt&&sr<=St&&Ce(Vt,je,It,_t),hr=Vt.length-3,Mt&&hr>=3&&(Vt[hr]!==Vt[0]||Vt[hr+1]!==Vt[1])&&Ce(Vt,Vt[0],Vt[1],Vt[2]),Vt.length&&ut.push(Vt)}function qe(ht){var ut=[];return ut.size=ht.size,ut.start=ht.start,ut.end=ht.end,ut}function Oe(ht,ut,wt,St,Dt,Mt){for(var zt=0;ztzt.maxX&&(zt.maxX=ir),Mr>zt.maxY&&(zt.maxY=Mr)}return zt}function Ut(ht,ut,wt,St){var Dt=ut.geometry,Mt=ut.type,zt=[];if(Mt==="Point"||Mt==="MultiPoint")for(var Vt=0;Vt0&&ut.size<(Dt?zt:St)){wt.numPoints+=ut.length/3;return}for(var Vt=[],Kt=0;Ktzt)&&(wt.numSimplified++,Vt.push(ut[Kt]),Vt.push(ut[Kt+1])),wt.numPoints++;Dt&&Ft(Vt,Mt),ht.push(Vt)}function Ft(ht,ut){for(var wt=0,St=0,Dt=ht.length,Mt=Dt-2;St0===ut)for(St=0,Dt=ht.length;St
24)throw new Error("maxZoom should be in the 0-24 range");if(ut.promoteId&&ut.generateId)throw new Error("promoteId and generateId cannot be used together.");var St=Ke(ht,ut);this.tiles={},this.tileCoords=[],wt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",ut.indexMaxZoom,ut.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),St=Re(St,ut),St.length&&this.splitTile(St,0,0,0),wt&&(St.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}lr.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},lr.prototype.splitTile=function(ht,ut,wt,St,Dt,Mt,zt){for(var Vt=[ht,ut,wt,St],Kt=this.options,$t=Kt.debug;Vt.length;){St=Vt.pop(),wt=Vt.pop(),ut=Vt.pop(),ht=Vt.pop();var ir=1<1&&console.time("creation"),Xe=this.tiles[Mr]=Lt(ht,ut,wt,St,Kt),this.tileCoords.push({z:ut,x:wt,y:St}),$t)){$t>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ut,wt,St,Xe.numFeatures,Xe.numPoints,Xe.numSimplified),console.timeEnd("creation"));var je="z"+ut;this.stats[je]=(this.stats[je]||0)+1,this.total++}if(Xe.source=ht,Dt){if(ut===Kt.maxZoom||ut===Dt)continue;var It=1<1&&console.time("clipping");var _t=.5*Kt.buffer/Kt.extent,Zt=.5-_t,rr=.5+_t,sr=1+_t,nr,Bt,hr,pr,wr,vr;nr=Bt=hr=pr=null,wr=Be(ht,ir,wt-_t,wt+rr,0,Xe.minX,Xe.maxX,Kt),vr=Be(ht,ir,wt+Zt,wt+sr,0,Xe.minX,Xe.maxX,Kt),ht=null,wr&&(nr=Be(wr,ir,St-_t,St+rr,1,Xe.minY,Xe.maxY,Kt),Bt=Be(wr,ir,St+Zt,St+sr,1,Xe.minY,Xe.maxY,Kt),wr=null),vr&&(hr=Be(vr,ir,St-_t,St+rr,1,Xe.minY,Xe.maxY,Kt),pr=Be(vr,ir,St+Zt,St+sr,1,Xe.minY,Xe.maxY,Kt),vr=null),$t>1&&console.timeEnd("clipping"),Vt.push(nr||[],ut+1,wt*2,St*2),Vt.push(Bt||[],ut+1,wt*2,St*2+1),Vt.push(hr||[],ut+1,wt*2+1,St*2),Vt.push(pr||[],ut+1,wt*2+1,St*2+1)}}},lr.prototype.getTile=function(ht,ut,wt){var St=this.options,Dt=St.extent,Mt=St.debug;if(ht<0||ht>24)return null;var zt=1<1&&console.log("drilling down to z%d-%d-%d",ht,ut,wt);for(var Kt=ht,$t=ut,ir=wt,Mr;!Mr&&Kt>0;)Kt--,$t=Math.floor($t/2),ir=Math.floor(ir/2),Mr=this.tiles[Or(Kt,$t,ir)];return!Mr||!Mr.source?null:(Mt>1&&console.log("found parent tile z%d-%d-%d",Kt,$t,ir),Mt>1&&console.time("drilling down"),this.splitTile(Mr.source,Kt,$t,ir,ht,ut,wt),Mt>1&&console.timeEnd("drilling down"),this.tiles[Vt]?ct(this.tiles[Vt],Dt):null)};function Or(ht,ut,wt){return((1<=0?0:ge.button},p.remove=function(ge){ge.parentNode&&ge.parentNode.removeChild(ge)};function s(ge,ee,ye){var se,xe,ze,$e=t.browser.devicePixelRatio>1?"@2x":"",ft=t.getJSON(ee.transformRequest(ee.normalizeSpriteURL(ge,$e,".json"),t.ResourceType.SpriteJSON),function(Jt,ur){ft=null,ze||(ze=Jt,se=ur,kt())}),At=t.getImage(ee.transformRequest(ee.normalizeSpriteURL(ge,$e,".png"),t.ResourceType.SpriteImage),function(Jt,ur){At=null,ze||(ze=Jt,xe=ur,kt())});function kt(){if(ze)ye(ze);else if(se&&xe){var Jt=t.browser.getImageData(xe),ur={};for(var yr in se){var Fr=se[yr],Gr=Fr.width,Wr=Fr.height,Vr=Fr.x,qr=Fr.y,ln=Fr.sdf,Cn=Fr.pixelRatio,zn=Fr.stretchX,Zn=Fr.stretchY,$n=Fr.content,Xn=new t.RGBAImage({width:Gr,height:Wr});t.RGBAImage.copy(Jt,Xn,{x:Vr,y:qr},{x:0,y:0},{width:Gr,height:Wr}),ur[yr]={data:Xn,pixelRatio:Cn,sdf:ln,stretchX:zn,stretchY:Zn,content:$n}}ye(null,ur)}}return{cancel:function(){ft&&(ft.cancel(),ft=null),At&&(At.cancel(),At=null)}}}function b(ge){var ee=ge.userImage;if(ee&&ee.render){var ye=ee.render();if(ye)return ge.data.replace(new Uint8Array(ee.data.buffer)),!0}return!1}var g=1,A=function(ge){function ee(){ge.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return ge&&(ee.__proto__=ge),ee.prototype=Object.create(ge&&ge.prototype),ee.prototype.constructor=ee,ee.prototype.isLoaded=function(){return this.loaded},ee.prototype.setLoaded=function(se){if(this.loaded!==se&&(this.loaded=se,se)){for(var xe=0,ze=this.requestors;xe=0?1.2:1))}D.prototype.draw=function(ge){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(ge,this.buffer,this.middle);for(var ee=this.ctx.getImageData(0,0,this.size,this.size),ye=new Uint8ClampedArray(this.size*this.size),se=0;se65535){Jt(new Error("glyphs > 65535 not supported"));return}if(Fr.ranges[Wr]){Jt(null,{stack:ur,id:yr,glyph:Gr});return}var Vr=Fr.requests[Wr];Vr||(Vr=Fr.requests[Wr]=[],M.loadGlyphRange(ur,Wr,se.url,se.requestManager,function(qr,ln){if(ln){for(var Cn in ln)se._doesCharSupportLocalGlyph(+Cn)||(Fr.glyphs[+Cn]=ln[+Cn]);Fr.ranges[Wr]=!0}for(var zn=0,Zn=Vr;zn1&&(kt=ee[++At]);var ur=Math.abs(Jt-kt.left),yr=Math.abs(Jt-kt.right),Fr=Math.min(ur,yr),Gr=void 0,Wr=ze/se*(xe+1);if(kt.isDash){var Vr=xe-Math.abs(Wr);Gr=Math.sqrt(Fr*Fr+Vr*Vr)}else Gr=xe-Math.sqrt(Fr*Fr+Wr*Wr);this.data[ft+Jt]=Math.max(0,Math.min(255,Gr+128))}},k.prototype.addRegularDash=function(ee){for(var ye=ee.length-1;ye>=0;--ye){var se=ee[ye],xe=ee[ye+1];se.zeroLength?ee.splice(ye,1):xe&&xe.isDash===se.isDash&&(xe.left=se.left,ee.splice(ye,1))}var ze=ee[0],$e=ee[ee.length-1];ze.isDash===$e.isDash&&(ze.left=$e.left-this.width,$e.right=ze.right+this.width);for(var ft=this.width*this.nextRow,At=0,kt=ee[At],Jt=0;Jt1&&(kt=ee[++At]);var ur=Math.abs(Jt-kt.left),yr=Math.abs(Jt-kt.right),Fr=Math.min(ur,yr),Gr=kt.isDash?Fr:-Fr;this.data[ft+Jt]=Math.max(0,Math.min(255,Gr+128))}},k.prototype.addDash=function(ee,ye){var se=ye?7:0,xe=2*se+1;if(this.nextRow+xe>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var ze=0,$e=0;$e=se.minX&&ee.x=se.minY&&ee.y0&&(Jt[new t.OverscaledTileID(se.overscaledZ,ft,xe.z,$e,xe.y-1).key]={backfilled:!1},Jt[new t.OverscaledTileID(se.overscaledZ,se.wrap,xe.z,xe.x,xe.y-1).key]={backfilled:!1},Jt[new t.OverscaledTileID(se.overscaledZ,kt,xe.z,At,xe.y-1).key]={backfilled:!1}),xe.y+10&&(ze.resourceTiming=se._resourceTiming,se._resourceTiming=[]),se.fire(new t.Event("data",ze))})},ee.prototype.onAdd=function(se){this.map=se,this.load()},ee.prototype.setData=function(se){var xe=this;return this._data=se,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(ze){if(ze){xe.fire(new t.ErrorEvent(ze));return}var $e={dataType:"source",sourceDataType:"content"};xe._collectResourceTiming&&xe._resourceTiming&&xe._resourceTiming.length>0&&($e.resourceTiming=xe._resourceTiming,xe._resourceTiming=[]),xe.fire(new t.Event("data",$e))}),this},ee.prototype.getClusterExpansionZoom=function(se,xe){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:se,source:this.id},xe),this},ee.prototype.getClusterChildren=function(se,xe){return this.actor.send("geojson.getClusterChildren",{clusterId:se,source:this.id},xe),this},ee.prototype.getClusterLeaves=function(se,xe,ze,$e){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:se,limit:xe,offset:ze},$e),this},ee.prototype._updateWorkerData=function(se){var xe=this;this._loaded=!1;var ze=t.extend({},this.workerOptions),$e=this._data;typeof $e=="string"?(ze.request=this.map._requestManager.transformRequest(t.browser.resolveURL($e),t.ResourceType.Source),ze.request.collectResourceTiming=this._collectResourceTiming):ze.data=JSON.stringify($e),this.actor.send(this.type+".loadData",ze,function(ft,At){xe._removed||At&&At.abandoned||(xe._loaded=!0,At&&At.resourceTiming&&At.resourceTiming[xe.id]&&(xe._resourceTiming=At.resourceTiming[xe.id].slice(0)),xe.actor.send(xe.type+".coalesce",{source:ze.source},null),se(ft))})},ee.prototype.loaded=function(){return this._loaded},ee.prototype.loadTile=function(se,xe){var ze=this,$e=se.actor?"reloadTile":"loadTile";se.actor=this.actor;var ft={type:this.type,uid:se.uid,tileID:se.tileID,zoom:se.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};se.request=this.actor.send($e,ft,function(At,kt){return delete se.request,se.unloadVectorData(),se.aborted?xe(null):At?xe(At):(se.loadVectorData(kt,ze.map.painter,$e==="reloadTile"),xe(null))})},ee.prototype.abortTile=function(se){se.request&&(se.request.cancel(),delete se.request),se.aborted=!0},ee.prototype.unloadTile=function(se){se.unloadVectorData(),this.actor.send("removeTile",{uid:se.uid,type:this.type,source:this.id})},ee.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},ee.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},ee.prototype.hasTransition=function(){return!1},ee}(t.Evented),q=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),re=function(ge){function ee(ye,se,xe,ze){ge.call(this),this.id=ye,this.dispatcher=xe,this.coordinates=se.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(ze),this.options=se}return ge&&(ee.__proto__=ge),ee.prototype=Object.create(ge&&ge.prototype),ee.prototype.constructor=ee,ee.prototype.load=function(se,xe){var ze=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),function($e,ft){ze._loaded=!0,$e?ze.fire(new t.ErrorEvent($e)):ft&&(ze.image=ft,se&&(ze.coordinates=se),xe&&xe(),ze._finishLoading())})},ee.prototype.loaded=function(){return this._loaded},ee.prototype.updateImage=function(se){var xe=this;return!this.image||!se.url?this:(this.options.url=se.url,this.load(se.coordinates,function(){xe.texture=null}),this)},ee.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},ee.prototype.onAdd=function(se){this.map=se,this.load()},ee.prototype.setCoordinates=function(se){var xe=this;this.coordinates=se;var ze=se.map(t.MercatorCoordinate.fromLngLat);this.tileID=ie(ze),this.minzoom=this.maxzoom=this.tileID.z;var $e=ze.map(function(ft){return xe.tileID.getTilePoint(ft)._round()});return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack($e[0].x,$e[0].y,0,0),this._boundsArray.emplaceBack($e[1].x,$e[1].y,t.EXTENT,0),this._boundsArray.emplaceBack($e[3].x,$e[3].y,0,t.EXTENT),this._boundsArray.emplaceBack($e[2].x,$e[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},ee.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var se=this.map.painter.context,xe=se.gl;this.boundsBuffer||(this.boundsBuffer=se.createVertexBuffer(this._boundsArray,q.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(se,this.image,xe.RGBA),this.texture.bind(xe.LINEAR,xe.CLAMP_TO_EDGE));for(var ze in this.tiles){var $e=this.tiles[ze];$e.state!=="loaded"&&($e.state="loaded",$e.texture=this.texture)}}},ee.prototype.loadTile=function(se,xe){this.tileID&&this.tileID.equals(se.tileID.canonical)?(this.tiles[String(se.tileID.wrap)]=se,se.buckets={},xe(null)):(se.state="errored",xe(null))},ee.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},ee.prototype.hasTransition=function(){return!1},ee}(t.Evented);function ie(ge){for(var ee=1/0,ye=1/0,se=-1/0,xe=-1/0,ze=0,$e=ge;ze<$e.length;ze+=1){var ft=$e[ze];ee=Math.min(ee,ft.x),ye=Math.min(ye,ft.y),se=Math.max(se,ft.x),xe=Math.max(xe,ft.y)}var At=se-ee,kt=xe-ye,Jt=Math.max(At,kt),ur=Math.max(0,Math.floor(-Math.log(Jt)/Math.LN2)),yr=Math.pow(2,ur);return new t.CanonicalTileID(ur,Math.floor((ee+se)/2*yr),Math.floor((ye+xe)/2*yr))}var le=function(ge){function ee(ye,se,xe,ze){ge.call(this,ye,se,xe,ze),this.roundZoom=!0,this.type="video",this.options=se}return ge&&(ee.__proto__=ge),ee.prototype=Object.create(ge&&ge.prototype),ee.prototype.constructor=ee,ee.prototype.load=function(){var se=this;this._loaded=!1;var xe=this.options;this.urls=[];for(var ze=0,$e=xe.urls;ze<$e.length;ze+=1){var ft=$e[ze];this.urls.push(this.map._requestManager.transformRequest(ft,t.ResourceType.Source).url)}t.getVideo(this.urls,function(At,kt){se._loaded=!0,At?se.fire(new t.ErrorEvent(At)):kt&&(se.video=kt,se.video.loop=!0,se.video.addEventListener("playing",function(){se.map.triggerRepaint()}),se.map&&se.video.play(),se._finishLoading())})},ee.prototype.pause=function(){this.video&&this.video.pause()},ee.prototype.play=function(){this.video&&this.video.play()},ee.prototype.seek=function(se){if(this.video){var xe=this.video.seekable;sexe.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+xe.start(0)+" and "+xe.end(0)+"-second mark."))):this.video.currentTime=se}},ee.prototype.getVideo=function(){return this.video},ee.prototype.onAdd=function(se){this.map||(this.map=se,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},ee.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var se=this.map.painter.context,xe=se.gl;this.boundsBuffer||(this.boundsBuffer=se.createVertexBuffer(this._boundsArray,q.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(xe.LINEAR,xe.CLAMP_TO_EDGE),xe.texSubImage2D(xe.TEXTURE_2D,0,0,0,xe.RGBA,xe.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(se,this.video,xe.RGBA),this.texture.bind(xe.LINEAR,xe.CLAMP_TO_EDGE));for(var ze in this.tiles){var $e=this.tiles[ze];$e.state!=="loaded"&&($e.state="loaded",$e.texture=this.texture)}}},ee.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},ee.prototype.hasTransition=function(){return this.video&&!this.video.paused},ee}(re),he=function(ge){function ee(ye,se,xe,ze){ge.call(this,ye,se,xe,ze),se.coordinates?(!Array.isArray(se.coordinates)||se.coordinates.length!==4||se.coordinates.some(function($e){return!Array.isArray($e)||$e.length!==2||$e.some(function(ft){return typeof ft!="number"})}))&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+ye,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+ye,null,'missing required property "coordinates"'))),se.animate&&typeof se.animate!="boolean"&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+ye,null,'optional "animate" property must be a boolean value'))),se.canvas?typeof se.canvas!="string"&&!(se.canvas instanceof t.window.HTMLCanvasElement)&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+ye,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+ye,null,'missing required property "canvas"'))),this.options=se,this.animate=se.animate!==void 0?se.animate:!0}return ge&&(ee.__proto__=ge),ee.prototype=Object.create(ge&&ge.prototype),ee.prototype.constructor=ee,ee.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},ee.prototype.getCanvas=function(){return this.canvas},ee.prototype.onAdd=function(se){this.map=se,this.load(),this.canvas&&this.animate&&this.play()},ee.prototype.onRemove=function(){this.pause()},ee.prototype.prepare=function(){var se=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,se=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,se=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var xe=this.map.painter.context,ze=xe.gl;this.boundsBuffer||(this.boundsBuffer=xe.createVertexBuffer(this._boundsArray,q.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(se||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(xe,this.canvas,ze.RGBA,{premultiply:!0});for(var $e in this.tiles){var ft=this.tiles[$e];ft.state!=="loaded"&&(ft.state="loaded",ft.texture=this.texture)}}},ee.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},ee.prototype.hasTransition=function(){return this._playing},ee.prototype._hasInvalidDimensions=function(){for(var se=0,xe=[this.canvas.width,this.canvas.height];sethis.max){var ft=this._getAndRemoveByKey(this.order[0]);ft&&this.onRemove(ft)}return this},we.prototype.has=function(ee){return ee.wrapped().key in this.data},we.prototype.getAndRemove=function(ee){return this.has(ee)?this._getAndRemoveByKey(ee.wrapped().key):null},we.prototype._getAndRemoveByKey=function(ee){var ye=this.data[ee].shift();return ye.timeout&&clearTimeout(ye.timeout),this.data[ee].length===0&&delete this.data[ee],this.order.splice(this.order.indexOf(ee),1),ye.value},we.prototype.getByKey=function(ee){var ye=this.data[ee];return ye?ye[0].value:null},we.prototype.get=function(ee){if(!this.has(ee))return null;var ye=this.data[ee.wrapped().key][0];return ye.value},we.prototype.remove=function(ee,ye){if(!this.has(ee))return this;var se=ee.wrapped().key,xe=ye===void 0?0:this.data[se].indexOf(ye),ze=this.data[se][xe];return this.data[se].splice(xe,1),ze.timeout&&clearTimeout(ze.timeout),this.data[se].length===0&&delete this.data[se],this.onRemove(ze.value),this.order.splice(this.order.indexOf(se),1),this},we.prototype.setMaxSize=function(ee){for(this.max=ee;this.order.length>this.max;){var ye=this._getAndRemoveByKey(this.order[0]);ye&&this.onRemove(ye)}return this},we.prototype.filter=function(ee){var ye=[];for(var se in this.data)for(var xe=0,ze=this.data[se];xe1||(Math.abs(ur)>1&&(Math.abs(ur+Fr)===1?ur+=Fr:Math.abs(ur-Fr)===1&&(ur-=Fr)),!(!Jt.dem||!kt.dem)&&(kt.dem.backfillBorder(Jt.dem,ur,yr),kt.neighboringTiles&&kt.neighboringTiles[Gr]&&(kt.neighboringTiles[Gr].backfilled=!0)))}},ee.prototype.getTile=function(se){return this.getTileByID(se.key)},ee.prototype.getTileByID=function(se){return this._tiles[se]},ee.prototype._retainLoadedChildren=function(se,xe,ze,$e){for(var ft in this._tiles){var At=this._tiles[ft];if(!($e[ft]||!At.hasData()||At.tileID.overscaledZ<=xe||At.tileID.overscaledZ>ze)){for(var kt=At.tileID;At&&At.tileID.overscaledZ>xe+1;){var Jt=At.tileID.scaledTo(At.tileID.overscaledZ-1);At=this._tiles[Jt.key],At&&At.hasData()&&(kt=Jt)}for(var ur=kt;ur.overscaledZ>xe;)if(ur=ur.scaledTo(ur.overscaledZ-1),se[ur.key]){$e[kt.key]=kt;break}}}},ee.prototype.findLoadedParent=function(se,xe){if(se.key in this._loadedParentTiles){var ze=this._loadedParentTiles[se.key];return ze&&ze.tileID.overscaledZ>=xe?ze:null}for(var $e=se.overscaledZ-1;$e>=xe;$e--){var ft=se.scaledTo($e),At=this._getLoadedTile(ft);if(At)return At}},ee.prototype._getLoadedTile=function(se){var xe=this._tiles[se.key];if(xe&&xe.hasData())return xe;var ze=this._cache.getByKey(se.wrapped().key);return ze},ee.prototype.updateCacheSize=function(se){var xe=Math.ceil(se.width/this._source.tileSize)+1,ze=Math.ceil(se.height/this._source.tileSize)+1,$e=xe*ze,ft=5,At=Math.floor($e*ft),kt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,At):At;this._cache.setMaxSize(kt)},ee.prototype.handleWrapJump=function(se){var xe=this._prevLng===void 0?se:this._prevLng,ze=se-xe,$e=ze/360,ft=Math.round($e);if(this._prevLng=se,ft){var At={};for(var kt in this._tiles){var Jt=this._tiles[kt];Jt.tileID=Jt.tileID.unwrapTo(Jt.tileID.wrap+ft),At[Jt.tileID.key]=Jt}this._tiles=At;for(var ur in this._timers)clearTimeout(this._timers[ur]),delete this._timers[ur];for(var yr in this._tiles){var Fr=this._tiles[yr];this._setTileReloadTimer(yr,Fr)}}},ee.prototype.update=function(se){var xe=this;if(this.transform=se,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(se),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var ze;this.used?this._source.tileID?ze=se.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(ha){return new t.OverscaledTileID(ha.canonical.z,ha.wrap,ha.canonical.z,ha.canonical.x,ha.canonical.y)}):(ze=se.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(ze=ze.filter(function(ha){return xe._source.hasTile(ha)}))):ze=[];var $e=se.coveringZoomLevel(this._source),ft=Math.max($e-ee.maxOverzooming,this._source.minzoom),At=Math.max($e+ee.maxUnderzooming,this._source.minzoom),kt=this._updateRetainedTiles(ze,$e);if(Kt(this._source.type)){for(var Jt={},ur={},yr=Object.keys(kt),Fr=0,Gr=yr;Frthis._source.maxzoom){var ln=Vr.children(this._source.maxzoom)[0],Cn=this.getTile(ln);if(!!Cn&&Cn.hasData()){ze[ln.key]=ln;continue}}else{var zn=Vr.children(this._source.maxzoom);if(ze[zn[0].key]&&ze[zn[1].key]&&ze[zn[2].key]&&ze[zn[3].key])continue}for(var Zn=qr.wasRequested(),$n=Vr.overscaledZ-1;$n>=ft;--$n){var Xn=Vr.scaledTo($n);if($e[Xn.key]||($e[Xn.key]=!0,qr=this.getTile(Xn),!qr&&Zn&&(qr=this._addTile(Xn)),qr&&(ze[Xn.key]=Xn,Zn=qr.wasRequested(),qr.hasData())))break}}}return ze},ee.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var se in this._tiles){for(var xe=[],ze=void 0,$e=this._tiles[se].tileID;$e.overscaledZ>0;){if($e.key in this._loadedParentTiles){ze=this._loadedParentTiles[$e.key];break}xe.push($e.key);var ft=$e.scaledTo($e.overscaledZ-1);if(ze=this._getLoadedTile(ft),ze)break;$e=ft}for(var At=0,kt=xe;At0)&&(xe.hasData()&&xe.state!=="reloading"?this._cache.add(xe.tileID,xe,xe.getExpiryTimeout()):(xe.aborted=!0,this._abortTile(xe),this._unloadTile(xe))))},ee.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var se in this._tiles)this._removeTile(se);this._cache.reset()},ee.prototype.tilesIn=function(se,xe,ze){var $e=this,ft=[],At=this.transform;if(!At)return ft;for(var kt=ze?At.getCameraQueryGeometry(se):se,Jt=se.map(function($n){return At.pointCoordinate($n)}),ur=kt.map(function($n){return At.pointCoordinate($n)}),yr=this.getIds(),Fr=1/0,Gr=1/0,Wr=-1/0,Vr=-1/0,qr=0,ln=ur;qr=0&&xa[1].y+ha>=0){var Sa=Jt.map(function(Xa){return na.getTilePoint(Xa)}),Oa=ur.map(function(Xa){return na.getTilePoint(Xa)});ft.push({tile:Xn,tileID:na,queryGeometry:Sa,cameraQueryGeometry:Oa,scale:va})}}},Zn=0;Zn=t.browser.now())return!0}return!1},ee.prototype.setFeatureState=function(se,xe,ze){se=se||"_geojsonTileLayer",this._state.updateState(se,xe,ze)},ee.prototype.removeFeatureState=function(se,xe,ze){se=se||"_geojsonTileLayer",this._state.removeFeatureState(se,xe,ze)},ee.prototype.getFeatureState=function(se,xe){return se=se||"_geojsonTileLayer",this._state.getState(se,xe)},ee.prototype.setDependencies=function(se,xe,ze){var $e=this._tiles[se];$e&&$e.setDependencies(xe,ze)},ee.prototype.reloadTilesForDependencies=function(se,xe){for(var ze in this._tiles){var $e=this._tiles[ze];$e.hasDependency(se,xe)&&this._reloadTile(ze,"reloading")}this._cache.filter(function(ft){return!ft.hasDependency(se,xe)})},ee}(t.Evented);zt.maxOverzooming=10,zt.maxUnderzooming=3;function Vt(ge,ee){var ye=Math.abs(ge.wrap*2)-+(ge.wrap<0),se=Math.abs(ee.wrap*2)-+(ee.wrap<0);return ge.overscaledZ-ee.overscaledZ||se-ye||ee.canonical.y-ge.canonical.y||ee.canonical.x-ge.canonical.x}function Kt(ge){return ge==="raster"||ge==="image"||ge==="video"}function $t(){return new t.window.Worker(um.workerUrl)}var ir="mapboxgl_preloaded_worker_pool",Mr=function(){this.active={}};Mr.prototype.acquire=function(ee){if(!this.workers)for(this.workers=[];this.workers.length0?(xe-$e)/ft:0;return this.points[ze].mult(1-At).add(this.points[ye].mult(At))};var mr=function(ee,ye,se){var xe=this.boxCells=[],ze=this.circleCells=[];this.xCellCount=Math.ceil(ee/se),this.yCellCount=Math.ceil(ye/se);for(var $e=0;$ethis.width||xe<0||ye>this.height)return ze?!1:[];var ft=[];if(ee<=0&&ye<=0&&this.width<=se&&this.height<=xe){if(ze)return!0;for(var At=0;At0:ft}},mr.prototype._queryCircle=function(ee,ye,se,xe,ze){var $e=ee-se,ft=ee+se,At=ye-se,kt=ye+se;if(ft<0||$e>this.width||kt<0||At>this.height)return xe?!1:[];var Jt=[],ur={hitTest:xe,circle:{x:ee,y:ye,radius:se},seenUids:{box:{},circle:{}}};return this._forEachCell($e,At,ft,kt,this._queryCellCircle,Jt,ur,ze),xe?Jt.length>0:Jt},mr.prototype.query=function(ee,ye,se,xe,ze){return this._query(ee,ye,se,xe,!1,ze)},mr.prototype.hitTest=function(ee,ye,se,xe,ze){return this._query(ee,ye,se,xe,!0,ze)},mr.prototype.hitTestCircle=function(ee,ye,se,xe){return this._queryCircle(ee,ye,se,!0,xe)},mr.prototype._queryCell=function(ee,ye,se,xe,ze,$e,ft,At){var kt=ft.seenUids,Jt=this.boxCells[ze];if(Jt!==null)for(var ur=this.bboxes,yr=0,Fr=Jt;yr=ur[Wr+0]&&xe>=ur[Wr+1]&&(!At||At(this.boxKeys[Gr]))){if(ft.hitTest)return $e.push(!0),!0;$e.push({key:this.boxKeys[Gr],x1:ur[Wr],y1:ur[Wr+1],x2:ur[Wr+2],y2:ur[Wr+3]})}}}var Vr=this.circleCells[ze];if(Vr!==null)for(var qr=this.circles,ln=0,Cn=Vr;lnft*ft+At*At},mr.prototype._circleAndRectCollide=function(ee,ye,se,xe,ze,$e,ft){var At=($e-xe)/2,kt=Math.abs(ee-(xe+At));if(kt>At+se)return!1;var Jt=(ft-ze)/2,ur=Math.abs(ye-(ze+Jt));if(ur>Jt+se)return!1;if(kt<=At||ur<=Jt)return!0;var yr=kt-At,Fr=ur-Jt;return yr*yr+Fr*Fr<=se*se};function cr(ge,ee,ye,se,xe){var ze=t.create();return ee?(t.scale(ze,ze,[1/xe,1/xe,1]),ye||t.rotateZ(ze,ze,se.angle)):t.multiply(ze,se.labelPlaneMatrix,ge),ze}function zr(ge,ee,ye,se,xe){if(ee){var ze=t.clone(ge);return t.scale(ze,ze,[xe,xe,1]),ye||t.rotateZ(ze,ze,-se.angle),ze}else return se.glCoordMatrix}function kr(ge,ee){var ye=[ge.x,ge.y,0,1];Nr(ye,ye,ee);var se=ye[3];return{point:new t.Point(ye[0]/se,ye[1]/se),signedDistanceFromCamera:se}}function un(ge,ee){return .5+.5*(ge/ee)}function xn(ge,ee){var ye=ge[0]/ge[3],se=ge[1]/ge[3],xe=ye>=-ee[0]&&ye<=ee[0]&&se>=-ee[1]&&se<=ee[1];return xe}function An(ge,ee,ye,se,xe,ze,$e,ft){var At=se?ge.textSizeData:ge.iconSizeData,kt=t.evaluateSizeForZoom(At,ye.transform.zoom),Jt=[256/ye.width*2+1,256/ye.height*2+1],ur=se?ge.text.dynamicLayoutVertexArray:ge.icon.dynamicLayoutVertexArray;ur.clear();for(var yr=ge.lineVertexArray,Fr=se?ge.text.placedSymbolArray:ge.icon.placedSymbolArray,Gr=ye.transform.width/ye.transform.height,Wr=!1,Vr=0;Vrze)return{useVertical:!0}}return(ge===t.WritingMode.vertical?ee.yye.x)?{needsFlipping:!0}:null}function Qn(ge,ee,ye,se,xe,ze,$e,ft,At,kt,Jt,ur,yr,Fr){var Gr=ee/24,Wr=ge.lineOffsetX*Gr,Vr=ge.lineOffsetY*Gr,qr;if(ge.numGlyphs>1){var ln=ge.glyphStartIndex+ge.numGlyphs,Cn=ge.lineStartIndex,zn=ge.lineStartIndex+ge.lineLength,Zn=bn(Gr,ft,Wr,Vr,ye,Jt,ur,ge,At,ze,yr);if(!Zn)return{notEnoughRoom:!0};var $n=kr(Zn.first.point,$e).point,Xn=kr(Zn.last.point,$e).point;if(se&&!ye){var na=_n(ge.writingMode,$n,Xn,Fr);if(na)return na}qr=[Zn.first];for(var va=ge.glyphStartIndex+1;va0?Oa.point:sa(ur,Sa,ha,1,xe),Ti=_n(ge.writingMode,ha,Xa,Fr);if(Ti)return Ti}var Ka=aa(Gr*ft.getoffsetX(ge.glyphStartIndex),Wr,Vr,ye,Jt,ur,ge.segment,ge.lineStartIndex,ge.lineStartIndex+ge.lineLength,At,ze,yr);if(!Ka)return{notEnoughRoom:!0};qr=[Ka]}for(var li=0,Ra=qr;li0?1:-1,Gr=0;se&&(Fr*=-1,Gr=Math.PI),Fr<0&&(Gr+=Math.PI);for(var Wr=Fr>0?ft+$e:ft+$e+1,Vr=xe,qr=xe,ln=0,Cn=0,zn=Math.abs(yr),Zn=[];ln+Cn<=zn;){if(Wr+=Fr,Wr=At)return null;if(qr=Vr,Zn.push(Vr),Vr=ur[Wr],Vr===void 0){var $n=new t.Point(kt.getx(Wr),kt.gety(Wr)),Xn=kr($n,Jt);if(Xn.signedDistanceFromCamera>0)Vr=ur[Wr]=Xn.point;else{var na=Wr-Fr,va=ln===0?ze:new t.Point(kt.getx(na),kt.gety(na));Vr=sa(va,$n,qr,zn-ln+1,Jt)}}ln+=Cn,Cn=qr.dist(Vr)}var ha=(zn-ln)/Cn,xa=Vr.sub(qr),Sa=xa.mult(ha)._add(qr);Sa._add(xa._unit()._perp()._mult(ye*Fr));var Oa=Gr+Math.atan2(Vr.y-qr.y,Vr.x-qr.x);return Zn.push(Sa),{point:Sa,angle:Oa,path:Zn}}var fa=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ra(ge,ee){for(var ye=0;ye=1;Mi--)Ra.push(Ka.path[Mi]);for(var Li=1;Li0){for(var ja=Ra[0].clone(),ci=Ra[0].clone(),yo=1;yo=Oa.x&&ci.x<=Xa.x&&ja.y>=Oa.y&&ci.y<=Xa.y?Zi=[Ra]:ci.xXa.x||ci.yXa.y?Zi=[]:Zi=t.clipLine([Ra],Oa.x,Oa.y,Xa.x,Xa.y)}for(var Bo=0,ql=Zi;Bo=this.screenRightBoundary||xethis.screenBottomBoundary},an.prototype.isInsideGrid=function(ee,ye,se,xe){return se>=0&&ee=0&&ye0){var zn;return this.prevPlacement&&this.prevPlacement.variableOffsets[yr.crossTileID]&&this.prevPlacement.placements[yr.crossTileID]&&this.prevPlacement.placements[yr.crossTileID].text&&(zn=this.prevPlacement.variableOffsets[yr.crossTileID].anchor),this.variableOffsets[yr.crossTileID]={textOffset:Vr,width:se,height:xe,anchor:ee,textBoxScale:ze,prevAnchor:zn},this.markUsedJustification(Fr,ee,yr,Gr),Fr.allowVerticalPlacement&&(this.markUsedOrientation(Fr,Gr,yr),this.placedOrientations[yr.crossTileID]=Gr),{shift:qr,placedGlyphBoxes:ln}}},Ar.prototype.placeLayerBucketPart=function(ee,ye,se){var xe=this,ze=ee.parameters,$e=ze.bucket,ft=ze.layout,At=ze.posMatrix,kt=ze.textLabelPlaneMatrix,Jt=ze.labelToScreenMatrix,ur=ze.textPixelRatio,yr=ze.holdingForFade,Fr=ze.collisionBoxArray,Gr=ze.partiallyEvaluatedTextSize,Wr=ze.collisionGroup,Vr=ft.get("text-optional"),qr=ft.get("icon-optional"),ln=ft.get("text-allow-overlap"),Cn=ft.get("icon-allow-overlap"),zn=ft.get("text-rotation-alignment")==="map",Zn=ft.get("text-pitch-alignment")==="map",$n=ft.get("icon-text-fit")!=="none",Xn=ft.get("symbol-z-order")==="viewport-y",na=ln&&(Cn||!$e.hasIconData()||qr),va=Cn&&(ln||!$e.hasTextData()||Vr);!$e.collisionArrays&&Fr&&$e.deserializeCollisionBoxes(Fr);var ha=function(Ka,li){if(!ye[Ka.crossTileID]){if(yr){xe.placements[Ka.crossTileID]=new Ln(!1,!1,!1);return}var Ra=!1,Mi=!1,Li=!0,Fi=null,ui={box:null,offscreen:null},Zi={box:null,offscreen:null},ja=null,ci=null,yo=null,Bo=0,ql=0,eu=0;li.textFeatureIndex?Bo=li.textFeatureIndex:Ka.useRuntimeCollisionCircles&&(Bo=Ka.featureIndex),li.verticalTextFeatureIndex&&(ql=li.verticalTextFeatureIndex);var Yu=li.textBox;if(Yu){var Zu=function(Eo){var ul=t.WritingMode.horizontal;if($e.allowVerticalPlacement&&!Eo&&xe.prevPlacement){var fl=xe.prevPlacement.placedOrientations[Ka.crossTileID];fl&&(xe.placedOrientations[Ka.crossTileID]=fl,ul=fl,xe.markUsedOrientation($e,ul,Ka))}return ul},Ff=function(Eo,ul){if($e.allowVerticalPlacement&&Ka.numVerticalGlyphVertices>0&&li.verticalTextBox)for(var fl=0,ip=$e.writingModes;fl0&&(ws=ws.filter(function(Eo){return Eo!==Fl.anchor}),ws.unshift(Fl.anchor))}var ju=function(Eo,ul,fl){for(var ip=Eo.x2-Eo.x1,O0=Eo.y2-Eo.y1,nx=Ka.textBoxScale,ax=$n&&!Cn?ul:null,xd={box:[],offscreen:!1},ix=ln?ws.length*2:ws.length,op=0;op=ws.length,z0=xe.attemptAnchorPlacement(ox,Eo,ip,O0,nx,zn,Zn,ur,At,Wr,sx,Ka,$e,fl,ax);if(z0&&(xd=z0.placedGlyphBoxes,xd&&xd.box&&xd.box.length)){Ra=!0,Fi=z0.shift;break}}return xd},Au=function(){return ju(Yu,li.iconBox,t.WritingMode.horizontal)},$u=function(){var Eo=li.verticalTextBox,ul=ui&&ui.box&&ui.box.length;return $e.allowVerticalPlacement&&!ul&&Ka.numVerticalGlyphVertices>0&&Eo?ju(Eo,li.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}};Ff(Au,$u),ui&&(Ra=ui.box,Li=ui.offscreen);var tp=Zu(ui&&ui.box);if(!Ra&&xe.prevPlacement){var fh=xe.prevPlacement.variableOffsets[Ka.crossTileID];fh&&(xe.variableOffsets[Ka.crossTileID]=fh,xe.markUsedJustification($e,fh.anchor,Ka,tp))}}else{var Xu=function(Eo,ul){var fl=xe.collisionIndex.placeCollisionBox(Eo,ln,ur,At,Wr.predicate);return fl&&fl.box&&fl.box.length&&(xe.markUsedOrientation($e,ul,Ka),xe.placedOrientations[Ka.crossTileID]=ul),fl},Gs=function(){return Xu(Yu,t.WritingMode.horizontal)},Ac=function(){var Eo=li.verticalTextBox;return $e.allowVerticalPlacement&&Ka.numVerticalGlyphVertices>0&&Eo?Xu(Eo,t.WritingMode.vertical):{box:null,offscreen:null}};Ff(Gs,Ac),Zu(ui&&ui.box&&ui.box.length)}}if(ja=ui,Ra=ja&&ja.box&&ja.box.length>0,Li=ja&&ja.offscreen,Ka.useRuntimeCollisionCircles){var hs=$e.text.placedSymbolArray.get(Ka.centerJustifiedTextSymbolIndex),md=t.evaluateSizeForFeature($e.textSizeData,Gr,hs),Ps=ft.get("text-padding"),yd=Ka.collisionCircleDiameter;ci=xe.collisionIndex.placeCollisionCircles(ln,hs,$e.lineVertexArray,$e.glyphOffsetArray,md,At,kt,Jt,se,Zn,Wr.predicate,yd,Ps),Ra=ln||ci.circles.length>0&&!ci.collisionDetected,Li=Li&&ci.offscreen}if(li.iconFeatureIndex&&(eu=li.iconFeatureIndex),li.iconBox){var rp=function(Eo){var ul=$n&&Fi?Xt(Eo,Fi.x,Fi.y,zn,Zn,xe.transform.angle):Eo;return xe.collisionIndex.placeCollisionBox(ul,Cn,ur,At,Wr.predicate)};Zi&&Zi.box&&Zi.box.length&&li.verticalIconBox?(yo=rp(li.verticalIconBox),Mi=yo.box.length>0):(yo=rp(li.iconBox),Mi=yo.box.length>0),Li=Li&&yo.offscreen}var np=Vr||Ka.numHorizontalGlyphVertices===0&&Ka.numVerticalGlyphVertices===0,fm=qr||Ka.numIconVertices===0;if(!np&&!fm?Mi=Ra=Mi&&Ra:fm?np||(Mi=Mi&&Ra):Ra=Mi&&Ra,Ra&&ja&&ja.box&&(Zi&&Zi.box&&ql?xe.collisionIndex.insertCollisionBox(ja.box,ft.get("text-ignore-placement"),$e.bucketInstanceId,ql,Wr.ID):xe.collisionIndex.insertCollisionBox(ja.box,ft.get("text-ignore-placement"),$e.bucketInstanceId,Bo,Wr.ID)),Mi&&yo&&xe.collisionIndex.insertCollisionBox(yo.box,ft.get("icon-ignore-placement"),$e.bucketInstanceId,eu,Wr.ID),ci&&(Ra&&xe.collisionIndex.insertCollisionCircles(ci.circles,ft.get("text-ignore-placement"),$e.bucketInstanceId,Bo,Wr.ID),se)){var ap=$e.bucketInstanceId,ov=xe.collisionCircleArrays[ap];ov===void 0&&(ov=xe.collisionCircleArrays[ap]=new Gn);for(var sv=0;sv=0;--Sa){var Oa=xa[Sa];ha($e.symbolInstances.get(Oa),$e.collisionArrays[Oa])}else for(var Xa=ee.symbolInstanceStart;Xa=0&&($e>=0&&Jt!==$e?ee.text.placedSymbolArray.get(Jt).crossTileID=0:ee.text.placedSymbolArray.get(Jt).crossTileID=se.crossTileID)}},Ar.prototype.markUsedOrientation=function(ee,ye,se){for(var xe=ye===t.WritingMode.horizontal||ye===t.WritingMode.horizontalOnly?ye:0,ze=ye===t.WritingMode.vertical?ye:0,$e=[se.leftJustifiedTextSymbolIndex,se.centerJustifiedTextSymbolIndex,se.rightJustifiedTextSymbolIndex],ft=0,At=$e;ft0||Zn>0,ha=Cn.numIconVertices>0,xa=xe.placedOrientations[Cn.crossTileID],Sa=xa===t.WritingMode.vertical,Oa=xa===t.WritingMode.horizontal||xa===t.WritingMode.horizontalOnly;if(va){var Xa=Ir(na.text),Ti=Sa?dn:Xa;Gr(ee.text,zn,Ti);var Ka=Oa?dn:Xa;Gr(ee.text,Zn,Ka);var li=na.text.isHidden();[Cn.rightJustifiedTextSymbolIndex,Cn.centerJustifiedTextSymbolIndex,Cn.leftJustifiedTextSymbolIndex].forEach(function(eu){eu>=0&&(ee.text.placedSymbolArray.get(eu).hidden=li||Sa?1:0)}),Cn.verticalPlacedTextSymbolIndex>=0&&(ee.text.placedSymbolArray.get(Cn.verticalPlacedTextSymbolIndex).hidden=li||Oa?1:0);var Ra=xe.variableOffsets[Cn.crossTileID];Ra&&xe.markUsedJustification(ee,Ra.anchor,Cn,xa);var Mi=xe.placedOrientations[Cn.crossTileID];Mi&&(xe.markUsedJustification(ee,"left",Cn,Mi),xe.markUsedOrientation(ee,Mi,Cn))}if(ha){var Li=Ir(na.icon),Fi=!(yr&&Cn.verticalPlacedIconSymbolIndex&&Sa);if(Cn.placedIconSymbolIndex>=0){var ui=Fi?Li:dn;Gr(ee.icon,Cn.numIconVertices,ui),ee.icon.placedSymbolArray.get(Cn.placedIconSymbolIndex).hidden=na.icon.isHidden()}if(Cn.verticalPlacedIconSymbolIndex>=0){var Zi=Fi?dn:Li;Gr(ee.icon,Cn.numVerticalIconVertices,Zi),ee.icon.placedSymbolArray.get(Cn.verticalPlacedIconSymbolIndex).hidden=na.icon.isHidden()}}if(ee.hasIconCollisionBoxData()||ee.hasTextCollisionBoxData()){var ja=ee.collisionArrays[ln];if(ja){var ci=new t.Point(0,0);if(ja.textBox||ja.verticalTextBox){var yo=!0;if(kt){var Bo=xe.variableOffsets[$n];Bo?(ci=ai(Bo.anchor,Bo.width,Bo.height,Bo.textOffset,Bo.textBoxScale),Jt&&ci._rotate(ur?xe.transform.angle:-xe.transform.angle)):yo=!1}ja.textBox&&on(ee.textCollisionBox.collisionVertexArray,na.text.placed,!yo||Sa,ci.x,ci.y),ja.verticalTextBox&&on(ee.textCollisionBox.collisionVertexArray,na.text.placed,!yo||Oa,ci.x,ci.y)}var ql=Boolean(!Oa&&ja.verticalIconBox);ja.iconBox&&on(ee.iconCollisionBox.collisionVertexArray,na.icon.placed,ql,yr?ci.x:0,yr?ci.y:0),ja.verticalIconBox&&on(ee.iconCollisionBox.collisionVertexArray,na.icon.placed,!ql,yr?ci.x:0,yr?ci.y:0)}}},Vr=0;Vree},Ar.prototype.setStale=function(){this.stale=!0};function on(ge,ee,ye,se,xe){ge.emplaceBack(ee?1:0,ye?1:0,se||0,xe||0),ge.emplaceBack(ee?1:0,ye?1:0,se||0,xe||0),ge.emplaceBack(ee?1:0,ye?1:0,se||0,xe||0),ge.emplaceBack(ee?1:0,ye?1:0,se||0,xe||0)}var hn=Math.pow(2,25),vn=Math.pow(2,24),Pn=Math.pow(2,17),Mn=Math.pow(2,16),cn=Math.pow(2,9),Pr=Math.pow(2,8),Er=Math.pow(2,1);function Ir(ge){if(ge.opacity===0&&!ge.placed)return 0;if(ge.opacity===1&&ge.placed)return 4294967295;var ee=ge.placed?1:0,ye=Math.floor(ge.opacity*127);return ye*hn+ee*vn+ye*Pn+ee*Mn+ye*cn+ee*Pr+ye*Er+ee}var dn=0,On=function(ee){this._sortAcrossTiles=ee.layout.get("symbol-z-order")!=="viewport-y"&&ee.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};On.prototype.continuePlacement=function(ee,ye,se,xe,ze){for(var $e=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var ft=ee[this._currentPlacementIndex],At=ye[ft],kt=this.placement.collisionIndex.transform.zoom;if(At.type==="symbol"&&(!At.minzoom||At.minzoom<=kt)&&(!At.maxzoom||At.maxzoom>kt)){this._inProgressLayer||(this._inProgressLayer=new On(At));var Jt=this._inProgressLayer.continuePlacement(se[At.source],this.placement,this._showCollisionBoxes,At,$e);if(Jt)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Yn.prototype.commit=function(ee){return this.placement.commit(ee),this.placement};var gn=512/t.EXTENT/2,kn=function(ee,ye,se){this.tileID=ee,this.indexedSymbolInstances={},this.bucketInstanceId=se;for(var xe=0;xeee.overscaledZ)for(var kt in At){var Jt=At[kt];Jt.tileID.isChildOf(ee)&&Jt.findMatches(ye.symbolInstances,ee,$e)}else{var ur=ee.scaledTo(Number(ft)),yr=At[ur.key];yr&&yr.findMatches(ye.symbolInstances,ee,$e)}}for(var Fr=0;Fr0)throw new Error("Unimplemented: "+$e.map(function(ft){return ft.command}).join(", ")+".");return ze.forEach(function(ft){ft.command!=="setTransition"&&xe[ft.command].apply(xe,ft.args)}),this.stylesheet=se,!0},ee.prototype.addImage=function(se,xe){if(this.getImage(se))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(se,xe),this._availableImages=this.imageManager.listImages(),this._changedImages[se]=!0,this._changed=!0,this.fire(new t.Event("data",{dataType:"style"}))},ee.prototype.updateImage=function(se,xe){this.imageManager.updateImage(se,xe)},ee.prototype.getImage=function(se){return this.imageManager.getImage(se)},ee.prototype.removeImage=function(se){if(!this.getImage(se))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(se),this._availableImages=this.imageManager.listImages(),this._changedImages[se]=!0,this._changed=!0,this.fire(new t.Event("data",{dataType:"style"}))},ee.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},ee.prototype.addSource=function(se,xe,ze){var $e=this;if(ze===void 0&&(ze={}),this._checkLoaded(),this.sourceCaches[se]!==void 0)throw new Error("There is already a source with this ID");if(!xe.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(xe).join(", ")+".");var ft=["vector","raster","geojson","video","image"],At=ft.indexOf(xe.type)>=0;if(!(At&&this._validate(t.validateStyle.source,"sources."+se,xe,null,ze))){this.map&&this.map._collectResourceTiming&&(xe.collectResourceTiming=!0);var kt=this.sourceCaches[se]=new zt(se,xe,this.dispatcher);kt.style=this,kt.setEventedParent(this,function(){return{isSourceLoaded:$e.loaded(),source:kt.serialize(),sourceId:se}}),kt.onAdd(this.map),this._changed=!0}},ee.prototype.removeSource=function(se){if(this._checkLoaded(),this.sourceCaches[se]===void 0)throw new Error("There is no source with this ID");for(var xe in this._layers)if(this._layers[xe].source===se)return this.fire(new t.ErrorEvent(new Error('Source "'+se+'" cannot be removed while layer "'+xe+'" is using it.')));var ze=this.sourceCaches[se];delete this.sourceCaches[se],delete this._updatedSources[se],ze.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:se})),ze.setEventedParent(null),ze.clearTiles(),ze.onRemove&&ze.onRemove(this.map),this._changed=!0},ee.prototype.setGeoJSONSourceData=function(se,xe){this._checkLoaded();var ze=this.sourceCaches[se].getSource();ze.setData(xe),this._changed=!0},ee.prototype.getSource=function(se){return this.sourceCaches[se]&&this.sourceCaches[se].getSource()},ee.prototype.addLayer=function(se,xe,ze){ze===void 0&&(ze={}),this._checkLoaded();var $e=se.id;if(this.getLayer($e)){this.fire(new t.ErrorEvent(new Error('Layer with id "'+$e+'" already exists on this map')));return}var ft;if(se.type==="custom"){if(ua(this,t.validateCustomStyleLayer(se)))return;ft=t.createStyleLayer(se)}else{if(typeof se.source=="object"&&(this.addSource($e,se.source),se=t.clone$1(se),se=t.extend(se,{source:$e})),this._validate(t.validateStyle.layer,"layers."+$e,se,{arrayIndex:-1},ze))return;ft=t.createStyleLayer(se),this._validateLayer(ft),ft.setEventedParent(this,{layer:{id:$e}}),this._serializedLayers[ft.id]=ft.serialize()}var At=xe?this._order.indexOf(xe):this._order.length;if(xe&&At===-1){this.fire(new t.ErrorEvent(new Error('Layer with id "'+xe+'" does not exist on this map.')));return}if(this._order.splice(At,0,$e),this._layerOrderChanged=!0,this._layers[$e]=ft,this._removedLayers[$e]&&ft.source&&ft.type!=="custom"){var kt=this._removedLayers[$e];delete this._removedLayers[$e],kt.type!==ft.type?this._updatedSources[ft.source]="clear":(this._updatedSources[ft.source]="reload",this.sourceCaches[ft.source].pause())}this._updateLayer(ft),ft.onAdd&&ft.onAdd(this.map)},ee.prototype.moveLayer=function(se,xe){this._checkLoaded(),this._changed=!0;var ze=this._layers[se];if(!ze){this.fire(new t.ErrorEvent(new Error("The layer '"+se+"' does not exist in the map's style and cannot be moved.")));return}if(se!==xe){var $e=this._order.indexOf(se);this._order.splice($e,1);var ft=xe?this._order.indexOf(xe):this._order.length;if(xe&&ft===-1){this.fire(new t.ErrorEvent(new Error('Layer with id "'+xe+'" does not exist on this map.')));return}this._order.splice(ft,0,se),this._layerOrderChanged=!0}},ee.prototype.removeLayer=function(se){this._checkLoaded();var xe=this._layers[se];if(!xe){this.fire(new t.ErrorEvent(new Error("The layer '"+se+"' does not exist in the map's style and cannot be removed.")));return}xe.setEventedParent(null);var ze=this._order.indexOf(se);this._order.splice(ze,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[se]=xe,delete this._layers[se],delete this._serializedLayers[se],delete this._updatedLayers[se],delete this._updatedPaintProps[se],xe.onRemove&&xe.onRemove(this.map)},ee.prototype.getLayer=function(se){return this._layers[se]},ee.prototype.hasLayer=function(se){return se in this._layers},ee.prototype.setLayerZoomRange=function(se,xe,ze){this._checkLoaded();var $e=this.getLayer(se);if(!$e){this.fire(new t.ErrorEvent(new Error("The layer '"+se+"' does not exist in the map's style and cannot have zoom extent.")));return}$e.minzoom===xe&&$e.maxzoom===ze||(xe!=null&&($e.minzoom=xe),ze!=null&&($e.maxzoom=ze),this._updateLayer($e))},ee.prototype.setFilter=function(se,xe,ze){ze===void 0&&(ze={}),this._checkLoaded();var $e=this.getLayer(se);if(!$e){this.fire(new t.ErrorEvent(new Error("The layer '"+se+"' does not exist in the map's style and cannot be filtered.")));return}if(!t.deepEqual($e.filter,xe)){if(xe==null){$e.filter=void 0,this._updateLayer($e);return}this._validate(t.validateStyle.filter,"layers."+$e.id+".filter",xe,null,ze)||($e.filter=t.clone$1(xe),this._updateLayer($e))}},ee.prototype.getFilter=function(se){return t.clone$1(this.getLayer(se).filter)},ee.prototype.setLayoutProperty=function(se,xe,ze,$e){$e===void 0&&($e={}),this._checkLoaded();var ft=this.getLayer(se);if(!ft){this.fire(new t.ErrorEvent(new Error("The layer '"+se+"' does not exist in the map's style and cannot be styled.")));return}t.deepEqual(ft.getLayoutProperty(xe),ze)||(ft.setLayoutProperty(xe,ze,$e),this._updateLayer(ft))},ee.prototype.getLayoutProperty=function(se,xe){var ze=this.getLayer(se);if(!ze){this.fire(new t.ErrorEvent(new Error("The layer '"+se+"' does not exist in the map's style.")));return}return ze.getLayoutProperty(xe)},ee.prototype.setPaintProperty=function(se,xe,ze,$e){$e===void 0&&($e={}),this._checkLoaded();var ft=this.getLayer(se);if(!ft){this.fire(new t.ErrorEvent(new Error("The layer '"+se+"' does not exist in the map's style and cannot be styled.")));return}if(!t.deepEqual(ft.getPaintProperty(xe),ze)){var At=ft.setPaintProperty(xe,ze,$e);At&&this._updateLayer(ft),this._changed=!0,this._updatedPaintProps[se]=!0}},ee.prototype.getPaintProperty=function(se,xe){return this.getLayer(se).getPaintProperty(xe)},ee.prototype.setFeatureState=function(se,xe){this._checkLoaded();var ze=se.source,$e=se.sourceLayer,ft=this.sourceCaches[ze];if(ft===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+ze+"' does not exist in the map's style.")));return}var At=ft.getSource().type;if(At==="geojson"&&$e){this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(At==="vector"&&!$e){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}se.id===void 0&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),ft.setFeatureState($e,se.id,xe)},ee.prototype.removeFeatureState=function(se,xe){this._checkLoaded();var ze=se.source,$e=this.sourceCaches[ze];if($e===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+ze+"' does not exist in the map's style.")));return}var ft=$e.getSource().type,At=ft==="vector"?se.sourceLayer:void 0;if(ft==="vector"&&!At){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(xe&&typeof se.id!="string"&&typeof se.id!="number"){this.fire(new t.ErrorEvent(new Error("A feature id is requred to remove its specific state property.")));return}$e.removeFeatureState(At,se.id,xe)},ee.prototype.getFeatureState=function(se){this._checkLoaded();var xe=se.source,ze=se.sourceLayer,$e=this.sourceCaches[xe];if($e===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+xe+"' does not exist in the map's style.")));return}var ft=$e.getSource().type;if(ft==="vector"&&!ze){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return se.id===void 0&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),$e.getFeatureState(ze,se.id)},ee.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},ee.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,function(se){return se.serialize()}),layers:this._serializeLayers(this._order)},function(se){return se!==void 0})},ee.prototype._updateLayer=function(se){this._updatedLayers[se.id]=!0,se.source&&!this._updatedSources[se.source]&&this.sourceCaches[se.source].getSource().type!=="raster"&&(this._updatedSources[se.source]="reload",this.sourceCaches[se.source].pause()),this._changed=!0},ee.prototype._flattenAndSortRenderedFeatures=function(se){for(var xe=this,ze=function(Oa){return xe._layers[Oa].type==="fill-extrusion"},$e={},ft=[],At=this._order.length-1;At>=0;At--){var kt=this._order[At];if(ze(kt)){$e[kt]=At;for(var Jt=0,ur=se;Jt=0;ln--){var Cn=this._order[ln];if(ze(Cn))for(var zn=ft.length-1;zn>=0;zn--){var Zn=ft[zn].feature;if($e[Zn.layer.id] 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`,Kv=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Jv=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 +? a_pos +: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`,Gc=`#ifdef GL_ES +precision highp float; +#endif +uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Qv="uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}",qv=`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; +#define PI 3.141592653589793 +void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Bh="uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}",ed=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,td=` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,Wc=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,fu=` +#define MAX_LINE_DISTANCE 32767.0 +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,cu=`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Iu=` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`,tc=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,rd=` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`,Sl=`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Uh="uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}",Yc=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,nd=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`,Cs=`#define SDF_PX 8.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,hu=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`,yf=`#define SDF_PX 8.0 +#define SDF 1.0 +#define ICON 0.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,_u=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,nl=_i(ts,Bc),El=_i(pi,df),Zc=_i(Fu,No),Ou=_i(ls,zh),Wl=_i(pf,eo),lo=_i(gf,ms),Xc=_i(So,ys),rc=_i(jo,Es),zu=_i(el,Tl),Hh=_i(Oo,kh),Vh=_i(tl,zo),ku=_i(Uc,Ml),Bu=_i(rl,Hc),Ro=_i(Vc,jv),nc=_i(mf,$v),ad=_i(Kv,Jv),jc=_i(Gc,Qv),id=_i(qv,Bh),ac=_i(ed,td),xf=_i(Wc,fu),$c=_i(cu,Iu),Kc=_i(tc,rd),bf=_i(Sl,Uh),Jc=_i(Yc,nd),ic=_i(Cs,hu),Qc=_i(yf,_u);function _i(ge,ee){var ye=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,se={};return ge=ge.replace(ye,function(xe,ze,$e,ft,At){return se[At]=!0,ze==="define"?` +#ifndef HAS_UNIFORM_u_`+At+` +varying `+$e+" "+ft+" "+At+`; +#else +uniform `+$e+" "+ft+" u_"+At+`; +#endif +`:` +#ifdef HAS_UNIFORM_u_`+At+` + `+$e+" "+ft+" "+At+" = u_"+At+`; +#endif +`}),ee=ee.replace(ye,function(xe,ze,$e,ft,At){var kt=ft==="float"?"vec2":"vec4",Jt=At.match(/color/)?"color":kt;return se[At]?ze==="define"?` +#ifndef HAS_UNIFORM_u_`+At+` +uniform lowp float u_`+At+`_t; +attribute `+$e+" "+kt+" a_"+At+`; +varying `+$e+" "+ft+" "+At+`; +#else +uniform `+$e+" "+ft+" u_"+At+`; +#endif +`:Jt==="vec4"?` +#ifndef HAS_UNIFORM_u_`+At+` + `+At+" = a_"+At+`; +#else + `+$e+" "+ft+" "+At+" = u_"+At+`; +#endif +`:` +#ifndef HAS_UNIFORM_u_`+At+` + `+At+" = unpack_mix_"+Jt+"(a_"+At+", u_"+At+`_t); +#else + `+$e+" "+ft+" "+At+" = u_"+At+`; +#endif +`:ze==="define"?` +#ifndef HAS_UNIFORM_u_`+At+` +uniform lowp float u_`+At+`_t; +attribute `+$e+" "+kt+" a_"+At+`; +#else +uniform `+$e+" "+ft+" u_"+At+`; +#endif +`:Jt==="vec4"?` +#ifndef HAS_UNIFORM_u_`+At+` + `+$e+" "+ft+" "+At+" = a_"+At+`; +#else + `+$e+" "+ft+" "+At+" = u_"+At+`; +#endif +`:` +#ifndef HAS_UNIFORM_u_`+At+` + `+$e+" "+ft+" "+At+" = unpack_mix_"+Jt+"(a_"+At+", u_"+At+`_t); +#else + `+$e+" "+ft+" "+At+" = u_"+At+`; +#endif +`}),{fragmentSource:ge,vertexSource:ee}}var Gh=Object.freeze({__proto__:null,prelude:nl,background:El,backgroundPattern:Zc,circle:Ou,clippingMask:Wl,heatmap:lo,heatmapTexture:Xc,collisionBox:rc,collisionCircle:zu,debug:Hh,fill:Vh,fillOutline:ku,fillOutlinePattern:Bu,fillPattern:Ro,fillExtrusion:nc,fillExtrusionPattern:ad,hillshadePrepare:jc,hillshade:id,line:ac,lineGradient:xf,linePattern:$c,lineSDF:Kc,raster:bf,symbolIcon:Jc,symbolSDF:ic,symbolTextAndIcon:Qc}),ks=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};ks.prototype.bind=function(ee,ye,se,xe,ze,$e,ft,At){this.context=ee;for(var kt=this.boundPaintVertexBuffers.length!==xe.length,Jt=0;!kt&&Jt>16,ft>>16],u_pixel_coord_lower:[$e&65535,ft&65535]}}function qc(ge,ee,ye,se){var xe=ye.imageManager.getPattern(ge.from.toString()),ze=ye.imageManager.getPattern(ge.to.toString()),$e=ye.imageManager.getPixelSize(),ft=$e.width,At=$e.height,kt=Math.pow(2,se.tileID.overscaledZ),Jt=se.tileSize*Math.pow(2,ye.transform.tileZoom)/kt,ur=Jt*(se.tileID.canonical.x+se.tileID.wrap*kt),yr=Jt*se.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:xe.tl,u_pattern_br_a:xe.br,u_pattern_tl_b:ze.tl,u_pattern_br_b:ze.br,u_texsize:[ft,At],u_mix:ee.t,u_pattern_size_a:xe.displaySize,u_pattern_size_b:ze.displaySize,u_scale_a:ee.fromScale,u_scale_b:ee.toScale,u_tile_units_to_pixels:1/pn(se,1,ye.transform.tileZoom),u_pixel_coord_upper:[ur>>16,yr>>16],u_pixel_coord_lower:[ur&65535,yr&65535]}}var co=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_lightpos:new t.Uniform3f(ge,ee.u_lightpos),u_lightintensity:new t.Uniform1f(ge,ee.u_lightintensity),u_lightcolor:new t.Uniform3f(ge,ee.u_lightcolor),u_vertical_gradient:new t.Uniform1f(ge,ee.u_vertical_gradient),u_opacity:new t.Uniform1f(ge,ee.u_opacity)}},wf=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_lightpos:new t.Uniform3f(ge,ee.u_lightpos),u_lightintensity:new t.Uniform1f(ge,ee.u_lightintensity),u_lightcolor:new t.Uniform3f(ge,ee.u_lightcolor),u_vertical_gradient:new t.Uniform1f(ge,ee.u_vertical_gradient),u_height_factor:new t.Uniform1f(ge,ee.u_height_factor),u_image:new t.Uniform1i(ge,ee.u_image),u_texsize:new t.Uniform2f(ge,ee.u_texsize),u_pixel_coord_upper:new t.Uniform2f(ge,ee.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(ge,ee.u_pixel_coord_lower),u_scale:new t.Uniform3f(ge,ee.u_scale),u_fade:new t.Uniform1f(ge,ee.u_fade),u_opacity:new t.Uniform1f(ge,ee.u_opacity)}},us=function(ge,ee,ye,se){var xe=ee.style.light,ze=xe.properties.get("position"),$e=[ze.x,ze.y,ze.z],ft=t.create$1();xe.properties.get("anchor")==="viewport"&&t.fromRotation(ft,-ee.transform.angle),t.transformMat3($e,$e,ft);var At=xe.properties.get("color");return{u_matrix:ge,u_lightpos:$e,u_lightintensity:xe.properties.get("intensity"),u_lightcolor:[At.r,At.g,At.b],u_vertical_gradient:+ye,u_opacity:se}},Cl=function(ge,ee,ye,se,xe,ze,$e){return t.extend(us(ge,ee,ye,se),vu(ze,ee,$e),{u_height_factor:-Math.pow(2,xe.overscaledZ)/$e.tileSize/8})},Dl=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix)}},Yl=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_image:new t.Uniform1i(ge,ee.u_image),u_texsize:new t.Uniform2f(ge,ee.u_texsize),u_pixel_coord_upper:new t.Uniform2f(ge,ee.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(ge,ee.u_pixel_coord_lower),u_scale:new t.Uniform3f(ge,ee.u_scale),u_fade:new t.Uniform1f(ge,ee.u_fade)}},Zl=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_world:new t.Uniform2f(ge,ee.u_world)}},Xl=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_world:new t.Uniform2f(ge,ee.u_world),u_image:new t.Uniform1i(ge,ee.u_image),u_texsize:new t.Uniform2f(ge,ee.u_texsize),u_pixel_coord_upper:new t.Uniform2f(ge,ee.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(ge,ee.u_pixel_coord_lower),u_scale:new t.Uniform3f(ge,ee.u_scale),u_fade:new t.Uniform1f(ge,ee.u_fade)}},Bs=function(ge){return{u_matrix:ge}},al=function(ge,ee,ye,se){return t.extend(Bs(ge),vu(ye,ee,se))},Af=function(ge,ee){return{u_matrix:ge,u_world:ee}},Tf=function(ge,ee,ye,se,xe){return t.extend(al(ge,ee,ye,se),{u_world:xe})},oc=function(ge,ee){return{u_camera_to_center_distance:new t.Uniform1f(ge,ee.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(ge,ee.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(ge,ee.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(ge,ee.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(ge,ee.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix)}},od=function(ge,ee,ye,se){var xe=ge.transform,ze,$e;if(se.paint.get("circle-pitch-alignment")==="map"){var ft=pn(ye,1,xe.zoom);ze=!0,$e=[ft,ft]}else ze=!1,$e=xe.pixelsToGLUnits;return{u_camera_to_center_distance:xe.cameraToCenterDistance,u_scale_with_map:+(se.paint.get("circle-pitch-scale")==="map"),u_matrix:ge.translatePosMatrix(ee.posMatrix,ye,se.paint.get("circle-translate"),se.paint.get("circle-translate-anchor")),u_pitch_with_map:+ze,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:$e}},sd=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_camera_to_center_distance:new t.Uniform1f(ge,ee.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(ge,ee.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(ge,ee.u_extrude_scale),u_overscale_factor:new t.Uniform1f(ge,ee.u_overscale_factor)}},ld=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_inv_matrix:new t.UniformMatrix4f(ge,ee.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(ge,ee.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(ge,ee.u_viewport_size)}},ud=function(ge,ee,ye){var se=pn(ye,1,ee.zoom),xe=Math.pow(2,ee.zoom-ye.tileID.overscaledZ),ze=ye.tileID.overscaleFactor();return{u_matrix:ge,u_camera_to_center_distance:ee.cameraToCenterDistance,u_pixels_to_tile_units:se,u_extrude_scale:[ee.pixelsToGLUnits[0]/(se*xe),ee.pixelsToGLUnits[1]/(se*xe)],u_overscale_factor:ze}},sc=function(ge,ee,ye){return{u_matrix:ge,u_inv_matrix:ee,u_camera_to_center_distance:ye.cameraToCenterDistance,u_viewport_size:[ye.width,ye.height]}},Wh=function(ge,ee){return{u_color:new t.UniformColor(ge,ee.u_color),u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_overlay:new t.Uniform1i(ge,ee.u_overlay),u_overlay_scale:new t.Uniform1f(ge,ee.u_overlay_scale)}},Hu=function(ge,ee,ye){return ye===void 0&&(ye=1),{u_matrix:ge,u_color:ee,u_overlay:0,u_overlay_scale:ye}},ko=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix)}},fs=function(ge){return{u_matrix:ge}},Mf=function(ge,ee){return{u_extrude_scale:new t.Uniform1f(ge,ee.u_extrude_scale),u_intensity:new t.Uniform1f(ge,ee.u_intensity),u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix)}},du=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_world:new t.Uniform2f(ge,ee.u_world),u_image:new t.Uniform1i(ge,ee.u_image),u_color_ramp:new t.Uniform1i(ge,ee.u_color_ramp),u_opacity:new t.Uniform1f(ge,ee.u_opacity)}},Sf=function(ge,ee,ye,se){return{u_matrix:ge,u_extrude_scale:pn(ee,1,ye),u_intensity:se}},lc=function(ge,ee,ye,se){var xe=t.create();t.ortho(xe,0,ge.width,ge.height,0,0,1);var ze=ge.context.gl;return{u_matrix:xe,u_world:[ze.drawingBufferWidth,ze.drawingBufferHeight],u_image:ye,u_color_ramp:se,u_opacity:ee.paint.get("heatmap-opacity")}},fd=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_image:new t.Uniform1i(ge,ee.u_image),u_latrange:new t.Uniform2f(ge,ee.u_latrange),u_light:new t.Uniform2f(ge,ee.u_light),u_shadow:new t.UniformColor(ge,ee.u_shadow),u_highlight:new t.UniformColor(ge,ee.u_highlight),u_accent:new t.UniformColor(ge,ee.u_accent)}},Yh=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_image:new t.Uniform1i(ge,ee.u_image),u_dimension:new t.Uniform2f(ge,ee.u_dimension),u_zoom:new t.Uniform1f(ge,ee.u_zoom),u_maxzoom:new t.Uniform1f(ge,ee.u_maxzoom),u_unpack:new t.Uniform4f(ge,ee.u_unpack)}},Zh=function(ge,ee,ye){var se=ye.paint.get("hillshade-shadow-color"),xe=ye.paint.get("hillshade-highlight-color"),ze=ye.paint.get("hillshade-accent-color"),$e=ye.paint.get("hillshade-illumination-direction")*(Math.PI/180);ye.paint.get("hillshade-illumination-anchor")==="viewport"&&($e-=ge.transform.angle);var ft=!ge.options.moving;return{u_matrix:ge.transform.calculatePosMatrix(ee.tileID.toUnwrapped(),ft),u_image:0,u_latrange:jl(ge,ee.tileID),u_light:[ye.paint.get("hillshade-exaggeration"),$e],u_shadow:se,u_highlight:xe,u_accent:ze}},eh=function(ge,ee,ye){var se=ee.stride,xe=t.create();return t.ortho(xe,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(xe,xe,[0,-t.EXTENT,0]),{u_matrix:xe,u_image:1,u_dimension:[se,se],u_zoom:ge.overscaledZ,u_maxzoom:ye,u_unpack:ee.getUnpackVector()}};function jl(ge,ee){var ye=Math.pow(2,ee.canonical.z),se=ee.canonical.y;return[new t.MercatorCoordinate(0,se/ye).toLngLat().lat,new t.MercatorCoordinate(0,(se+1)/ye).toLngLat().lat]}var ho=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_ratio:new t.Uniform1f(ge,ee.u_ratio),u_device_pixel_ratio:new t.Uniform1f(ge,ee.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(ge,ee.u_units_to_pixels)}},il=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_ratio:new t.Uniform1f(ge,ee.u_ratio),u_device_pixel_ratio:new t.Uniform1f(ge,ee.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(ge,ee.u_units_to_pixels),u_image:new t.Uniform1i(ge,ee.u_image)}},th=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_texsize:new t.Uniform2f(ge,ee.u_texsize),u_ratio:new t.Uniform1f(ge,ee.u_ratio),u_device_pixel_ratio:new t.Uniform1f(ge,ee.u_device_pixel_ratio),u_image:new t.Uniform1i(ge,ee.u_image),u_units_to_pixels:new t.Uniform2f(ge,ee.u_units_to_pixels),u_scale:new t.Uniform3f(ge,ee.u_scale),u_fade:new t.Uniform1f(ge,ee.u_fade)}},Xh=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_ratio:new t.Uniform1f(ge,ee.u_ratio),u_device_pixel_ratio:new t.Uniform1f(ge,ee.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(ge,ee.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(ge,ee.u_patternscale_a),u_patternscale_b:new t.Uniform2f(ge,ee.u_patternscale_b),u_sdfgamma:new t.Uniform1f(ge,ee.u_sdfgamma),u_image:new t.Uniform1i(ge,ee.u_image),u_tex_y_a:new t.Uniform1f(ge,ee.u_tex_y_a),u_tex_y_b:new t.Uniform1f(ge,ee.u_tex_y_b),u_mix:new t.Uniform1f(ge,ee.u_mix)}},pu=function(ge,ee,ye){var se=ge.transform;return{u_matrix:Pl(ge,ee,ye),u_ratio:1/pn(ee,1,se.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/se.pixelsToGLUnits[0],1/se.pixelsToGLUnits[1]]}},uc=function(ge,ee,ye){return t.extend(pu(ge,ee,ye),{u_image:0})},Us=function(ge,ee,ye,se){var xe=ge.transform,ze=Ll(ee,xe);return{u_matrix:Pl(ge,ee,ye),u_texsize:ee.imageAtlasTexture.size,u_ratio:1/pn(ee,1,xe.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[ze,se.fromScale,se.toScale],u_fade:se.t,u_units_to_pixels:[1/xe.pixelsToGLUnits[0],1/xe.pixelsToGLUnits[1]]}},fc=function(ge,ee,ye,se,xe){var ze=ge.transform,$e=ge.lineAtlas,ft=Ll(ee,ze),At=ye.layout.get("line-cap")==="round",kt=$e.getDash(se.from,At),Jt=$e.getDash(se.to,At),ur=kt.width*xe.fromScale,yr=Jt.width*xe.toScale;return t.extend(pu(ge,ee,ye),{u_patternscale_a:[ft/ur,-kt.height/2],u_patternscale_b:[ft/yr,-Jt.height/2],u_sdfgamma:$e.width/(Math.min(ur,yr)*256*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:kt.y,u_tex_y_b:Jt.y,u_mix:xe.t})};function Ll(ge,ee){return 1/pn(ge,1,ee.tileZoom)}function Pl(ge,ee,ye){return ge.translatePosMatrix(ee.tileID.posMatrix,ee,ye.paint.get("line-translate"),ye.paint.get("line-translate-anchor"))}var rh=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_tl_parent:new t.Uniform2f(ge,ee.u_tl_parent),u_scale_parent:new t.Uniform1f(ge,ee.u_scale_parent),u_buffer_scale:new t.Uniform1f(ge,ee.u_buffer_scale),u_fade_t:new t.Uniform1f(ge,ee.u_fade_t),u_opacity:new t.Uniform1f(ge,ee.u_opacity),u_image0:new t.Uniform1i(ge,ee.u_image0),u_image1:new t.Uniform1i(ge,ee.u_image1),u_brightness_low:new t.Uniform1f(ge,ee.u_brightness_low),u_brightness_high:new t.Uniform1f(ge,ee.u_brightness_high),u_saturation_factor:new t.Uniform1f(ge,ee.u_saturation_factor),u_contrast_factor:new t.Uniform1f(ge,ee.u_contrast_factor),u_spin_weights:new t.Uniform3f(ge,ee.u_spin_weights)}},Vu=function(ge,ee,ye,se,xe){return{u_matrix:ge,u_tl_parent:ee,u_scale_parent:ye,u_buffer_scale:1,u_fade_t:se.mix,u_opacity:se.opacity*xe.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:xe.paint.get("raster-brightness-min"),u_brightness_high:xe.paint.get("raster-brightness-max"),u_saturation_factor:cc(xe.paint.get("raster-saturation")),u_contrast_factor:gu(xe.paint.get("raster-contrast")),u_spin_weights:Ci(xe.paint.get("raster-hue-rotate"))}};function Ci(ge){ge*=Math.PI/180;var ee=Math.sin(ge),ye=Math.cos(ge);return[(2*ye+1)/3,(-Math.sqrt(3)*ee-ye+1)/3,(Math.sqrt(3)*ee-ye+1)/3]}function gu(ge){return ge>0?1/(1-ge):1+ge}function cc(ge){return ge>0?1-1/(1.001-ge):-ge}var hc=function(ge,ee){return{u_is_size_zoom_constant:new t.Uniform1i(ge,ee.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(ge,ee.u_is_size_feature_constant),u_size_t:new t.Uniform1f(ge,ee.u_size_t),u_size:new t.Uniform1f(ge,ee.u_size),u_camera_to_center_distance:new t.Uniform1f(ge,ee.u_camera_to_center_distance),u_pitch:new t.Uniform1f(ge,ee.u_pitch),u_rotate_symbol:new t.Uniform1i(ge,ee.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(ge,ee.u_aspect_ratio),u_fade_change:new t.Uniform1f(ge,ee.u_fade_change),u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(ge,ee.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(ge,ee.u_coord_matrix),u_is_text:new t.Uniform1i(ge,ee.u_is_text),u_pitch_with_map:new t.Uniform1i(ge,ee.u_pitch_with_map),u_texsize:new t.Uniform2f(ge,ee.u_texsize),u_texture:new t.Uniform1i(ge,ee.u_texture)}},$l=function(ge,ee){return{u_is_size_zoom_constant:new t.Uniform1i(ge,ee.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(ge,ee.u_is_size_feature_constant),u_size_t:new t.Uniform1f(ge,ee.u_size_t),u_size:new t.Uniform1f(ge,ee.u_size),u_camera_to_center_distance:new t.Uniform1f(ge,ee.u_camera_to_center_distance),u_pitch:new t.Uniform1f(ge,ee.u_pitch),u_rotate_symbol:new t.Uniform1i(ge,ee.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(ge,ee.u_aspect_ratio),u_fade_change:new t.Uniform1f(ge,ee.u_fade_change),u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(ge,ee.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(ge,ee.u_coord_matrix),u_is_text:new t.Uniform1i(ge,ee.u_is_text),u_pitch_with_map:new t.Uniform1i(ge,ee.u_pitch_with_map),u_texsize:new t.Uniform2f(ge,ee.u_texsize),u_texture:new t.Uniform1i(ge,ee.u_texture),u_gamma_scale:new t.Uniform1f(ge,ee.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(ge,ee.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(ge,ee.u_is_halo)}},cd=function(ge,ee){return{u_is_size_zoom_constant:new t.Uniform1i(ge,ee.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(ge,ee.u_is_size_feature_constant),u_size_t:new t.Uniform1f(ge,ee.u_size_t),u_size:new t.Uniform1f(ge,ee.u_size),u_camera_to_center_distance:new t.Uniform1f(ge,ee.u_camera_to_center_distance),u_pitch:new t.Uniform1f(ge,ee.u_pitch),u_rotate_symbol:new t.Uniform1i(ge,ee.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(ge,ee.u_aspect_ratio),u_fade_change:new t.Uniform1f(ge,ee.u_fade_change),u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(ge,ee.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(ge,ee.u_coord_matrix),u_is_text:new t.Uniform1i(ge,ee.u_is_text),u_pitch_with_map:new t.Uniform1i(ge,ee.u_pitch_with_map),u_texsize:new t.Uniform2f(ge,ee.u_texsize),u_texsize_icon:new t.Uniform2f(ge,ee.u_texsize_icon),u_texture:new t.Uniform1i(ge,ee.u_texture),u_texture_icon:new t.Uniform1i(ge,ee.u_texture_icon),u_gamma_scale:new t.Uniform1f(ge,ee.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(ge,ee.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(ge,ee.u_is_halo)}},nh=function(ge,ee,ye,se,xe,ze,$e,ft,At,kt){var Jt=xe.transform;return{u_is_size_zoom_constant:+(ge==="constant"||ge==="source"),u_is_size_feature_constant:+(ge==="constant"||ge==="camera"),u_size_t:ee?ee.uSizeT:0,u_size:ee?ee.uSize:0,u_camera_to_center_distance:Jt.cameraToCenterDistance,u_pitch:Jt.pitch/360*2*Math.PI,u_rotate_symbol:+ye,u_aspect_ratio:Jt.width/Jt.height,u_fade_change:xe.options.fadeDuration?xe.symbolFadeChange:1,u_matrix:ze,u_label_plane_matrix:$e,u_coord_matrix:ft,u_is_text:+At,u_pitch_with_map:+se,u_texsize:kt,u_texture:0}},Gu=function(ge,ee,ye,se,xe,ze,$e,ft,At,kt,Jt){var ur=xe.transform;return t.extend(nh(ge,ee,ye,se,xe,ze,$e,ft,At,kt),{u_gamma_scale:se?Math.cos(ur._pitch)*ur.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+Jt})},ah=function(ge,ee,ye,se,xe,ze,$e,ft,At,kt){return t.extend(Gu(ge,ee,ye,se,xe,ze,$e,ft,!0,At,!0),{u_texsize_icon:kt,u_texture_icon:1})},jh=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_opacity:new t.Uniform1f(ge,ee.u_opacity),u_color:new t.UniformColor(ge,ee.u_color)}},Nl=function(ge,ee){return{u_matrix:new t.UniformMatrix4f(ge,ee.u_matrix),u_opacity:new t.Uniform1f(ge,ee.u_opacity),u_image:new t.Uniform1i(ge,ee.u_image),u_pattern_tl_a:new t.Uniform2f(ge,ee.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(ge,ee.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(ge,ee.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(ge,ee.u_pattern_br_b),u_texsize:new t.Uniform2f(ge,ee.u_texsize),u_mix:new t.Uniform1f(ge,ee.u_mix),u_pattern_size_a:new t.Uniform2f(ge,ee.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(ge,ee.u_pattern_size_b),u_scale_a:new t.Uniform1f(ge,ee.u_scale_a),u_scale_b:new t.Uniform1f(ge,ee.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(ge,ee.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(ge,ee.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(ge,ee.u_tile_units_to_pixels)}},Kl=function(ge,ee,ye){return{u_matrix:ge,u_opacity:ee,u_color:ye}},mu=function(ge,ee,ye,se,xe,ze){return t.extend(qc(se,ze,ye,xe),{u_matrix:ge,u_opacity:ee})},yu={fillExtrusion:co,fillExtrusionPattern:wf,fill:Dl,fillPattern:Yl,fillOutline:Zl,fillOutlinePattern:Xl,circle:oc,collisionBox:sd,collisionCircle:ld,debug:Wh,clippingMask:ko,heatmap:Mf,heatmapTexture:du,hillshade:fd,hillshadePrepare:Yh,line:ho,lineGradient:il,linePattern:th,lineSDF:Xh,raster:rh,symbolIcon:hc,symbolSDF:$l,symbolTextAndIcon:cd,background:jh,backgroundPattern:Nl},cs;function xs(ge,ee,ye,se,xe,ze,$e){for(var ft=ge.context,At=ft.gl,kt=ge.useProgram("collisionBox"),Jt=[],ur=0,yr=0,Fr=0;Fr0){var zn=t.create(),Zn=qr;t.mul(zn,Vr.placementInvProjMatrix,ge.transform.glCoordMatrix),t.mul(zn,zn,Vr.placementViewportMatrix),Jt.push({circleArray:Cn,circleOffset:yr,transform:Zn,invTransform:zn}),ur+=Cn.length/4,yr=ur}!ln||kt.draw(ft,At.LINES,Or.disabled,Yt.disabled,ge.colorModeForRenderPass(),Dt.disabled,ud(qr,ge.transform,Wr),ye.id,ln.layoutVertexBuffer,ln.indexBuffer,ln.segments,null,ge.transform.zoom,null,null,ln.collisionVertexBuffer)}}if(!(!$e||!Jt.length)){var $n=ge.useProgram("collisionCircle"),Xn=new t.StructArrayLayout2f1f2i16;Xn.resize(ur*4),Xn._trim();for(var na=0,va=0,ha=Jt;va=0&&(Gr[Vr.associatedIconIndex]={shiftedAnchor:Oa,angle:Xa})}}if(Jt){Fr.clear();for(var Ka=ge.icon.placedSymbolArray,li=0;li0){var $e=t.browser.now(),ft=($e-ge.timeAdded)/ze,At=ee?($e-ee.timeAdded)/ze:-1,kt=ye.getSource(),Jt=xe.coveringZoomLevel({tileSize:kt.tileSize,roundZoom:kt.roundZoom}),ur=!ee||Math.abs(ee.tileID.overscaledZ-Jt)>Math.abs(ge.tileID.overscaledZ-Jt),yr=ur&&ge.refreshedUponExpiration?1:t.clamp(ur?ft:1-At,0,1);return ge.refreshedUponExpiration&&ft>=1&&(ge.refreshedUponExpiration=!1),ee?{opacity:1,mix:1-yr}:{opacity:yr,mix:0}}else return{opacity:1,mix:0}}function gc(ge,ee,ye){var se=ye.paint.get("background-color"),xe=ye.paint.get("background-opacity");if(xe!==0){var ze=ge.context,$e=ze.gl,ft=ge.transform,At=ft.tileSize,kt=ye.paint.get("background-pattern");if(!ge.isPatternMissing(kt)){var Jt=!kt&&se.a===1&&xe===1&&ge.opaquePassEnabledForLayer()?"opaque":"translucent";if(ge.renderPass===Jt){var ur=Yt.disabled,yr=ge.depthModeForSublayer(0,Jt==="opaque"?Or.ReadWrite:Or.ReadOnly),Fr=ge.colorModeForRenderPass(),Gr=ge.useProgram(kt?"backgroundPattern":"background"),Wr=ft.coveringTiles({tileSize:At});kt&&(ze.activeTexture.set($e.TEXTURE0),ge.imageManager.bind(ge.context));for(var Vr=ye.getCrossfadeParameters(),qr=0,ln=Wr;qr "+ye.overscaledZ);var qr=Vr+" "+Fr+"kb";gr(ge,qr),$e.draw(se,xe.TRIANGLES,ft,At,ut.alphaBlended,Dt.disabled,Hu(ze,t.Color.transparent,Wr),Jt,ge.debugBuffer,ge.quadTriangleIndexBuffer,ge.debugSegments)}function gr(ge,ee){ge.initDebugOverlayCanvas();var ye=ge.debugOverlayCanvas,se=ge.context.gl,xe=ge.debugOverlayCanvas.getContext("2d");xe.clearRect(0,0,ye.width,ye.height),xe.shadowColor="white",xe.shadowBlur=2,xe.lineWidth=1.5,xe.strokeStyle="white",xe.textBaseline="top",xe.font="bold "+36+"px Open Sans, sans-serif",xe.fillText(ee,5,5),xe.strokeText(ee,5,5),ge.debugOverlayTexture.update(ye),ge.debugOverlayTexture.bind(se.LINEAR,se.CLAMP_TO_EDGE)}function ar(ge,ee,ye){var se=ge.context,xe=ye.implementation;if(ge.renderPass==="offscreen"){var ze=xe.prerender;ze&&(ge.setCustomLayerDefaults(),se.setColorMode(ge.colorModeForRenderPass()),ze.call(xe,se.gl,ge.transform.customLayerMatrix()),se.setDirty(),ge.setBaseState())}else if(ge.renderPass==="translucent"){ge.setCustomLayerDefaults(),se.setColorMode(ge.colorModeForRenderPass()),se.setStencilMode(Yt.disabled);var $e=xe.renderingMode==="3d"?new Or(ge.context.gl.LEQUAL,Or.ReadWrite,ge.depthRangeFor3D):ge.depthModeForSublayer(0,Or.ReadOnly);se.setDepthMode($e),xe.render(se.gl,ge.transform.customLayerMatrix()),se.setDirty(),ge.setBaseState(),se.bindFramebuffer.set(null)}}var Tr={symbol:Wu,circle:Rl,heatmap:hd,line:Jh,fill:Cf,"fill-extrusion":Df,hillshade:pc,raster:lh,background:gc,debug:Ot,custom:ar},Dr=function(ee,ye){this.context=new Mt(ee),this.transform=ye,this._tileTextures={},this.setup(),this.numSublayers=zt.maxUnderzooming+zt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new la,this.gpuTimers={}};Dr.prototype.resize=function(ee,ye){if(this.width=ee*t.browser.devicePixelRatio,this.height=ye*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var se=0,xe=this.style._order;se256&&this.clearStencil(),se.setColorMode(ut.disabled),se.setDepthMode(Or.disabled);var ze=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var $e=0,ft=ye;$e256&&this.clearStencil();var ee=this.nextStencilID++,ye=this.context.gl;return new Yt({func:ye.NOTEQUAL,mask:255},ee,255,ye.KEEP,ye.KEEP,ye.REPLACE)},Dr.prototype.stencilModeForClipping=function(ee){var ye=this.context.gl;return new Yt({func:ye.EQUAL,mask:255},this._tileClippingMaskIDs[ee.key],0,ye.KEEP,ye.KEEP,ye.REPLACE)},Dr.prototype.stencilConfigForOverlap=function(ee){var ye,se=this.context.gl,xe=ee.sort(function(kt,Jt){return Jt.overscaledZ-kt.overscaledZ}),ze=xe[xe.length-1].overscaledZ,$e=xe[0].overscaledZ-ze+1;if($e>1){this.currentStencilSource=void 0,this.nextStencilID+$e>256&&this.clearStencil();for(var ft={},At=0;At<$e;At++)ft[At+ze]=new Yt({func:se.GEQUAL,mask:255},At+this.nextStencilID,255,se.KEEP,se.KEEP,se.REPLACE);return this.nextStencilID+=$e,[ft,xe]}return[(ye={},ye[ze]=Yt.disabled,ye),xe]},Dr.prototype.colorModeForRenderPass=function(){var ee=this.context.gl;if(this._showOverdrawInspector){var ye=8,se=1/ye;return new ut([ee.CONSTANT_COLOR,ee.ONE],new t.Color(se,se,se,0),[!0,!0,!0,!0])}else return this.renderPass==="opaque"?ut.unblended:ut.alphaBlended},Dr.prototype.depthModeForSublayer=function(ee,ye,se){if(!this.opaquePassEnabledForLayer())return Or.disabled;var xe=1-((1+this.currentLayer)*this.numSublayers+ee)*this.depthEpsilon;return new Or(se||this.context.gl.LEQUAL,ye,[xe,xe])},Dr.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer=0;this.currentLayer--){var zn=this.style._layers[xe[this.currentLayer]],Zn=ze[zn.source],$n=At[zn.source];this._renderTileClippingMasks(zn,$n),this.renderLayer(this,Zn,zn,$n)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?ye.pop():null},Dr.prototype.isPatternMissing=function(ee){if(!ee)return!1;if(!ee.from||!ee.to)return!0;var ye=this.imageManager.getPattern(ee.from.toString()),se=this.imageManager.getPattern(ee.to.toString());return!ye||!se},Dr.prototype.useProgram=function(ee,ye){this.cache=this.cache||{};var se=""+ee+(ye?ye.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[se]||(this.cache[se]=new Uu(this.context,Gh[ee],ye,yu[ee],this._showOverdrawInspector)),this.cache[se]},Dr.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Dr.prototype.setBaseState=function(){var ee=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(ee.FUNC_ADD)},Dr.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var ee=this.context.gl;this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,ee.RGBA)}},Dr.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Yr=function(ee,ye){this.points=ee,this.planes=ye};Yr.fromInvProjectionMatrix=function(ee,ye,se){var xe=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],ze=Math.pow(2,se),$e=xe.map(function(kt){return t.transformMat4([],kt,ee)}).map(function(kt){return t.scale$1([],kt,1/kt[3]/ye*ze)}),ft=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],At=ft.map(function(kt){var Jt=t.sub([],$e[kt[0]],$e[kt[1]]),ur=t.sub([],$e[kt[2]],$e[kt[1]]),yr=t.normalize([],t.cross([],Jt,ur)),Fr=-t.dot(yr,$e[kt[1]]);return yr.concat(Fr)});return new Yr($e,At)};var Qr=function(ee,ye){this.min=ee,this.max=ye,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};Qr.prototype.quadrant=function(ee){for(var ye=[ee%2===0,ee<2],se=t.clone$2(this.min),xe=t.clone$2(this.max),ze=0;ze=0;if($e===0)return 0;$e!==ye.length&&(se=!1)}if(se)return 2;for(var At=0;At<3;At++){for(var kt=Number.MAX_VALUE,Jt=-Number.MAX_VALUE,ur=0;urthis.max[At]-this.min[At])return 0}return 1};var mn=function(ee,ye,se,xe){if(ee===void 0&&(ee=0),ye===void 0&&(ye=0),se===void 0&&(se=0),xe===void 0&&(xe=0),isNaN(ee)||ee<0||isNaN(ye)||ye<0||isNaN(se)||se<0||isNaN(xe)||xe<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=ee,this.bottom=ye,this.left=se,this.right=xe};mn.prototype.interpolate=function(ee,ye,se){return ye.top!=null&&ee.top!=null&&(this.top=t.number(ee.top,ye.top,se)),ye.bottom!=null&&ee.bottom!=null&&(this.bottom=t.number(ee.bottom,ye.bottom,se)),ye.left!=null&&ee.left!=null&&(this.left=t.number(ee.left,ye.left,se)),ye.right!=null&&ee.right!=null&&(this.right=t.number(ee.right,ye.right,se)),this},mn.prototype.getCenter=function(ee,ye){var se=t.clamp((this.left+ee-this.right)/2,0,ee),xe=t.clamp((this.top+ye-this.bottom)/2,0,ye);return new t.Point(se,xe)},mn.prototype.equals=function(ee){return this.top===ee.top&&this.bottom===ee.bottom&&this.left===ee.left&&this.right===ee.right},mn.prototype.clone=function(){return new mn(this.top,this.bottom,this.left,this.right)},mn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Tn=function(ee,ye,se,xe,ze){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=ze===void 0?!0:ze,this._minZoom=ee||0,this._maxZoom=ye||22,this._minPitch=se==null?0:se,this._maxPitch=xe==null?60:xe,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new mn,this._posMatrixCache={},this._alignedPosMatrixCache={}},Nn={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};Tn.prototype.clone=function(){var ee=new Tn(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return ee.tileSize=this.tileSize,ee.latRange=this.latRange,ee.width=this.width,ee.height=this.height,ee._center=this._center,ee.zoom=this.zoom,ee.angle=this.angle,ee._fov=this._fov,ee._pitch=this._pitch,ee._unmodified=this._unmodified,ee._edgeInsets=this._edgeInsets.clone(),ee._calcMatrices(),ee},Nn.minZoom.get=function(){return this._minZoom},Nn.minZoom.set=function(ge){this._minZoom!==ge&&(this._minZoom=ge,this.zoom=Math.max(this.zoom,ge))},Nn.maxZoom.get=function(){return this._maxZoom},Nn.maxZoom.set=function(ge){this._maxZoom!==ge&&(this._maxZoom=ge,this.zoom=Math.min(this.zoom,ge))},Nn.minPitch.get=function(){return this._minPitch},Nn.minPitch.set=function(ge){this._minPitch!==ge&&(this._minPitch=ge,this.pitch=Math.max(this.pitch,ge))},Nn.maxPitch.get=function(){return this._maxPitch},Nn.maxPitch.set=function(ge){this._maxPitch!==ge&&(this._maxPitch=ge,this.pitch=Math.min(this.pitch,ge))},Nn.renderWorldCopies.get=function(){return this._renderWorldCopies},Nn.renderWorldCopies.set=function(ge){ge===void 0?ge=!0:ge===null&&(ge=!1),this._renderWorldCopies=ge},Nn.worldSize.get=function(){return this.tileSize*this.scale},Nn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Nn.size.get=function(){return new t.Point(this.width,this.height)},Nn.bearing.get=function(){return-this.angle/Math.PI*180},Nn.bearing.set=function(ge){var ee=-t.wrap(ge,-180,180)*Math.PI/180;this.angle!==ee&&(this._unmodified=!1,this.angle=ee,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Nn.pitch.get=function(){return this._pitch/Math.PI*180},Nn.pitch.set=function(ge){var ee=t.clamp(ge,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ee&&(this._unmodified=!1,this._pitch=ee,this._calcMatrices())},Nn.fov.get=function(){return this._fov/Math.PI*180},Nn.fov.set=function(ge){ge=Math.max(.01,Math.min(60,ge)),this._fov!==ge&&(this._unmodified=!1,this._fov=ge/180*Math.PI,this._calcMatrices())},Nn.zoom.get=function(){return this._zoom},Nn.zoom.set=function(ge){var ee=Math.min(Math.max(ge,this.minZoom),this.maxZoom);this._zoom!==ee&&(this._unmodified=!1,this._zoom=ee,this.scale=this.zoomScale(ee),this.tileZoom=Math.floor(ee),this.zoomFraction=ee-this.tileZoom,this._constrain(),this._calcMatrices())},Nn.center.get=function(){return this._center},Nn.center.set=function(ge){ge.lat===this._center.lat&&ge.lng===this._center.lng||(this._unmodified=!1,this._center=ge,this._constrain(),this._calcMatrices())},Nn.padding.get=function(){return this._edgeInsets.toJSON()},Nn.padding.set=function(ge){this._edgeInsets.equals(ge)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ge,1),this._calcMatrices())},Nn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Tn.prototype.isPaddingEqual=function(ee){return this._edgeInsets.equals(ee)},Tn.prototype.interpolatePadding=function(ee,ye,se){this._unmodified=!1,this._edgeInsets.interpolate(ee,ye,se),this._constrain(),this._calcMatrices()},Tn.prototype.coveringZoomLevel=function(ee){var ye=(ee.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/ee.tileSize));return Math.max(0,ye)},Tn.prototype.getVisibleUnwrappedCoordinates=function(ee){var ye=[new t.UnwrappedTileID(0,ee)];if(this._renderWorldCopies)for(var se=this.pointCoordinate(new t.Point(0,0)),xe=this.pointCoordinate(new t.Point(this.width,0)),ze=this.pointCoordinate(new t.Point(this.width,this.height)),$e=this.pointCoordinate(new t.Point(0,this.height)),ft=Math.floor(Math.min(se.x,xe.x,ze.x,$e.x)),At=Math.floor(Math.max(se.x,xe.x,ze.x,$e.x)),kt=1,Jt=ft-kt;Jt<=At+kt;Jt++)Jt!==0&&ye.push(new t.UnwrappedTileID(Jt,ee));return ye},Tn.prototype.coveringTiles=function(ee){var ye=this.coveringZoomLevel(ee),se=ye;if(ee.minzoom!==void 0&&yeee.maxzoom&&(ye=ee.maxzoom);var xe=t.MercatorCoordinate.fromLngLat(this.center),ze=Math.pow(2,ye),$e=[ze*xe.x,ze*xe.y,0],ft=Yr.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,ye),At=ee.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(At=ye);var kt=3,Jt=function(Sa){return{aabb:new Qr([Sa*ze,0,0],[(Sa+1)*ze,ze,0]),zoom:0,x:0,y:0,wrap:Sa,fullyVisible:!1}},ur=[],yr=[],Fr=ye,Gr=ee.reparseOverscaled?se:ye;if(this._renderWorldCopies)for(var Wr=1;Wr<=3;Wr++)ur.push(Jt(-Wr)),ur.push(Jt(Wr));for(ur.push(Jt(0));ur.length>0;){var Vr=ur.pop(),qr=Vr.x,ln=Vr.y,Cn=Vr.fullyVisible;if(!Cn){var zn=Vr.aabb.intersects(ft);if(zn===0)continue;Cn=zn===2}var Zn=Vr.aabb.distanceX($e),$n=Vr.aabb.distanceY($e),Xn=Math.max(Math.abs(Zn),Math.abs($n)),na=kt+(1<na&&Vr.zoom>=At){yr.push({tileID:new t.OverscaledTileID(Vr.zoom===Fr?Gr:Vr.zoom,Vr.wrap,Vr.zoom,qr,ln),distanceSq:t.sqrLen([$e[0]-.5-qr,$e[1]-.5-ln])});continue}for(var va=0;va<4;va++){var ha=(qr<<1)+va%2,xa=(ln<<1)+(va>>1);ur.push({aabb:Vr.aabb.quadrant(va),zoom:Vr.zoom+1,x:ha,y:xa,wrap:Vr.wrap,fullyVisible:Cn})}}return yr.sort(function(Sa,Oa){return Sa.distanceSq-Oa.distanceSq}).map(function(Sa){return Sa.tileID})},Tn.prototype.resize=function(ee,ye){this.width=ee,this.height=ye,this.pixelsToGLUnits=[2/ee,-2/ye],this._constrain(),this._calcMatrices()},Nn.unmodified.get=function(){return this._unmodified},Tn.prototype.zoomScale=function(ee){return Math.pow(2,ee)},Tn.prototype.scaleZoom=function(ee){return Math.log(ee)/Math.LN2},Tn.prototype.project=function(ee){var ye=t.clamp(ee.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(ee.lng)*this.worldSize,t.mercatorYfromLat(ye)*this.worldSize)},Tn.prototype.unproject=function(ee){return new t.MercatorCoordinate(ee.x/this.worldSize,ee.y/this.worldSize).toLngLat()},Nn.point.get=function(){return this.project(this.center)},Tn.prototype.setLocationAtPoint=function(ee,ye){var se=this.pointCoordinate(ye),xe=this.pointCoordinate(this.centerPoint),ze=this.locationCoordinate(ee),$e=new t.MercatorCoordinate(ze.x-(se.x-xe.x),ze.y-(se.y-xe.y));this.center=this.coordinateLocation($e),this._renderWorldCopies&&(this.center=this.center.wrap())},Tn.prototype.locationPoint=function(ee){return this.coordinatePoint(this.locationCoordinate(ee))},Tn.prototype.pointLocation=function(ee){return this.coordinateLocation(this.pointCoordinate(ee))},Tn.prototype.locationCoordinate=function(ee){return t.MercatorCoordinate.fromLngLat(ee)},Tn.prototype.coordinateLocation=function(ee){return ee.toLngLat()},Tn.prototype.pointCoordinate=function(ee){var ye=0,se=[ee.x,ee.y,0,1],xe=[ee.x,ee.y,1,1];t.transformMat4(se,se,this.pixelMatrixInverse),t.transformMat4(xe,xe,this.pixelMatrixInverse);var ze=se[3],$e=xe[3],ft=se[0]/ze,At=xe[0]/$e,kt=se[1]/ze,Jt=xe[1]/$e,ur=se[2]/ze,yr=xe[2]/$e,Fr=ur===yr?0:(ye-ur)/(yr-ur);return new t.MercatorCoordinate(t.number(ft,At,Fr)/this.worldSize,t.number(kt,Jt,Fr)/this.worldSize)},Tn.prototype.coordinatePoint=function(ee){var ye=[ee.x*this.worldSize,ee.y*this.worldSize,0,1];return t.transformMat4(ye,ye,this.pixelMatrix),new t.Point(ye[0]/ye[3],ye[1]/ye[3])},Tn.prototype.getBounds=function(){return new t.LngLatBounds().extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},Tn.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},Tn.prototype.setMaxBounds=function(ee){ee?(this.lngRange=[ee.getWest(),ee.getEast()],this.latRange=[ee.getSouth(),ee.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Tn.prototype.calculatePosMatrix=function(ee,ye){ye===void 0&&(ye=!1);var se=ee.key,xe=ye?this._alignedPosMatrixCache:this._posMatrixCache;if(xe[se])return xe[se];var ze=ee.canonical,$e=this.worldSize/this.zoomScale(ze.z),ft=ze.x+Math.pow(2,ze.z)*ee.wrap,At=t.identity(new Float64Array(16));return t.translate(At,At,[ft*$e,ze.y*$e,0]),t.scale(At,At,[$e/t.EXTENT,$e/t.EXTENT,1]),t.multiply(At,ye?this.alignedProjMatrix:this.projMatrix,At),xe[se]=new Float32Array(At),xe[se]},Tn.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Tn.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var ee=-90,ye=90,se=-180,xe=180,ze,$e,ft,At,kt=this.size,Jt=this._unmodified;if(this.latRange){var ur=this.latRange;ee=t.mercatorYfromLat(ur[1])*this.worldSize,ye=t.mercatorYfromLat(ur[0])*this.worldSize,ze=ye-eeye&&(At=ye-Vr)}if(this.lngRange){var qr=Fr.x,ln=kt.x/2;qr-lnxe&&(ft=xe-ln)}(ft!==void 0||At!==void 0)&&(this.center=this.unproject(new t.Point(ft!==void 0?ft:Fr.x,At!==void 0?At:Fr.y))),this._unmodified=Jt,this._constraining=!1}},Tn.prototype._calcMatrices=function(){if(!!this.height){var ee=this._fov/2,ye=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(ee)*this.height;var se=Math.PI/2+this._pitch,xe=this._fov*(.5+ye.y/this.height),ze=Math.sin(xe)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-se-xe,.01,Math.PI-.01)),$e=this.point,ft=$e.x,At=$e.y,kt=Math.cos(Math.PI/2-this._pitch)*ze+this.cameraToCenterDistance,Jt=kt*1.01,ur=this.height/50,yr=new Float64Array(16);t.perspective(yr,this._fov,this.width/this.height,ur,Jt),yr[8]=-ye.x*2/this.width,yr[9]=ye.y*2/this.height,t.scale(yr,yr,[1,-1,1]),t.translate(yr,yr,[0,0,-this.cameraToCenterDistance]),t.rotateX(yr,yr,this._pitch),t.rotateZ(yr,yr,this.angle),t.translate(yr,yr,[-ft,-At,0]),this.mercatorMatrix=t.scale([],yr,[this.worldSize,this.worldSize,this.worldSize]),t.scale(yr,yr,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=yr,this.invProjMatrix=t.invert([],this.projMatrix);var Fr=this.width%2/2,Gr=this.height%2/2,Wr=Math.cos(this.angle),Vr=Math.sin(this.angle),qr=ft-Math.round(ft)+Wr*Fr+Vr*Gr,ln=At-Math.round(At)+Wr*Gr+Vr*Fr,Cn=new Float64Array(yr);if(t.translate(Cn,Cn,[qr>.5?qr-1:qr,ln>.5?ln-1:ln,0]),this.alignedProjMatrix=Cn,yr=t.create(),t.scale(yr,yr,[this.width/2,-this.height/2,1]),t.translate(yr,yr,[1,-1,0]),this.labelPlaneMatrix=yr,yr=t.create(),t.scale(yr,yr,[1,-1,1]),t.translate(yr,yr,[-1,-1,0]),t.scale(yr,yr,[2/this.width,2/this.height,1]),this.glCoordMatrix=yr,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),yr=t.invert(new Float64Array(16),this.pixelMatrix),!yr)throw new Error("failed to invert matrix");this.pixelMatrixInverse=yr,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Tn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var ee=this.pointCoordinate(new t.Point(0,0)),ye=[ee.x*this.worldSize,ee.y*this.worldSize,0,1],se=t.transformMat4(ye,ye,this.pixelMatrix);return se[3]/this.cameraToCenterDistance},Tn.prototype.getCameraPoint=function(){var ee=this._pitch,ye=Math.tan(ee)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,ye))},Tn.prototype.getCameraQueryGeometry=function(ee){var ye=this.getCameraPoint();if(ee.length===1)return[ee[0],ye];for(var se=ye.x,xe=ye.y,ze=ye.x,$e=ye.y,ft=0,At=ee;ft=3&&!ee.some(function(se){return isNaN(se)})){var ye=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(ee[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+ee[2],+ee[1]],zoom:+ee[0],bearing:ye,pitch:+(ee[4]||0)}),!0}return!1},Na.prototype._updateHashUnthrottled=function(){var ee=this.getHashString();try{t.window.history.replaceState(t.window.history.state,"",ee)}catch{}};var Ia={linearity:.3,easing:t.bezier(0,0,.3,1)},_a=t.extend({deceleration:2500,maxSpeed:1400},Ia),za=t.extend({deceleration:20,maxSpeed:1400},Ia),Ai=t.extend({deceleration:1e3,maxSpeed:360},Ia),to=t.extend({deceleration:1e3,maxSpeed:90},Ia),Oi=function(ee){this._map=ee,this.clear()};Oi.prototype.clear=function(){this._inertiaBuffer=[]},Oi.prototype.record=function(ee){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:t.browser.now(),settings:ee})},Oi.prototype._drainInertiaBuffer=function(){for(var ee=this._inertiaBuffer,ye=t.browser.now(),se=160;ee.length>0&&ye-ee[0].time>se;)ee.shift()},Oi.prototype._onMoveEnd=function(ee){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var ye={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},se=0,xe=this._inertiaBuffer;se=this._clickTolerance||this._map.fire(new Ge(ee.type,this._map,ee))},it.prototype.dblclick=function(ee){return this._firePreventable(new Ge(ee.type,this._map,ee))},it.prototype.mouseover=function(ee){this._map.fire(new Ge(ee.type,this._map,ee))},it.prototype.mouseout=function(ee){this._map.fire(new Ge(ee.type,this._map,ee))},it.prototype.touchstart=function(ee){return this._firePreventable(new tt(ee.type,this._map,ee))},it.prototype.touchmove=function(ee){this._map.fire(new tt(ee.type,this._map,ee))},it.prototype.touchend=function(ee){this._map.fire(new tt(ee.type,this._map,ee))},it.prototype.touchcancel=function(ee){this._map.fire(new tt(ee.type,this._map,ee))},it.prototype._firePreventable=function(ee){if(this._map.fire(ee),ee.defaultPrevented)return{}},it.prototype.isEnabled=function(){return!0},it.prototype.isActive=function(){return!1},it.prototype.enable=function(){},it.prototype.disable=function(){};var Nt=function(ee){this._map=ee};Nt.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Nt.prototype.mousemove=function(ee){this._map.fire(new Ge(ee.type,this._map,ee))},Nt.prototype.mousedown=function(){this._delayContextMenu=!0},Nt.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Ge("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Nt.prototype.contextmenu=function(ee){this._delayContextMenu?this._contextMenuEvent=ee:this._map.fire(new Ge(ee.type,this._map,ee)),this._map.listens("contextmenu")&&ee.preventDefault()},Nt.prototype.isEnabled=function(){return!0},Nt.prototype.isActive=function(){return!1},Nt.prototype.enable=function(){},Nt.prototype.disable=function(){};var pt=function(ee,ye){this._map=ee,this._el=ee.getCanvasContainer(),this._container=ee.getContainer(),this._clickTolerance=ye.clickTolerance||1};pt.prototype.isEnabled=function(){return!!this._enabled},pt.prototype.isActive=function(){return!!this._active},pt.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},pt.prototype.disable=function(){!this.isEnabled()||(this._enabled=!1)},pt.prototype.mousedown=function(ee,ye){!this.isEnabled()||!(ee.shiftKey&&ee.button===0)||(p.disableDrag(),this._startPos=this._lastPos=ye,this._active=!0)},pt.prototype.mousemoveWindow=function(ee,ye){if(!!this._active){var se=ye;if(!(this._lastPos.equals(se)||!this._box&&se.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=ee.timeStamp),se.length===this.numTouches&&(this.centroid=qt(ye),this.touches=Ht(se,ye)))},jr.prototype.touchmove=function(ee,ye,se){if(!(this.aborted||!this.centroid)){var xe=Ht(se,ye);for(var ze in this.touches){var $e=this.touches[ze],ft=xe[ze];(!ft||ft.dist($e)>Sr)&&(this.aborted=!0)}}},jr.prototype.touchend=function(ee,ye,se){if((!this.centroid||ee.timeStamp-this.startTime>Cr)&&(this.aborted=!0),se.length===0){var xe=!this.aborted&&this.centroid;if(this.reset(),xe)return xe}};var tn=function(ee){this.singleTap=new jr(ee),this.numTaps=ee.numTaps,this.reset()};tn.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},tn.prototype.touchstart=function(ee,ye,se){this.singleTap.touchstart(ee,ye,se)},tn.prototype.touchmove=function(ee,ye,se){this.singleTap.touchmove(ee,ye,se)},tn.prototype.touchend=function(ee,ye,se){var xe=this.singleTap.touchend(ee,ye,se);if(xe){var ze=ee.timeStamp-this.lastTime0&&(this._active=!0);var xe=Ht(se,ye),ze=new t.Point(0,0),$e=new t.Point(0,0),ft=0;for(var At in xe){var kt=xe[At],Jt=this._touches[At];Jt&&(ze._add(kt),$e._add(kt.sub(Jt)),ft++,xe[At]=kt)}if(this._touches=xe,!(ftMath.abs(ge.x)}var Di=100,Un=function(ge){function ee(){ge.apply(this,arguments)}return ge&&(ee.__proto__=ge),ee.prototype=Object.create(ge&&ge.prototype),ee.prototype.constructor=ee,ee.prototype.reset=function(){ge.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},ee.prototype._start=function(se){this._lastPoints=se,gi(se[0].sub(se[1]))&&(this._valid=!1)},ee.prototype._move=function(se,xe,ze){var $e=se[0].sub(this._lastPoints[0]),ft=se[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically($e,ft,ze.timeStamp),!!this._valid){this._lastPoints=se,this._active=!0;var At=($e.y+ft.y)/2,kt=-.5;return{pitchDelta:At*kt}}},ee.prototype.gestureBeginsVertically=function(se,xe,ze){if(this._valid!==void 0)return this._valid;var $e=2,ft=se.mag()>=$e,At=xe.mag()>=$e;if(!(!ft&&!At)){if(!ft||!At)return this._firstMove===void 0&&(this._firstMove=ze),ze-this._firstMove0==xe.y>0;return gi(se)&&gi(xe)&&kt}},ee}(Kn),Ga={panStep:100,bearingStep:15,pitchStep:10},Ua=function(){var ee=Ga;this._panStep=ee.panStep,this._bearingStep=ee.bearingStep,this._pitchStep=ee.pitchStep};Ua.prototype.reset=function(){this._active=!1},Ua.prototype.keydown=function(ee){var ye=this;if(!(ee.altKey||ee.ctrlKey||ee.metaKey)){var se=0,xe=0,ze=0,$e=0,ft=0;switch(ee.keyCode){case 61:case 107:case 171:case 187:se=1;break;case 189:case 109:case 173:se=-1;break;case 37:ee.shiftKey?xe=-1:(ee.preventDefault(),$e=-1);break;case 39:ee.shiftKey?xe=1:(ee.preventDefault(),$e=1);break;case 38:ee.shiftKey?ze=1:(ee.preventDefault(),ft=-1);break;case 40:ee.shiftKey?ze=-1:(ee.preventDefault(),ft=1);break;default:return}return{cameraAnimation:function(At){var kt=At.getZoom();At.easeTo({duration:300,easeId:"keyboardHandler",easing:ri,zoom:se?Math.round(kt)+se*(ee.shiftKey?2:1):kt,bearing:At.getBearing()+xe*ye._bearingStep,pitch:At.getPitch()+ze*ye._pitchStep,offset:[-$e*ye._panStep,-ft*ye._panStep],center:At.getCenter()},{originalEvent:ee})}}}},Ua.prototype.enable=function(){this._enabled=!0},Ua.prototype.disable=function(){this._enabled=!1,this.reset()},Ua.prototype.isEnabled=function(){return this._enabled},Ua.prototype.isActive=function(){return this._active};function ri(ge){return ge*(2-ge)}var ji=4.000244140625,uo=1/100,mo=1/450,Gi=2,Pi=function(ee,ye){this._map=ee,this._el=ee.getCanvasContainer(),this._handler=ye,this._delta=0,this._defaultZoomRate=uo,this._wheelZoomRate=mo,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};Pi.prototype.setZoomRate=function(ee){this._defaultZoomRate=ee},Pi.prototype.setWheelZoomRate=function(ee){this._wheelZoomRate=ee},Pi.prototype.isEnabled=function(){return!!this._enabled},Pi.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Pi.prototype.isZooming=function(){return!!this._zooming},Pi.prototype.enable=function(ee){this.isEnabled()||(this._enabled=!0,this._aroundCenter=ee&&ee.around==="center")},Pi.prototype.disable=function(){!this.isEnabled()||(this._enabled=!1)},Pi.prototype.wheel=function(ee){if(!!this.isEnabled()){var ye=ee.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?ee.deltaY*40:ee.deltaY,se=t.browser.now(),xe=se-(this._lastWheelEventTime||0);this._lastWheelEventTime=se,ye!==0&&ye%ji===0?this._type="wheel":ye!==0&&Math.abs(ye)<4?this._type="trackpad":xe>400?(this._type=null,this._lastValue=ye,this._timeout=setTimeout(this._onTimeout,40,ee)):this._type||(this._type=Math.abs(xe*ye)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ye+=this._lastValue)),ee.shiftKey&&ye&&(ye=ye/4),this._type&&(this._lastWheelEvent=ee,this._delta-=ye,this._active||this._start(ee)),ee.preventDefault()}},Pi.prototype._onTimeout=function(ee){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(ee)},Pi.prototype._start=function(ee){if(!!this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var ye=p.mousePos(this._el,ee);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(ye)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Pi.prototype.renderFrame=function(){return this._onScrollFrame()},Pi.prototype._onScrollFrame=function(){var ee=this;if(!!this._frameId&&(this._frameId=null,!!this.isActive())){var ye=this._map.transform;if(this._delta!==0){var se=this._type==="wheel"&&Math.abs(this._delta)>ji?this._wheelZoomRate:this._defaultZoomRate,xe=Gi/(1+Math.exp(-Math.abs(this._delta*se)));this._delta<0&&xe!==0&&(xe=1/xe);var ze=typeof this._targetZoom=="number"?ye.zoomScale(this._targetZoom):ye.scale;this._targetZoom=Math.min(ye.maxZoom,Math.max(ye.minZoom,ye.scaleZoom(ze*xe))),this._type==="wheel"&&(this._startZoom=ye.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var $e=typeof this._targetZoom=="number"?this._targetZoom:ye.zoom,ft=this._startZoom,At=this._easing,kt=!1,Jt;if(this._type==="wheel"&&ft&&At){var ur=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),yr=At(ur);Jt=t.number(ft,$e,yr),ur<1?this._frameId||(this._frameId=!0):kt=!0}else Jt=$e,kt=!0;return this._active=!0,kt&&(this._active=!1,this._finishTimeout=setTimeout(function(){ee._zooming=!1,ee._handler._triggerRenderFrame(),delete ee._targetZoom,delete ee._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!kt,zoomDelta:Jt-ye.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Pi.prototype._smoothOutEasing=function(ee){var ye=t.ease;if(this._prevEase){var se=this._prevEase,xe=(t.browser.now()-se.start)/se.duration,ze=se.easing(xe+.01)-se.easing(xe),$e=.27/Math.sqrt(ze*ze+1e-4)*.01,ft=Math.sqrt(.27*.27-$e*$e);ye=t.bezier($e,ft,.25,1)}return this._prevEase={start:t.browser.now(),duration:ee,easing:ye},ye},Pi.prototype.reset=function(){this._active=!1};var wa=function(ee,ye){this._clickZoom=ee,this._tapZoom=ye};wa.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},wa.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},wa.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},wa.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Da=function(){this.reset()};Da.prototype.reset=function(){this._active=!1},Da.prototype.dblclick=function(ee,ye){return ee.preventDefault(),{cameraAnimation:function(se){se.easeTo({duration:300,zoom:se.getZoom()+(ee.shiftKey?-1:1),around:se.unproject(ye)},{originalEvent:ee})}}},Da.prototype.enable=function(){this._enabled=!0},Da.prototype.disable=function(){this._enabled=!1,this.reset()},Da.prototype.isEnabled=function(){return this._enabled},Da.prototype.isActive=function(){return this._active};var Wi=function(){this._tap=new tn({numTouches:1,numTaps:1}),this.reset()};Wi.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Wi.prototype.touchstart=function(ee,ye,se){this._swipePoint||(this._tapTime&&ee.timeStamp-this._tapTime>er&&this.reset(),this._tapTime?se.length>0&&(this._swipePoint=ye[0],this._swipeTouch=se[0].identifier):this._tap.touchstart(ee,ye,se))},Wi.prototype.touchmove=function(ee,ye,se){if(!this._tapTime)this._tap.touchmove(ee,ye,se);else if(this._swipePoint){if(se[0].identifier!==this._swipeTouch)return;var xe=ye[0],ze=xe.y-this._swipePoint.y;return this._swipePoint=xe,ee.preventDefault(),this._active=!0,{zoomDelta:ze/128}}},Wi.prototype.touchend=function(ee,ye,se){if(this._tapTime)this._swipePoint&&se.length===0&&this.reset();else{var xe=this._tap.touchend(ee,ye,se);xe&&(this._tapTime=ee.timeStamp)}},Wi.prototype.touchcancel=function(){this.reset()},Wi.prototype.enable=function(){this._enabled=!0},Wi.prototype.disable=function(){this._enabled=!1,this.reset()},Wi.prototype.isEnabled=function(){return this._enabled},Wi.prototype.isActive=function(){return this._active};var vo=function(ee,ye,se){this._el=ee,this._mousePan=ye,this._touchPan=se};vo.prototype.enable=function(ee){this._inertiaOptions=ee||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},vo.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},vo.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},vo.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var bs=function(ee,ye,se){this._pitchWithRotate=ee.pitchWithRotate,this._mouseRotate=ye,this._mousePitch=se};bs.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},bs.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},bs.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},bs.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Fo=function(ee,ye,se,xe){this._el=ee,this._touchZoom=ye,this._touchRotate=se,this._tapDragZoom=xe,this._rotationDisabled=!1,this._enabled=!0};Fo.prototype.enable=function(ee){this._touchZoom.enable(ee),this._rotationDisabled||this._touchRotate.enable(ee),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Fo.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Fo.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Fo.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Fo.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Fo.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var rs=function(ge){return ge.zoom||ge.drag||ge.pitch||ge.rotate},Ji=function(ge){function ee(){ge.apply(this,arguments)}return ge&&(ee.__proto__=ge),ee.prototype=Object.create(ge&&ge.prototype),ee.prototype.constructor=ee,ee}(t.Event);function Ds(ge){return ge.panDelta&&ge.panDelta.mag()||ge.zoomDelta||ge.bearingDelta||ge.pitchDelta}var zi=function(ee,ye){this._map=ee,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Oi(ee),this._bearingSnap=ye.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ye),t.bindAll(["handleEvent","handleWindowEvent"],this);var se=this._el;this._listeners=[[se,"touchstart",{passive:!1}],[se,"touchmove",{passive:!1}],[se,"touchend",void 0],[se,"touchcancel",void 0],[se,"mousedown",void 0],[se,"mousemove",void 0],[se,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[se,"mouseover",void 0],[se,"mouseout",void 0],[se,"dblclick",void 0],[se,"click",void 0],[se,"keydown",{capture:!1}],[se,"keyup",void 0],[se,"wheel",{passive:!1}],[se,"contextmenu",void 0],[t.window,"blur",void 0]];for(var xe=0,ze=this._listeners;xeft?Math.min(2,Zn):Math.max(.5,Zn),Sa=Math.pow(xa,1-va),Oa=$e.unproject(Cn.add(zn.mult(va*Sa)).mult(ha));$e.setLocationAtPoint($e.renderWorldCopies?Oa.wrap():Oa,Vr)}ze._fireMoveEvents(xe)},function(va){ze._afterEase(xe,va)},se),this},ee.prototype._prepareEase=function(se,xe,ze){ze===void 0&&(ze={}),this._moving=!0,!xe&&!ze.moving&&this.fire(new t.Event("movestart",se)),this._zooming&&!ze.zooming&&this.fire(new t.Event("zoomstart",se)),this._rotating&&!ze.rotating&&this.fire(new t.Event("rotatestart",se)),this._pitching&&!ze.pitching&&this.fire(new t.Event("pitchstart",se))},ee.prototype._fireMoveEvents=function(se){this.fire(new t.Event("move",se)),this._zooming&&this.fire(new t.Event("zoom",se)),this._rotating&&this.fire(new t.Event("rotate",se)),this._pitching&&this.fire(new t.Event("pitch",se))},ee.prototype._afterEase=function(se,xe){if(!(this._easeId&&xe&&this._easeId===xe)){delete this._easeId;var ze=this._zooming,$e=this._rotating,ft=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,ze&&this.fire(new t.Event("zoomend",se)),$e&&this.fire(new t.Event("rotateend",se)),ft&&this.fire(new t.Event("pitchend",se)),this.fire(new t.Event("moveend",se))}},ee.prototype.flyTo=function(se,xe){var ze=this;if(!se.essential&&t.browser.prefersReducedMotion){var $e=t.pick(se,["center","zoom","bearing","pitch","around"]);return this.jumpTo($e,xe)}this.stop(),se=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},se);var ft=this.transform,At=this.getZoom(),kt=this.getBearing(),Jt=this.getPitch(),ur=this.getPadding(),yr="zoom"in se?t.clamp(+se.zoom,ft.minZoom,ft.maxZoom):At,Fr="bearing"in se?this._normalizeBearing(se.bearing,kt):kt,Gr="pitch"in se?+se.pitch:Jt,Wr="padding"in se?se.padding:ft.padding,Vr=ft.zoomScale(yr-At),qr=t.Point.convert(se.offset),ln=ft.centerPoint.add(qr),Cn=ft.pointLocation(ln),zn=t.LngLat.convert(se.center||Cn);this._normalizeCenter(zn);var Zn=ft.project(Cn),$n=ft.project(zn).sub(Zn),Xn=se.curve,na=Math.max(ft.width,ft.height),va=na/Vr,ha=$n.mag();if("minZoom"in se){var xa=t.clamp(Math.min(se.minZoom,At,yr),ft.minZoom,ft.maxZoom),Sa=na/ft.zoomScale(xa-At);Xn=Math.sqrt(Sa/ha*2)}var Oa=Xn*Xn;function Xa(ja){var ci=(va*va-na*na+(ja?-1:1)*Oa*Oa*ha*ha)/(2*(ja?va:na)*Oa*ha);return Math.log(Math.sqrt(ci*ci+1)-ci)}function Ti(ja){return(Math.exp(ja)-Math.exp(-ja))/2}function Ka(ja){return(Math.exp(ja)+Math.exp(-ja))/2}function li(ja){return Ti(ja)/Ka(ja)}var Ra=Xa(0),Mi=function(ja){return Ka(Ra)/Ka(Ra+Xn*ja)},Li=function(ja){return na*((Ka(Ra)*li(Ra+Xn*ja)-Ti(Ra))/Oa)/ha},Fi=(Xa(1)-Ra)/Xn;if(Math.abs(ha)<1e-6||!isFinite(Fi)){if(Math.abs(na-va)<1e-6)return this.easeTo(se,xe);var ui=vase.maxDuration&&(se.duration=0),this._zooming=!0,this._rotating=kt!==Fr,this._pitching=Gr!==Jt,this._padding=!ft.isPaddingEqual(Wr),this._prepareEase(xe,!1),this._ease(function(ja){var ci=ja*Fi,yo=1/Mi(ci);ft.zoom=ja===1?yr:At+ft.scaleZoom(yo),ze._rotating&&(ft.bearing=t.number(kt,Fr,ja)),ze._pitching&&(ft.pitch=t.number(Jt,Gr,ja)),ze._padding&&(ft.interpolatePadding(ur,Wr,ja),ln=ft.centerPoint.add(qr));var Bo=ja===1?zn:ft.unproject(Zn.add($n.mult(Li(ci))).mult(yo));ft.setLocationAtPoint(ft.renderWorldCopies?Bo.wrap():Bo,ln),ze._fireMoveEvents(xe)},function(){return ze._afterEase(xe)},se),this},ee.prototype.isEasing=function(){return!!this._easeFrameId},ee.prototype.stop=function(){return this._stop()},ee.prototype._stop=function(se,xe){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var ze=this._onEaseEnd;delete this._onEaseEnd,ze.call(this,xe)}if(!se){var $e=this.handlers;$e&&$e.stop()}return this},ee.prototype._ease=function(se,xe,ze){ze.animate===!1||ze.duration===0?(se(1),xe()):(this._easeStart=t.browser.now(),this._easeOptions=ze,this._onEaseFrame=se,this._onEaseEnd=xe,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},ee.prototype._renderFrameCallback=function(){var se=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(se)),se<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},ee.prototype._normalizeBearing=function(se,xe){se=t.wrap(se,-180,180);var ze=Math.abs(se-xe);return Math.abs(se-360-xe)180?-360:ze<-180?360:0}},ee}(t.Evented),Ls=function(ee){ee===void 0&&(ee={}),this.options=ee,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};Ls.prototype.getDefaultPosition=function(){return"bottom-right"},Ls.prototype.onAdd=function(ee){var ye=this.options&&this.options.compact;return this._map=ee,this._container=p.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=p.create("div","mapboxgl-ctrl-attrib-inner",this._container),ye&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),ye===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Ls.prototype.onRemove=function(){p.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Ls.prototype._updateEditLink=function(){var ee=this._editLink;ee||(ee=this._editLink=this._container.querySelector(".mapbox-improve-map"));var ye=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(ee){var se=ye.reduce(function(xe,ze,$e){return ze.value&&(xe+=ze.key+"="+ze.value+($e=0)return!1;return!0});var ft=ee.join(" | ");ft!==this._attribHTML&&(this._attribHTML=ft,ee.length?(this._innerContainer.innerHTML=ft,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Ls.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var si=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};si.prototype.onAdd=function(ee){this._map=ee,this._container=p.create("div","mapboxgl-ctrl");var ye=p.create("a","mapboxgl-ctrl-logo");return ye.target="_blank",ye.rel="noopener nofollow",ye.href="https://www.mapbox.com/",ye.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ye.setAttribute("rel","noopener nofollow"),this._container.appendChild(ye),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},si.prototype.onRemove=function(){p.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},si.prototype.getDefaultPosition=function(){return"bottom-left"},si.prototype._updateLogo=function(ee){(!ee||ee.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},si.prototype._logoRequired=function(){if(!!this._map.style){var ee=this._map.style.sourceCaches;for(var ye in ee){var se=ee[ye].getSource();if(se.mapbox_logo)return!0}return!1}},si.prototype._updateCompact=function(){var ee=this._container.children;if(ee.length){var ye=ee[0];this._map.getCanvasContainer().offsetWidth<250?ye.classList.add("mapboxgl-compact"):ye.classList.remove("mapboxgl-compact")}};var Yi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Yi.prototype.add=function(ee){var ye=++this._id,se=this._queue;return se.push({callback:ee,id:ye,cancelled:!1}),ye},Yi.prototype.remove=function(ee){for(var ye=this._currentlyRunning,se=ye?this._queue.concat(ye):this._queue,xe=0,ze=se;xese.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(se.minPitch!=null&&se.maxPitch!=null&&se.minPitch>se.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(se.minPitch!=null&&se.minPitchyc)throw new Error("maxPitch must be less than or equal to "+yc);var ze=new Tn(se.minZoom,se.maxZoom,se.minPitch,se.maxPitch,se.renderWorldCopies);if(ge.call(this,ze,se),this._interactive=se.interactive,this._maxTileCacheSize=se.maxTileCacheSize,this._failIfMajorPerformanceCaveat=se.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=se.preserveDrawingBuffer,this._antialias=se.antialias,this._trackResize=se.trackResize,this._bearingSnap=se.bearingSnap,this._refreshExpiredTiles=se.refreshExpiredTiles,this._fadeDuration=se.fadeDuration,this._crossSourceCollisions=se.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=se.collectResourceTiming,this._renderTaskQueue=new Yi,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},tv,se.locale),this._requestManager=new t.RequestManager(se.transformRequest,se.accessToken),typeof se.container=="string"){if(this._container=t.window.document.getElementById(se.container),!this._container)throw new Error("Container '"+se.container+"' not found.")}else if(se.container instanceof vd)this._container=se.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(se.maxBounds&&this.setMaxBounds(se.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return xe._update(!1)}),this.on("moveend",function(){return xe._update(!1)}),this.on("zoom",function(){return xe._update(!0)}),typeof t.window<"u"&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new zi(this,se);var $e=typeof se.hash=="string"&&se.hash||void 0;this._hash=se.hash&&new Na($e).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:se.center,zoom:se.zoom,bearing:se.bearing,pitch:se.pitch}),se.bounds&&(this.resize(),this.fitBounds(se.bounds,t.extend({},se.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=se.localIdeographFontFamily,se.style&&this.setStyle(se.style,{localIdeographFontFamily:se.localIdeographFontFamily}),se.attributionControl&&this.addControl(new Ls({customAttribution:se.customAttribution})),this.addControl(new si,se.logoPosition),this.on("style.load",function(){xe.transform.unmodified&&xe.jumpTo(xe.style.stylesheet)}),this.on("data",function(ft){xe._update(ft.dataType==="style"),xe.fire(new t.Event(ft.dataType+"data",ft))}),this.on("dataloading",function(ft){xe.fire(new t.Event(ft.dataType+"dataloading",ft))})}ge&&(ee.__proto__=ge),ee.prototype=Object.create(ge&&ge.prototype),ee.prototype.constructor=ee;var ye={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return ee.prototype._getMapId=function(){return this._mapId},ee.prototype.addControl=function(xe,ze){if(ze===void 0&&xe.getDefaultPosition&&(ze=xe.getDefaultPosition()),ze===void 0&&(ze="top-right"),!xe||!xe.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var $e=xe.onAdd(this);this._controls.push(xe);var ft=this._controlPositions[ze];return ze.indexOf("bottom")!==-1?ft.insertBefore($e,ft.firstChild):ft.appendChild($e),this},ee.prototype.removeControl=function(xe){if(!xe||!xe.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var ze=this._controls.indexOf(xe);return ze>-1&&this._controls.splice(ze,1),xe.onRemove(this),this},ee.prototype.resize=function(xe){var ze=this._containerDimensions(),$e=ze[0],ft=ze[1];this._resizeCanvas($e,ft),this.transform.resize($e,ft),this.painter.resize($e,ft);var At=!this._moving;return At&&(this.stop(),this.fire(new t.Event("movestart",xe)).fire(new t.Event("move",xe))),this.fire(new t.Event("resize",xe)),At&&this.fire(new t.Event("moveend",xe)),this},ee.prototype.getBounds=function(){return this.transform.getBounds()},ee.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},ee.prototype.setMaxBounds=function(xe){return this.transform.setMaxBounds(t.LngLatBounds.convert(xe)),this._update()},ee.prototype.setMinZoom=function(xe){if(xe=xe==null?rv:xe,xe>=rv&&xe<=this.transform.maxZoom)return this.transform.minZoom=xe,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=xe,this._update(),this.getZoom()>xe&&this.setZoom(xe),this;throw new Error("maxZoom must be greater than the current minZoom")},ee.prototype.getMaxZoom=function(){return this.transform.maxZoom},ee.prototype.setMinPitch=function(xe){if(xe=xe==null?Vs:xe,xe=Vs&&xe<=this.transform.maxPitch)return this.transform.minPitch=xe,this._update(),this.getPitch()yc)throw new Error("maxPitch must be less than or equal to "+yc);if(xe>=this.transform.minPitch)return this.transform.maxPitch=xe,this._update(),this.getPitch()>xe&&this.setPitch(xe),this;throw new Error("maxPitch must be greater than the current minPitch")},ee.prototype.getMaxPitch=function(){return this.transform.maxPitch},ee.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},ee.prototype.setRenderWorldCopies=function(xe){return this.transform.renderWorldCopies=xe,this._update()},ee.prototype.project=function(xe){return this.transform.locationPoint(t.LngLat.convert(xe))},ee.prototype.unproject=function(xe){return this.transform.pointLocation(t.Point.convert(xe))},ee.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},ee.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},ee.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},ee.prototype._createDelegatedListener=function(xe,ze,$e){var ft=this,At;if(xe==="mouseenter"||xe==="mouseover"){var kt=!1,Jt=function(Vr){var qr=ft.getLayer(ze)?ft.queryRenderedFeatures(Vr.point,{layers:[ze]}):[];qr.length?kt||(kt=!0,$e.call(ft,new Ge(xe,ft,Vr.originalEvent,{features:qr}))):kt=!1},ur=function(){kt=!1};return{layer:ze,listener:$e,delegates:{mousemove:Jt,mouseout:ur}}}else if(xe==="mouseleave"||xe==="mouseout"){var yr=!1,Fr=function(Vr){var qr=ft.getLayer(ze)?ft.queryRenderedFeatures(Vr.point,{layers:[ze]}):[];qr.length?yr=!0:yr&&(yr=!1,$e.call(ft,new Ge(xe,ft,Vr.originalEvent)))},Gr=function(Vr){yr&&(yr=!1,$e.call(ft,new Ge(xe,ft,Vr.originalEvent)))};return{layer:ze,listener:$e,delegates:{mousemove:Fr,mouseout:Gr}}}else{var Wr=function(Vr){var qr=ft.getLayer(ze)?ft.queryRenderedFeatures(Vr.point,{layers:[ze]}):[];qr.length&&(Vr.features=qr,$e.call(ft,Vr),delete Vr.features)};return{layer:ze,listener:$e,delegates:(At={},At[xe]=Wr,At)}}},ee.prototype.on=function(xe,ze,$e){if($e===void 0)return ge.prototype.on.call(this,xe,ze);var ft=this._createDelegatedListener(xe,ze,$e);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[xe]=this._delegatedListeners[xe]||[],this._delegatedListeners[xe].push(ft);for(var At in ft.delegates)this.on(At,ft.delegates[At]);return this},ee.prototype.once=function(xe,ze,$e){if($e===void 0)return ge.prototype.once.call(this,xe,ze);var ft=this._createDelegatedListener(xe,ze,$e);for(var At in ft.delegates)this.once(At,ft.delegates[At]);return this},ee.prototype.off=function(xe,ze,$e){var ft=this;if($e===void 0)return ge.prototype.off.call(this,xe,ze);var At=function(kt){for(var Jt=kt[xe],ur=0;ur180;){var $e=ye.locationPoint(ge);if($e.x>=0&&$e.y>=0&&$e.x<=ye.width&&$e.y<=ye.height)break;ge.lng>ye.center.lng?ge.lng-=360:ge.lng+=360}return ge}var pd={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function ep(ge,ee,ye){var se=ge.classList;for(var xe in pd)se.remove("mapboxgl-"+ye+"-anchor-"+xe);se.add("mapboxgl-"+ye+"-anchor-"+ee)}var nv=function(ge){function ee(ye,se){var xe=this;if(ge.call(this),(ye instanceof t.window.HTMLElement||se)&&(ye=t.extend({element:ye},se)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=ye&&ye.anchor||"center",this._color=ye&&ye.color||"#3FB1CE",this._draggable=ye&&ye.draggable||!1,this._state="inactive",this._rotation=ye&&ye.rotation||0,this._rotationAlignment=ye&&ye.rotationAlignment||"auto",this._pitchAlignment=ye&&ye.pitchAlignment&&ye.pitchAlignment!=="auto"?ye.pitchAlignment:this._rotationAlignment,!ye||!ye.element){this._defaultMarker=!0,this._element=p.create("div"),this._element.setAttribute("aria-label","Map marker");var ze=p.createNS("http://www.w3.org/2000/svg","svg");ze.setAttributeNS(null,"display","block"),ze.setAttributeNS(null,"height","41px"),ze.setAttributeNS(null,"width","27px"),ze.setAttributeNS(null,"viewBox","0 0 27 41");var $e=p.createNS("http://www.w3.org/2000/svg","g");$e.setAttributeNS(null,"stroke","none"),$e.setAttributeNS(null,"stroke-width","1"),$e.setAttributeNS(null,"fill","none"),$e.setAttributeNS(null,"fill-rule","evenodd");var ft=p.createNS("http://www.w3.org/2000/svg","g");ft.setAttributeNS(null,"fill-rule","nonzero");var At=p.createNS("http://www.w3.org/2000/svg","g");At.setAttributeNS(null,"transform","translate(3.0, 29.0)"),At.setAttributeNS(null,"fill","#000000");for(var kt=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],Jt=0,ur=kt;Jtxe.getEast()||ze.latitudexe.getNorth())},ee.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},ee.prototype._onSuccess=function(se){if(!!this._map){if(this._isOutOfMapMaxBounds(se)){this._setErrorState(),this.fire(new t.Event("outofmaxbounds",se)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=se,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(se),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(se),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",se)),this._finish()}},ee.prototype._updateCamera=function(se){var xe=new t.LngLat(se.coords.longitude,se.coords.latitude),ze=se.coords.accuracy,$e=this._map.getBearing(),ft=t.extend({bearing:$e},this.options.fitBoundsOptions);this._map.fitBounds(xe.toBounds(ze),ft,{geolocateSource:!0})},ee.prototype._updateMarker=function(se){if(se){var xe=new t.LngLat(se.coords.longitude,se.coords.latitude);this._accuracyCircleMarker.setLngLat(xe).addTo(this._map),this._userLocationDotMarker.setLngLat(xe).addTo(this._map),this._accuracy=se.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},ee.prototype._updateCircleRadius=function(){var se=this._map._container.clientHeight/2,xe=this._map.unproject([0,se]),ze=this._map.unproject([1,se]),$e=xe.distanceTo(ze),ft=Math.ceil(2*this._accuracy/$e);this._circleElement.style.width=ft+"px",this._circleElement.style.height=ft+"px"},ee.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},ee.prototype._onError=function(se){if(!!this._map){if(this.options.trackUserLocation)if(se.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var xe=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=xe,this._geolocateButton.setAttribute("aria-label",xe),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(se.code===3&&bc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",se)),this._finish()}},ee.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},ee.prototype._setupUI=function(se){var xe=this;if(this._container.addEventListener("contextmenu",function(ft){return ft.preventDefault()}),this._geolocateButton=p.create("button","mapboxgl-ctrl-geolocate",this._container),p.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",se===!1){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var ze=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=ze,this._geolocateButton.setAttribute("aria-label",ze)}else{var $e=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=$e,this._geolocateButton.setAttribute("aria-label",$e)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=p.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new nv(this._dotElement),this._circleElement=p.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new nv({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(ft){var At=ft.originalEvent&&ft.originalEvent.type==="resize";!ft.geolocateSource&&xe._watchState==="ACTIVE_LOCK"&&!At&&(xe._watchState="BACKGROUND",xe._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),xe._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),xe.fire(new t.Event("trackuserlocationend")))})},ee.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":av--,bc=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"));break}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),av++;var se;av>1?(se={maximumAge:6e5,timeout:0},bc=!0):(se=this.options.positionOptions,bc=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,se)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},ee.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},ee}(t.Evented),am={maxWidth:100,unit:"metric"},wc=function(ee){this.options=t.extend({},am,ee),t.bindAll(["_onMove","setUnit"],this)};wc.prototype.getDefaultPosition=function(){return"bottom-left"},wc.prototype._onMove=function(){I0(this._map,this._container,this.options)},wc.prototype.onAdd=function(ee){return this._map=ee,this._container=p.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",ee.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},wc.prototype.onRemove=function(){p.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},wc.prototype.setUnit=function(ee){this.options.unit=ee,I0(this._map,this._container,this.options)};function I0(ge,ee,ye){var se=ye&&ye.maxWidth||100,xe=ge._container.clientHeight/2,ze=ge.unproject([0,xe]),$e=ge.unproject([se,xe]),ft=ze.distanceTo($e);if(ye&&ye.unit==="imperial"){var At=3.2808*ft;if(At>5280){var kt=At/5280;iv(ee,se,kt,ge._getUIString("ScaleControl.Miles"))}else iv(ee,se,At,ge._getUIString("ScaleControl.Feet"))}else if(ye&&ye.unit==="nautical"){var Jt=ft/1852;iv(ee,se,Jt,ge._getUIString("ScaleControl.NauticalMiles"))}else ft>=1e3?iv(ee,se,ft/1e3,ge._getUIString("ScaleControl.Kilometers")):iv(ee,se,ft,ge._getUIString("ScaleControl.Meters"))}function iv(ge,ee,ye,se){var xe=om(ye),ze=xe/ye;ge.style.width=ee*ze+"px",ge.innerHTML=xe+" "+se}function im(ge){var ee=Math.pow(10,Math.ceil(-Math.log(ge)/Math.LN10));return Math.round(ge*ee)/ee}function om(ge){var ee=Math.pow(10,(""+Math.floor(ge)).length-1),ye=ge/ee;return ye=ye>=10?10:ye>=5?5:ye>=3?3:ye>=2?2:ye>=1?1:im(ye),ee*ye}var wu=function(ee){this._fullscreen=!1,ee&&ee.container&&(ee.container instanceof t.window.HTMLElement?this._container=ee.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange")};wu.prototype.onAdd=function(ee){return this._map=ee,this._container||(this._container=this._map.getContainer()),this._controlContainer=p.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},wu.prototype.onRemove=function(){p.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},wu.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},wu.prototype._setupUI=function(){var ee=this._fullscreenButton=p.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);p.create("span","mapboxgl-ctrl-icon",ee).setAttribute("aria-hidden",!0),ee.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},wu.prototype._updateTitle=function(){var ee=this._getTitle();this._fullscreenButton.setAttribute("aria-label",ee),this._fullscreenButton.title=ee},wu.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},wu.prototype._isFullscreen=function(){return this._fullscreen},wu.prototype._changeIcon=function(){var ee=t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement;ee===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},wu.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var sm={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},lm=function(ge){function ee(ye){ge.call(this),this.options=t.extend(Object.create(sm),ye),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return ge&&(ee.__proto__=ge),ee.prototype=Object.create(ge&&ge.prototype),ee.prototype.constructor=ee,ee.prototype.addTo=function(se){return this._map&&this.remove(),this._map=se,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new t.Event("open")),this},ee.prototype.isOpen=function(){return!!this._map},ee.prototype.remove=function(){return this._content&&p.remove(this._content),this._container&&(p.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new t.Event("close")),this},ee.prototype.getLngLat=function(){return this._lngLat},ee.prototype.setLngLat=function(se){return this._lngLat=t.LngLat.convert(se),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},ee.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},ee.prototype.getElement=function(){return this._container},ee.prototype.setText=function(se){return this.setDOMContent(t.window.document.createTextNode(se))},ee.prototype.setHTML=function(se){var xe=t.window.document.createDocumentFragment(),ze=t.window.document.createElement("body"),$e;for(ze.innerHTML=se;$e=ze.firstChild,!!$e;)xe.appendChild($e);return this.setDOMContent(xe)},ee.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},ee.prototype.setMaxWidth=function(se){return this.options.maxWidth=se,this._update(),this},ee.prototype.setDOMContent=function(se){return this._createContent(),this._content.appendChild(se),this._update(),this},ee.prototype.addClassName=function(se){this._container&&this._container.classList.add(se)},ee.prototype.removeClassName=function(se){this._container&&this._container.classList.remove(se)},ee.prototype.toggleClassName=function(se){if(this._container)return this._container.classList.toggle(se)},ee.prototype._createContent=function(){this._content&&p.remove(this._content),this._content=p.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=p.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},ee.prototype._onMouseUp=function(se){this._update(se.point)},ee.prototype._onMouseMove=function(se){this._update(se.point)},ee.prototype._onDrag=function(se){this._update(se.point)},ee.prototype._update=function(se){var xe=this,ze=this._lngLat||this._trackPointer;if(!(!this._map||!ze||!this._content)&&(this._container||(this._container=p.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=p.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Fr){return xe._container.classList.add(Fr)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Rf(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!se))){var $e=this._pos=this._trackPointer&&se?se:this._map.project(this._lngLat),ft=this.options.anchor,At=_0(this.options.offset);if(!ft){var kt=this._container.offsetWidth,Jt=this._container.offsetHeight,ur;$e.y+At.bottom.ythis._map.transform.height-Jt?ur=["bottom"]:ur=[],$e.xthis._map.transform.width-kt/2&&ur.push("right"),ur.length===0?ft="bottom":ft=ur.join("-")}var yr=$e.add(At[ft]).round();p.setTransform(this._container,pd[ft]+" translate("+yr.x+"px,"+yr.y+"px)"),ep(this._container,ft,"popup")}},ee.prototype._onClose=function(){this.remove()},ee}(t.Evented);function _0(ge){if(ge)if(typeof ge=="number"){var ee=Math.round(Math.sqrt(.5*Math.pow(ge,2)));return{center:new t.Point(0,0),top:new t.Point(0,ge),"top-left":new t.Point(ee,ee),"top-right":new t.Point(-ee,ee),bottom:new t.Point(0,-ge),"bottom-left":new t.Point(ee,-ee),"bottom-right":new t.Point(-ee,-ee),left:new t.Point(ge,0),right:new t.Point(-ge,0)}}else if(ge instanceof t.Point||Array.isArray(ge)){var ye=t.Point.convert(ge);return{center:ye,top:ye,"top-left":ye,"top-right":ye,bottom:ye,"bottom-left":ye,"bottom-right":ye,left:ye,right:ye}}else return{center:t.Point.convert(ge.center||[0,0]),top:t.Point.convert(ge.top||[0,0]),"top-left":t.Point.convert(ge["top-left"]||[0,0]),"top-right":t.Point.convert(ge["top-right"]||[0,0]),bottom:t.Point.convert(ge.bottom||[0,0]),"bottom-left":t.Point.convert(ge["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(ge["bottom-right"]||[0,0]),left:t.Point.convert(ge.left||[0,0]),right:t.Point.convert(ge.right||[0,0])};else return _0(new t.Point(0,0))}var um={version:t.version,supported:y,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:N0,NavigationControl:Nf,GeolocateControl:F0,AttributionControl:Ls,ScaleControl:wc,FullscreenControl:wu,Popup:lm,Marker:nv,Style:es,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:_t,clearPrewarmedResources:Zt,get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(ge){t.config.ACCESS_TOKEN=ge},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(ge){t.config.API_URL=ge},get workerCount(){return Mr.workerCount},set workerCount(ge){Mr.workerCount=ge},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(ge){t.config.MAX_PARALLEL_IMAGE_REQUESTS=ge},clearStorage:function(ee){t.clearTileCache(ee)},workerUrl:""};return um}),i})},27084:function(R){R.exports=Math.log2||function(F){return Math.log(F)*Math.LOG2E}},16825:function(R,F,e){R.exports=m;var i=e(74311);function m(t,y){y||(y=t,t=window);var p=0,l=0,d=0,r={shift:!1,alt:!1,control:!1,meta:!1},n=!1;function u(C){var D=!1;return"altKey"in C&&(D=D||C.altKey!==r.alt,r.alt=!!C.altKey),"shiftKey"in C&&(D=D||C.shiftKey!==r.shift,r.shift=!!C.shiftKey),"ctrlKey"in C&&(D=D||C.ctrlKey!==r.control,r.control=!!C.ctrlKey),"metaKey"in C&&(D=D||C.metaKey!==r.meta,r.meta=!!C.metaKey),D}function a(C,D){var L=i.x(D),w=i.y(D);"buttons"in D&&(C=D.buttons|0),(C!==p||L!==l||w!==d||u(D))&&(p=C|0,l=L||0,d=w||0,y&&y(p,l,d,r))}function o(C){a(0,C)}function c(){(p||l||d||r.shift||r.alt||r.meta||r.control)&&(l=d=0,p=0,r.shift=r.alt=r.control=r.meta=!1,y&&y(0,0,0,r))}function s(C){u(C)&&y&&y(p,l,d,r)}function b(C){i.buttons(C)===0?a(0,C):a(p,C)}function g(C){a(p|i.buttons(C),C)}function A(C){a(p&~i.buttons(C),C)}function v(){n||(n=!0,t.addEventListener("mousemove",b),t.addEventListener("mousedown",g),t.addEventListener("mouseup",A),t.addEventListener("mouseleave",o),t.addEventListener("mouseenter",o),t.addEventListener("mouseout",o),t.addEventListener("mouseover",o),t.addEventListener("blur",c),t.addEventListener("keyup",s),t.addEventListener("keydown",s),t.addEventListener("keypress",s),t!==window&&(window.addEventListener("blur",c),window.addEventListener("keyup",s),window.addEventListener("keydown",s),window.addEventListener("keypress",s)))}function h(){!n||(n=!1,t.removeEventListener("mousemove",b),t.removeEventListener("mousedown",g),t.removeEventListener("mouseup",A),t.removeEventListener("mouseleave",o),t.removeEventListener("mouseenter",o),t.removeEventListener("mouseout",o),t.removeEventListener("mouseover",o),t.removeEventListener("blur",c),t.removeEventListener("keyup",s),t.removeEventListener("keydown",s),t.removeEventListener("keypress",s),t!==window&&(window.removeEventListener("blur",c),window.removeEventListener("keyup",s),window.removeEventListener("keydown",s),window.removeEventListener("keypress",s)))}v();var x={element:t};return Object.defineProperties(x,{enabled:{get:function(){return n},set:function(C){C?v():h()},enumerable:!0},buttons:{get:function(){return p},enumerable:!0},x:{get:function(){return l},enumerable:!0},y:{get:function(){return d},enumerable:!0},mods:{get:function(){return r},enumerable:!0}}),x}},48956:function(R){var F={left:0,top:0};R.exports=e;function e(m,t,y){t=t||m.currentTarget||m.srcElement,Array.isArray(y)||(y=[0,0]);var p=m.clientX||0,l=m.clientY||0,d=i(t);return y[0]=p-d.left,y[1]=l-d.top,y}function i(m){return m===window||m===document||m===document.body?F:m.getBoundingClientRect()}},74311:function(R,F){function e(y){if(typeof y=="object"){if("buttons"in y)return y.buttons;if("which"in y){var p=y.which;if(p===2)return 4;if(p===3)return 2;if(p>0)return 1<=0)return 1<0&&r(u,C))}catch(D){c.call(new b(C),D)}}}function c(h){var x=this;x.triggered||(x.triggered=!0,x.def&&(x=x.def),x.msg=h,x.state=2,x.chain.length>0&&r(u,x))}function s(h,x,C,D){for(var L=0;L7&&(n.push(x.splice(0,7)),x.unshift("C"));break;case"S":var D=g,L=A;(r=="C"||r=="S")&&(D+=D-u,L+=L-a),x=["C",D,L,x[1],x[2],x[3],x[4]];break;case"T":r=="Q"||r=="T"?(s=g*2-s,b=A*2-b):(s=g,b=A),x=t(g,A,s,b,x[1],x[2]);break;case"Q":s=x[1],b=x[2],x=t(g,A,x[1],x[2],x[3],x[4]);break;case"L":x=m(g,A,x[1],x[2]);break;case"H":x=m(g,A,x[1],A);break;case"V":x=m(g,A,g,x[1]);break;case"Z":x=m(g,A,o,c);break}r=C,g=x[x.length-2],A=x[x.length-1],x.length>4?(u=x[x.length-4],a=x[x.length-3]):(u=g,a=A),n.push(x)}return n}function m(d,r,n,u){return["C",d,r,n,u,n,u]}function t(d,r,n,u,a,o){return["C",d/3+.6666666666666666*n,r/3+.6666666666666666*u,a/3+.6666666666666666*n,o/3+.6666666666666666*u,a,o]}function y(d,r,n,u,a,o,c,s,b,g){if(g)S=g[0],f=g[1],w=g[2],M=g[3];else{var A=p(d,r,-a);d=A.x,r=A.y,A=p(s,b,-a),s=A.x,b=A.y;var v=(d-s)/2,h=(r-b)/2,x=v*v/(n*n)+h*h/(u*u);x>1&&(x=Math.sqrt(x),n=x*n,u=x*u);var C=n*n,D=u*u,L=(o==c?-1:1)*Math.sqrt(Math.abs((C*D-C*h*h-D*v*v)/(C*h*h+D*v*v)));L==1/0&&(L=1);var w=L*n*h/u+(d+s)/2,M=L*-u*v/n+(r+b)/2,S=Math.asin(((r-M)/u).toFixed(9)),f=Math.asin(((b-M)/u).toFixed(9));S=df&&(S=S-F*2),!c&&f>S&&(f=f-F*2)}if(Math.abs(f-S)>e){var P=f,E=s,k=b;f=S+e*(c&&f>S?1:-1),s=w+n*Math.cos(f),b=M+u*Math.sin(f);var O=y(s,b,n,u,a,0,c,E,k,[f,P,w,M])}var G=Math.tan((f-S)/4),z=4/3*n*G,U=4/3*u*G,H=[2*d-(d+z*Math.sin(S)),2*r-(r-U*Math.cos(S)),s+z*Math.sin(f),b-U*Math.cos(f),s,b];if(g)return H;O&&(H=H.concat(O));for(var B=0;B"u")return!1;for(var c in window)try{if(!u["$"+c]&&m.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{n(window[c])}catch{return!0}}catch{return!0}return!1}(),o=function(c){if(typeof window>"u"||!a)return n(c);try{return n(c)}catch{return!1}};i=function(s){var b=s!==null&&typeof s=="object",g=t.call(s)==="[object Function]",A=y(s),v=b&&t.call(s)==="[object String]",h=[];if(!b&&!g&&!A)throw new TypeError("Object.keys called on a non-object");var x=d&&g;if(v&&s.length>0&&!m.call(s,0))for(var C=0;C0)for(var D=0;D=0&&F.call(i.callee)==="[object Function]"),t}},88641:function(R){function F(m,t){if(typeof m!="string")return[m];var y=[m];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var p=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],l=t.escape||"___",d=!!t.flat;p.forEach(function(u){var a=new RegExp(["\\",u[0],"[^\\",u[0],"\\",u[1],"]*\\",u[1]].join("")),o=[];function c(s,b,g){var A=y.push(s.slice(u[0].length,-u[1].length))-1;return o.push(A),l+A+l}y.forEach(function(s,b){for(var g,A=0;s!=g;)if(g=s,s=s.replace(a,c),A++>1e4)throw Error("References have circular dependency. Please, check them.");y[b]=s}),o=o.reverse(),y=y.map(function(s){return o.forEach(function(b){s=s.replace(new RegExp("(\\"+l+b+"\\"+l+")","g"),u[0]+"$1"+u[1])}),s})});var r=new RegExp("\\"+l+"([0-9]+)\\"+l);function n(u,a,o){for(var c=[],s,b=0;s=r.exec(u);){if(b++>1e4)throw Error("Circular references in parenthesis");c.push(u.slice(0,s.index)),c.push(n(a[s[1]],a)),u=u.slice(s.index+s[0].length)}return c.push(u),c}return d?y:n(y[0],y)}function e(m,t){if(t&&t.flat){var y=t&&t.escape||"___",p=m[0],l;if(!p)return"";for(var d=new RegExp("\\"+y+"([0-9]+)\\"+y),r=0;p!=l;){if(r++>1e4)throw Error("Circular references in "+m);l=p,p=p.replace(d,n)}return p}return m.reduce(function u(a,o){return Array.isArray(o)&&(o=o.reduce(u,"")),a+o},"");function n(u,a){if(m[a]==null)throw Error("Reference "+a+"is undefined");return m[a]}}function i(m,t){return Array.isArray(m)?e(m,t):F(m,t)}i.parse=F,i.stringify=e,R.exports=i},18863:function(R,F,e){var i=e(71299);R.exports=m;function m(t){var y;return arguments.length>1&&(t=arguments),typeof t=="string"?t=t.split(/\s/).map(parseFloat):typeof t=="number"&&(t=[t]),t.length&&typeof t[0]=="number"?t.length===1?y={width:t[0],height:t[0],x:0,y:0}:t.length===2?y={width:t[0],height:t[1],x:0,y:0}:y={x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&&(t=i(t,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),y={x:t.left||0,y:t.top||0},t.width==null?t.right?y.width=t.right-y.x:y.width=0:y.width=t.width,t.height==null?t.bottom?y.height=t.bottom-y.y:y.height=0:y.height=t.height),y}},95616:function(R){R.exports=i;var F={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},e=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function i(y){var p=[];return y.replace(e,function(l,d,r){var n=d.toLowerCase();for(r=t(r),n=="m"&&r.length>2&&(p.push([d].concat(r.splice(0,2))),n="l",d=d=="m"?"l":"L");;){if(r.length==F[n])return r.unshift(d),p.push(r);if(r.lengthp!=c>p&&y<(o-u)*(p-a)/(c-a)+u;s&&(l=!l)}return l}},52142:function(R,F,e){/* + * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc + * @license MIT + * @preserve Project Home: https://github.com/voidqk/polybooljs + */var i=e(69444),m=e(29023),t=e(87263),y=e(11328),p=e(55968),l=e(10670),d=!1,r=m(),n;n={buildLog:function(a){return a===!0?d=i():a===!1&&(d=!1),d===!1?!1:d.list},epsilon:function(a){return r.epsilon(a)},segments:function(a){var o=t(!0,r,d);return a.regions.forEach(o.addRegion),{segments:o.calculate(a.inverted),inverted:a.inverted}},combine:function(a,o){var c=t(!1,r,d);return{combined:c.calculate(a.segments,a.inverted,o.segments,o.inverted),inverted1:a.inverted,inverted2:o.inverted}},selectUnion:function(a){return{segments:p.union(a.combined,d),inverted:a.inverted1||a.inverted2}},selectIntersect:function(a){return{segments:p.intersect(a.combined,d),inverted:a.inverted1&&a.inverted2}},selectDifference:function(a){return{segments:p.difference(a.combined,d),inverted:a.inverted1&&!a.inverted2}},selectDifferenceRev:function(a){return{segments:p.differenceRev(a.combined,d),inverted:!a.inverted1&&a.inverted2}},selectXor:function(a){return{segments:p.xor(a.combined,d),inverted:a.inverted1!==a.inverted2}},polygon:function(a){return{regions:y(a.segments,r,d),inverted:a.inverted}},polygonFromGeoJSON:function(a){return l.toPolygon(n,a)},polygonToGeoJSON:function(a){return l.fromPolygon(n,r,a)},union:function(a,o){return u(a,o,n.selectUnion)},intersect:function(a,o){return u(a,o,n.selectIntersect)},difference:function(a,o){return u(a,o,n.selectDifference)},differenceRev:function(a,o){return u(a,o,n.selectDifferenceRev)},xor:function(a,o){return u(a,o,n.selectXor)}};function u(a,o,c){var s=n.segments(a),b=n.segments(o),g=n.combine(s,b),A=c(g);return n.polygon(A)}typeof window=="object"&&(window.PolyBool=n),R.exports=n},69444:function(R){function F(){var e,i=0,m=!1;function t(y,p){return e.list.push({type:y,data:p?JSON.parse(JSON.stringify(p)):void 0}),e}return e={list:[],segmentId:function(){return i++},checkIntersection:function(y,p){return t("check",{seg1:y,seg2:p})},segmentChop:function(y,p){return t("div_seg",{seg:y,pt:p}),t("chop",{seg:y,pt:p})},statusRemove:function(y){return t("pop_seg",{seg:y})},segmentUpdate:function(y){return t("seg_update",{seg:y})},segmentNew:function(y,p){return t("new_seg",{seg:y,primary:p})},segmentRemove:function(y){return t("rem_seg",{seg:y})},tempStatus:function(y,p,l){return t("temp_status",{seg:y,above:p,below:l})},rewind:function(y){return t("rewind",{seg:y})},status:function(y,p,l){return t("status",{seg:y,above:p,below:l})},vert:function(y){return y===m?e:(m=y,t("vert",{x:y}))},log:function(y){return typeof y!="string"&&(y=JSON.stringify(y,!1," ")),t("log",{txt:y})},reset:function(){return t("reset")},selected:function(y){return t("selected",{segs:y})},chainStart:function(y){return t("chain_start",{seg:y})},chainRemoveHead:function(y,p){return t("chain_rem_head",{index:y,pt:p})},chainRemoveTail:function(y,p){return t("chain_rem_tail",{index:y,pt:p})},chainNew:function(y,p){return t("chain_new",{pt1:y,pt2:p})},chainMatch:function(y){return t("chain_match",{index:y})},chainClose:function(y){return t("chain_close",{index:y})},chainAddHead:function(y,p){return t("chain_add_head",{index:y,pt:p})},chainAddTail:function(y,p){return t("chain_add_tail",{index:y,pt:p})},chainConnect:function(y,p){return t("chain_con",{index1:y,index2:p})},chainReverse:function(y){return t("chain_rev",{index:y})},chainJoin:function(y,p){return t("chain_join",{index1:y,index2:p})},done:function(){return t("done")}},e}R.exports=F},29023:function(R){function F(e){typeof e!="number"&&(e=1e-10);var i={epsilon:function(m){return typeof m=="number"&&(e=m),e},pointAboveOrOnLine:function(m,t,y){var p=t[0],l=t[1],d=y[0],r=y[1],n=m[0],u=m[1];return(d-p)*(u-l)-(r-l)*(n-p)>=-e},pointBetween:function(m,t,y){var p=m[1]-t[1],l=y[0]-t[0],d=m[0]-t[0],r=y[1]-t[1],n=d*l+p*r;if(n-e)},pointsSameX:function(m,t){return Math.abs(m[0]-t[0])e!=d-p>e&&(l-u)*(p-a)/(d-a)+u-y>e&&(r=!r),l=u,d=a}return r}};return i}R.exports=F},10670:function(R){var F={toPolygon:function(e,i){function m(p){if(p.length<=0)return e.segments({inverted:!1,regions:[]});function l(n){var u=n.slice(0,n.length-1);return e.segments({inverted:!1,regions:[u]})}for(var d=l(p[0]),r=1;r0})}function D(U,H){var B=U.seg,W=H.seg,q=B.start,re=B.end,ie=W.start,le=W.end;p&&p.checkIntersection(B,W);var he=y.linesIntersect(q,re,ie,le);if(he===!1){if(!y.pointsCollinear(q,re,ie)||y.pointsSame(q,le)||y.pointsSame(re,ie))return!1;var $=y.pointsSame(q,ie),Z=y.pointsSame(re,le);if($&&Z)return H;var K=!$&&y.pointBetween(q,ie,le),Q=!Z&&y.pointBetween(re,ie,le);if($)return Q?b(H,re):b(U,le),H;K&&(Z||(Q?b(H,re):b(U,le)),b(H,q))}else he.alongA===0&&(he.alongB===-1?b(U,ie):he.alongB===0?b(U,he.pt):he.alongB===1&&b(U,le)),he.alongB===0&&(he.alongA===-1?b(H,q):he.alongA===0?b(H,he.pt):he.alongA===1&&b(H,re));return!1}for(var L=[];!r.isEmpty();){var w=r.getHead();if(p&&p.vert(w.pt[0]),w.isStart){let U=function(){if(S){var H=D(w,S);if(H)return H}return f?D(w,f):!1};var z=U;p&&p.segmentNew(w.seg,w.primary);var M=C(w),S=M.before?M.before.ev:null,f=M.after?M.after.ev:null;p&&p.tempStatus(w.seg,S?S.seg:!1,f?f.seg:!1);var P=U();if(P){if(t){var E;w.seg.myFill.below===null?E=!0:E=w.seg.myFill.above!==w.seg.myFill.below,E&&(P.seg.myFill.above=!P.seg.myFill.above)}else P.seg.otherFill=w.seg.myFill;p&&p.segmentUpdate(P.seg),w.other.remove(),w.remove()}if(r.getHead()!==w){p&&p.rewind(w.seg);continue}if(t){var E;w.seg.myFill.below===null?E=!0:E=w.seg.myFill.above!==w.seg.myFill.below,f?w.seg.myFill.below=f.seg.myFill.above:w.seg.myFill.below=A,E?w.seg.myFill.above=!w.seg.myFill.below:w.seg.myFill.above=w.seg.myFill.below}else if(w.seg.otherFill===null){var k;f?w.primary===f.primary?k=f.seg.otherFill.above:k=f.seg.myFill.above:k=w.primary?v:A,w.seg.otherFill={above:k,below:k}}p&&p.status(w.seg,S?S.seg:!1,f?f.seg:!1),w.other.status=M.insert(i.node({ev:w}))}else{var O=w.status;if(O===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(h.exists(O.prev)&&h.exists(O.next)&&D(O.prev.ev,O.next.ev),p&&p.statusRemove(O.ev.seg),O.remove(),!w.primary){var G=w.seg.myFill;w.seg.myFill=w.seg.otherFill,w.seg.otherFill=G}L.push(w.seg)}r.getHead().remove()}return p&&p.done(),L}return t?{addRegion:function(A){for(var v,h=A[A.length-1],x=0;x0&&!this.aborted;){var y=this.ifds_to_read.shift();!y.offset||this.scan_ifd(y.id,y.offset,m)}},i.prototype.read_uint16=function(m){var t=this.input;if(m+2>t.length)throw F("unexpected EOF","EBADDATA");return this.big_endian?t[m]*256+t[m+1]:t[m]+t[m+1]*256},i.prototype.read_uint32=function(m){var t=this.input;if(m+4>t.length)throw F("unexpected EOF","EBADDATA");return this.big_endian?t[m]*16777216+t[m+1]*65536+t[m+2]*256+t[m+3]:t[m]+t[m+1]*256+t[m+2]*65536+t[m+3]*16777216},i.prototype.is_subifd_link=function(m,t){return m===0&&t===34665||m===0&&t===34853||m===34665&&t===40965},i.prototype.exif_format_length=function(m){switch(m){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},i.prototype.exif_format_read=function(m,t){var y;switch(m){case 1:case 2:return y=this.input[t],y;case 6:return y=this.input[t],y|(y&128)*33554430;case 3:return y=this.read_uint16(t),y;case 8:return y=this.read_uint16(t),y|(y&32768)*131070;case 4:return y=this.read_uint32(t),y;case 9:return y=this.read_uint32(t),y|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},i.prototype.scan_ifd=function(m,t,y){var p=this.read_uint16(t);t+=2;for(var l=0;lthis.input.length)throw F("unexpected EOF","EBADDATA");for(var s=[],b=o,g=0;g0&&(this.ifds_to_read.push({id:d,offset:s[0]}),c=!0);var v={is_big_endian:this.big_endian,ifd:m,tag:d,format:r,count:n,entry_offset:t+this.start,data_length:a,data_offset:o+this.start,value:s,is_subifd_link:c};if(y(v)===!1){this.aborted=!0;return}t+=12}m===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})},R.exports.ExifParser=i,R.exports.get_orientation=function(m){var t=0;try{return new i(m,0,m.length).each(function(y){if(y.ifd===0&&y.tag===274&&Array.isArray(y.value))return t=y.value[0],!1}),t}catch{return-1}}},76767:function(R,F,e){var i=e(14847).n8,m=e(14847).Ag;function t(a,o){if(a.length<4+o)return null;var c=m(a,o);return a.length>4&15,s=a[4]&15,b=a[5]>>4&15,g=i(a,6),A=8,v=0;vg.width||b.width===g.width&&b.height>g.height?b:g}),c=a.reduce(function(b,g){return b.height>g.height||b.height===g.height&&b.width>g.width?b:g}),s;return o.width>c.height||o.width===c.height&&o.height>c.width?s=o:s=c,s}R.exports.readSizeFromMeta=function(a){var o={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(n(a,o),!!o.sizes.length){var c=u(o.sizes),s=1;o.transforms.forEach(function(g){var A={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},v={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(g.type==="imir"&&(g.value===0?s=v[s]:(s=v[s],s=A[s],s=A[s])),g.type==="irot")for(var h=0;h1&&(s.variants=c.variants),c.orientation&&(s.orientation=c.orientation),c.exif_location&&c.exif_location.offset+c.exif_location.length<=d.length){var b=t(d,c.exif_location.offset),g=d.slice(c.exif_location.offset+b+4,c.exif_location.offset+c.exif_location.length),A=p.get_orientation(g);A>0&&(s.orientation=A)}return s}}}}}}},2504:function(R,F,e){var i=e(14847).eG,m=e(14847).OF,t=e(14847).mP,y=i("BM");R.exports=function(p){if(!(p.length<26)&&!!m(p,0,y))return{width:t(p,18),height:t(p,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},47342:function(R,F,e){var i=e(14847).eG,m=e(14847).OF,t=e(14847).mP,y=i("GIF87a"),p=i("GIF89a");R.exports=function(l){if(!(l.length<10)&&!(!m(l,0,y)&&!m(l,0,p)))return{width:t(l,6),height:t(l,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},31355:function(R,F,e){var i=e(14847).mP,m=0,t=1,y=16;R.exports=function(p){var l=i(p,0),d=i(p,2),r=i(p,4);if(!(l!==m||d!==t||!r)){for(var n=[],u={width:0,height:0},a=0;au.width||c>u.height)&&(u=s)}return{width:u.width,height:u.height,variants:n,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},54261:function(R,F,e){var i=e(14847).n8,m=e(14847).eG,t=e(14847).OF,y=e(71371),p=m("Exif\0\0");R.exports=function(l){if(!(l.length<2)&&!(l[0]!==255||l[1]!==216||l[2]!==255))for(var d=2;;){for(;;){if(l.length-d<2)return;if(l[d++]===255)break}for(var r=l[d++],n;r===255;)r=l[d++];if(208<=r&&r<=217||r===1)n=0;else if(192<=r&&r<=254){if(l.length-d<2)return;n=i(l,d)-2,d+=2}else return;if(r===217||r===218)return;var u;if(r===225&&n>=10&&t(l,d,p)&&(u=y.get_orientation(l.slice(d+6,d+n))),n>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(l.length-d0&&(a.orientation=u),a}d+=n}}},6303:function(R,F,e){var i=e(14847).eG,m=e(14847).OF,t=e(14847).Ag,y=i(`\x89PNG\r + +`),p=i("IHDR");R.exports=function(l){if(!(l.length<24)&&!!m(l,0,y)&&!!m(l,12,p))return{width:t(l,16),height:t(l,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},38689:function(R,F,e){var i=e(14847).eG,m=e(14847).OF,t=e(14847).Ag,y=i("8BPS\0");R.exports=function(p){if(!(p.length<22)&&!!m(p,0,y))return{width:t(p,18),height:t(p,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},6881:function(R){function F(u){return u===32||u===9||u===13||u===10}function e(u){return typeof u=="number"&&isFinite(u)&&u>0}function i(u){var a=0,o=u.length;for(u[0]===239&&u[1]===187&&u[2]===191&&(a=3);a]*>/,t=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,y=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,p=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,l=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,d=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function r(u){var a=u.match(y),o=u.match(p),c=u.match(l);return{width:a&&(a[1]||a[2]),height:o&&(o[1]||o[2]),viewbox:c&&(c[1]||c[2])}}function n(u){return d.test(u)?u.match(d)[0]:"px"}R.exports=function(u){if(!!i(u)){for(var a="",o=0;o>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function u(a,o){return{width:(a[o+6]<<16|a[o+5]<<8|a[o+4])+1,height:(a[o+9]<a.length)){for(;o+8=10?c=c||r(a,o+8):g==="VP8L"&&A>=9?c=c||n(a,o+8):g==="VP8X"&&A>=10?c=c||u(a,o+8):g==="EXIF"&&(s=p.get_orientation(a.slice(o+8,o+8+A)),o=1/0),o+=8+A}if(!!c)return s>0&&(c.orientation=s),c}}}},91497:function(R,F,e){R.exports={avif:e(24461),bmp:e(2504),gif:e(47342),ico:e(31355),jpeg:e(54261),png:e(6303),psd:e(38689),svg:e(6881),tiff:e(66278),webp:e(90784)}},33575:function(R,F,e){var i=e(91497);function m(t){for(var y=Object.keys(i),p=0;p1)for(var g=1;g"u"?e.g:window,t=["moz","webkit"],y="AnimationFrame",p=m["request"+y],l=m["cancel"+y]||m["cancelRequest"+y],d=0;!p&&d1)||(P.scaleRatio=[P.scale[0]*P.viewport.width,P.scale[1]*P.viewport.height],b(P),P.after&&P.after(P)))}function S(P){if(!!P){P.length!=null?typeof P[0]=="number"&&(P=[{positions:P}]):Array.isArray(P)||(P=[P]);var E=0,k=0;if(L.groups=D=P.map(function(W,q){var re=D[q];if(W)typeof W=="function"?W={after:W}:typeof W[0]=="number"&&(W={positions:W});else return re;return W=y(W,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),re||(D[q]=re={id:q,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},W=p({},C,W)),t(re,W,[{lineWidth:function(ie){return+ie*.5},capSize:function(ie){return+ie*.5},opacity:parseFloat,errors:function(ie){return ie=l(ie),k+=ie.length,ie},positions:function(ie,le){return ie=l(ie,"float64"),le.count=Math.floor(ie.length/2),le.bounds=i(ie,2),le.offset=E,E+=le.count,ie}},{color:function(ie,le){var he=le.count;if(ie||(ie="transparent"),!Array.isArray(ie)||typeof ie[0]=="number"){var $=ie;ie=Array(he);for(var Z=0;Z 0. && baClipping < length(normalWidth * endBotJoin)) { + //handle miter clipping + bTopCoord -= normalWidth * endTopJoin; + bTopCoord += normalize(endTopJoin * normalWidth) * baClipping; + } + + if (nextReverse) { + //make join rectangular + vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5; + float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.); + bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; + bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; + } + else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) { + //handle miter clipping + aBotCoord -= normalWidth * startBotJoin; + aBotCoord += normalize(startBotJoin * normalWidth) * abClipping; + } + + vec2 aTopPosition = (aTopCoord) * adjustedScale + translate; + vec2 aBotPosition = (aBotCoord) * adjustedScale + translate; + + vec2 bTopPosition = (bTopCoord) * adjustedScale + translate; + vec2 bBotPosition = (bBotCoord) * adjustedScale + translate; + + //position is normalized 0..1 coord on the screen + vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd; + + startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy; + endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy; + + gl_Position = vec4(position * 2.0 - 1.0, depth, 1); + + enableStartMiter = step(dot(currTangent, prevTangent), .5); + enableEndMiter = step(dot(currTangent, nextTangent), .5); + + //bevel miter cutoffs + if (miterMode == 1.) { + if (enableStartMiter == 1.) { + vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5; + startCutoff = vec4(aCoord, aCoord); + startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; + startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + startCutoff += viewport.xyxy; + startCutoff += startMiterWidth.xyxy; + } + + if (enableEndMiter == 1.) { + vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5; + endCutoff = vec4(bCoord, bCoord); + endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; + endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + endCutoff += viewport.xyxy; + endCutoff += endMiterWidth.xyxy; + } + } + + //round miter cutoffs + else if (miterMode == 2.) { + if (enableStartMiter == 1.) { + vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5; + startCutoff = vec4(aCoord, aCoord); + startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; + startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + startCutoff += viewport.xyxy; + startCutoff += startMiterWidth.xyxy; + } + + if (enableEndMiter == 1.) { + vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5; + endCutoff = vec4(bCoord, bCoord); + endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; + endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + endCutoff += viewport.xyxy; + endCutoff += endMiterWidth.xyxy; + } + } +} +`]),frag:y([`precision highp float; +#define GLSLIFY 1 + +uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode; +uniform sampler2D dashTexture; + +varying vec4 fragColor; +varying vec2 tangent; +varying vec4 startCutoff, endCutoff; +varying vec2 startCoord, endCoord; +varying float enableStartMiter, enableEndMiter; + +float distToLine(vec2 p, vec2 a, vec2 b) { + vec2 diff = b - a; + vec2 perp = normalize(vec2(-diff.y, diff.x)); + return dot(p - a, perp); +} + +void main() { + float alpha = 1., distToStart, distToEnd; + float cutoff = thickness * .5; + + //bevel miter + if (miterMode == 1.) { + if (enableStartMiter == 1.) { + distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); + if (distToStart < -1.) { + discard; + return; + } + alpha *= min(max(distToStart + 1., 0.), 1.); + } + + if (enableEndMiter == 1.) { + distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); + if (distToEnd < -1.) { + discard; + return; + } + alpha *= min(max(distToEnd + 1., 0.), 1.); + } + } + + // round miter + else if (miterMode == 2.) { + if (enableStartMiter == 1.) { + distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); + if (distToStart < 0.) { + float radius = length(gl_FragCoord.xy - startCoord); + + if(radius > cutoff + .5) { + discard; + return; + } + + alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); + } + } + + if (enableEndMiter == 1.) { + distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); + if (distToEnd < 0.) { + float radius = length(gl_FragCoord.xy - endCoord); + + if(radius > cutoff + .5) { + discard; + return; + } + + alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); + } + } + } + + float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25; + float dash = texture2D(dashTexture, vec2(t, .5)).r; + + gl_FragColor = fragColor; + gl_FragColor.a *= alpha * opacity * dash; +} +`]),attributes:{lineEnd:{buffer:A,divisor:0,stride:8,offset:0},lineTop:{buffer:A,divisor:0,stride:8,offset:4},aColor:{buffer:g.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:g.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:g.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:g.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:g.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:g.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},v))}catch{x=h}var C=g({primitive:"triangle",elements:function(D,L){return L.triangles},offset:0,vert:y([`precision highp float; +#define GLSLIFY 1 + +attribute vec2 position, positionFract; + +uniform vec4 color; +uniform vec2 scale, scaleFract, translate, translateFract; +uniform float pixelRatio, id; +uniform vec4 viewport; +uniform float opacity; + +varying vec4 fragColor; + +const float MAX_LINES = 256.; + +void main() { + float depth = (MAX_LINES - 4. - id) / (MAX_LINES); + + vec2 position = position * scale + translate + + positionFract * scale + translateFract + + position * scaleFract + + positionFract * scaleFract; + + gl_Position = vec4(position * 2.0 - 1.0, depth, 1); + + fragColor = color / 255.; + fragColor.a *= opacity; +} +`]),frag:y([`precision highp float; +#define GLSLIFY 1 + +varying vec4 fragColor; + +void main() { + gl_FragColor = fragColor; +} +`]),uniforms:{scale:g.prop("scale"),color:g.prop("fill"),scaleFract:g.prop("scaleFract"),translateFract:g.prop("translateFract"),translate:g.prop("translate"),opacity:g.prop("opacity"),pixelRatio:g.context("pixelRatio"),id:g.prop("id"),viewport:function(D,L){return[L.viewport.x,L.viewport.y,D.viewportWidth,D.viewportHeight]}},attributes:{position:{buffer:g.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:g.prop("positionFractBuffer"),stride:8,offset:8}},blend:v.blend,depth:{enable:!1},scissor:v.scissor,stencil:v.stencil,viewport:v.viewport});return{fill:C,rect:h,miter:x}},b.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},b.prototype.render=function(){for(var g,A=[],v=arguments.length;v--;)A[v]=arguments[v];A.length&&(g=this).update.apply(g,A),this.draw()},b.prototype.draw=function(){for(var g=this,A=[],v=arguments.length;v--;)A[v]=arguments[v];return(A.length?A:this.passes).forEach(function(h,x){var C;if(h&&Array.isArray(h))return(C=g).draw.apply(C,h);typeof h=="number"&&(h=g.passes[h]),h&&h.count>1&&h.opacity&&(g.regl._refresh(),h.fill&&h.triangles&&h.triangles.length>2&&g.shaders.fill(h),h.thickness&&(h.scale[0]*h.viewport.width>b.precisionThreshold||h.scale[1]*h.viewport.height>b.precisionThreshold||h.join==="rect"||!h.join&&(h.thickness<=2||h.count>=b.maxPoints)?g.shaders.rect(h):g.shaders.miter(h)))}),this},b.prototype.update=function(g){var A=this;if(!!g){g.length!=null?typeof g[0]=="number"&&(g=[{positions:g}]):Array.isArray(g)||(g=[g]);var v=this,h=v.regl,x=v.gl;if(g.forEach(function(M,S){var f=A.passes[S];if(M!==void 0){if(M===null){A.passes[S]=null;return}if(typeof M[0]=="number"&&(M={positions:M}),M=p(M,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),f||(A.passes[S]=f={id:S,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:h.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:h.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:h.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:h.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},M=t({},b.defaults,M)),M.thickness!=null&&(f.thickness=parseFloat(M.thickness)),M.opacity!=null&&(f.opacity=parseFloat(M.opacity)),M.miterLimit!=null&&(f.miterLimit=parseFloat(M.miterLimit)),M.overlay!=null&&(f.overlay=!!M.overlay,S=K});he=he.slice(0,Q),he.push(K)}for(var ae=function(qe){var Oe=U.slice(Z*2,he[qe]*2).concat(K?U.slice(K*2):[]),Ce=(f.hole||[]).map(function(be){return be-K+(he[qe]-Z)}),pe=d(Oe,Ce);pe=pe.map(function(be){return be+Z+(be+Zf.length)&&(P=f.length);for(var E=0,k=new Array(P);E 1.0 + delta) { + discard; + } + + alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius); + + float borderRadius = fragBorderRadius; + float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius); + vec4 color = mix(fragColor, fragBorderColor, ratio); + color.a *= alpha * opacity; + gl_FragColor = color; +} +`]),le.vert=g([`precision highp float; +#define GLSLIFY 1 + +attribute float x, y, xFract, yFract; +attribute float size, borderSize; +attribute vec4 colorId, borderColorId; +attribute float isActive; + +uniform bool constPointSize; +uniform float pixelRatio; +uniform vec2 paletteSize, scale, scaleFract, translate, translateFract; +uniform sampler2D paletteTexture; + +const float maxSize = 100.; + +varying vec4 fragColor, fragBorderColor; +varying float fragBorderRadius, fragWidth; + +float pointSizeScale = (constPointSize) ? 2. : pixelRatio; + +bool isDirect = (paletteSize.x < 1.); + +vec4 getColor(vec4 id) { + return isDirect ? id / 255. : texture2D(paletteTexture, + vec2( + (id.x + .5) / paletteSize.x, + (id.y + .5) / paletteSize.y + ) + ); +} + +void main() { + // ignore inactive points + if (isActive == 0.) return; + + vec2 position = vec2(x, y); + vec2 positionFract = vec2(xFract, yFract); + + vec4 color = getColor(colorId); + vec4 borderColor = getColor(borderColorId); + + float size = size * maxSize / 255.; + float borderSize = borderSize * maxSize / 255.; + + gl_PointSize = (size + borderSize) * pointSizeScale; + + vec2 pos = (position + translate) * scale + + (positionFract + translateFract) * scale + + (position + translate) * scaleFract + + (positionFract + translateFract) * scaleFract; + + gl_Position = vec4(pos * 2. - 1., 0., 1.); + + fragBorderRadius = 1. - 2. * borderSize / (size + borderSize); + fragColor = color; + fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; + fragWidth = 1. / gl_PointSize; +} +`]),x&&(le.frag=le.frag.replace("smoothstep","smoothStep"),ie.frag=ie.frag.replace("smoothstep","smoothStep")),this.drawCircle=f(le)}w.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},w.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},w.prototype.draw=function(){for(var f=this,P=arguments.length,E=new Array(P),k=0;kWe)?De.tree=s(Ae,{bounds:Ze}):We&&We.length&&(De.tree=We),De.tree){var Ke={primitive:"points",usage:"static",data:De.tree,type:"uint32"};De.elements?De.elements(Ke):De.elements=z.elements(Ke)}var lt=C.float32(Ae);_e({data:lt,usage:"dynamic"});var vt=C.fract32(Ae,lt);return Ye({data:vt,usage:"dynamic"}),Pe({data:new Uint8Array(Ve),type:"uint8",usage:"stream"}),Ae}},{marker:function(Ae,De,ke){var We=De.activation;if(We.forEach(function(vt){return vt&&vt.destroy&&vt.destroy()}),We.length=0,!Ae||typeof Ae[0]=="number"){var _e=f.addMarker(Ae);We[_e]=!0}else{for(var Ye=[],Pe=0,Ve=Math.min(Ae.length,De.count);Pe=0)return O;var G;if(f instanceof Uint8Array||f instanceof Uint8ClampedArray)G=f;else{G=new Uint8Array(f.length);for(var z=0,U=f.length;zk*4&&(this.tooManyColors=!0),this.updatePalette(E),O.length===1?O[0]:O},w.prototype.updatePalette=function(f){if(!this.tooManyColors){var P=this.maxColors,E=this.paletteTexture,k=Math.ceil(f.length*.25/P);if(k>1){f=f.slice();for(var O=f.length*.25%P;Ok)&&!(!A.lower&&E2?(h[0],h[2],b=h[1],g=h[3]):h.length?(b=h[0],g=h[1]):(h.x,b=h.y,h.x+h.width,g=h.y+h.height),x.length>2?(A=x[0],v=x[2],x[1],x[3]):x.length?(A=x[0],v=x[1]):(A=x.x,x.y,v=x.x+x.width,x.y+x.height),[A,b,v,g]}function a(o){if(typeof o=="number")return[o,o,o,o];if(o.length===2)return[o[0],o[1],o[0],o[1]];var c=l(o);return[c.x,c.y,c.x+c.width,c.y+c.height]}},98580:function(R){(function(F,e){R.exports=e()})(this,function(){function F(xt,jt){this.id=de++,this.type=xt,this.data=jt}function e(xt){if(xt.length===0)return[];var jt=xt.charAt(0),Yt=xt.charAt(xt.length-1);if(1"u"?1:window.devicePixelRatio,Dt=!1,Mt={},zt=function(Kt){},Vt=function(){};if(typeof jt=="string"?Yt=document.querySelector(jt):typeof jt=="object"&&(typeof jt.nodeName=="string"&&typeof jt.appendChild=="function"&&typeof jt.getBoundingClientRect=="function"?Yt=jt:typeof jt.drawArrays=="function"||typeof jt.drawElements=="function"?(ht=jt,dr=ht.canvas):("gl"in jt?ht=jt.gl:"canvas"in jt?dr=d(jt.canvas):"container"in jt&&(br=d(jt.container)),"attributes"in jt&&(xt=jt.attributes),"extensions"in jt&&(ut=l(jt.extensions)),"optionalExtensions"in jt&&(wt=l(jt.optionalExtensions)),"onDone"in jt&&(zt=jt.onDone),"profile"in jt&&(Dt=!!jt.profile),"pixelRatio"in jt&&(St=+jt.pixelRatio),"cachedCode"in jt&&(Mt=jt.cachedCode))),Yt&&(Yt.nodeName.toLowerCase()==="canvas"?dr=Yt:br=Yt),!ht){if(!dr){if(Yt=y(br||document.body,zt,St),!Yt)return null;dr=Yt.canvas,Vt=Yt.onDestroy}xt.premultipliedAlpha===void 0&&(xt.premultipliedAlpha=!0),ht=p(dr,xt)}return ht?{gl:ht,canvas:dr,container:br,extensions:ut,optionalExtensions:wt,pixelRatio:St,profile:Dt,cachedCode:Mt,onDone:zt,onDestroy:Vt}:(Vt(),zt("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function n(xt,jt){function Yt(ut){ut=ut.toLowerCase();var wt;try{wt=br[ut]=xt.getExtension(ut)}catch{}return!!wt}for(var br={},dr=0;dr>>=jt,Yt=(255>>=Yt,jt|=Yt,Yt=(15>>=Yt,jt|=Yt,Yt=(3>>Yt>>1}function o(){function xt(br){e:{for(var dr=16;268435456>=dr;dr*=16)if(br<=dr){br=dr;break e}br=0}return dr=Yt[a(br)>>2],0>2].push(br)}var Yt=u(8,function(){return[]});return{alloc:xt,free:jt,allocType:function(br,dr){var ht=null;switch(br){case 5120:ht=new Int8Array(xt(dr),0,dr);break;case 5121:ht=new Uint8Array(xt(dr),0,dr);break;case 5122:ht=new Int16Array(xt(2*dr),0,dr);break;case 5123:ht=new Uint16Array(xt(2*dr),0,dr);break;case 5124:ht=new Int32Array(xt(4*dr),0,dr);break;case 5125:ht=new Uint32Array(xt(4*dr),0,dr);break;case 5126:ht=new Float32Array(xt(4*dr),0,dr);break;default:return null}return ht.length!==dr?ht.subarray(0,dr):ht},freeType:function(br){jt(br.buffer)}}}function c(xt){return!!xt&&typeof xt=="object"&&Array.isArray(xt.shape)&&Array.isArray(xt.stride)&&typeof xt.offset=="number"&&xt.shape.length===xt.stride.length&&(Array.isArray(xt.data)||Me(xt.data))}function s(xt,jt,Yt,br,dr,ht){for(var ut=0;utVt&&(Vt=zt.buffer.byteLength,je===5123?Vt>>=1:je===5125&&(Vt>>=2)),zt.vertCount=Vt,Vt=$t,0>$t&&(Vt=4,$t=zt.buffer.dimension,$t===1&&(Vt=0),$t===2&&(Vt=1),$t===3&&(Vt=4)),zt.primType=Vt}function ut(zt){br.elementsCount--,delete wt[zt.id],zt.buffer.destroy(),zt.buffer=null}var wt={},St=0,Dt={uint8:5121,uint16:5123};jt.oes_element_index_uint&&(Dt.uint32=5125),dr.prototype.bind=function(){this.buffer.bind()};var Mt=[];return{create:function(zt,Vt){function Kt(Mr){if(Mr)if(typeof Mr=="number")$t(Mr),ir.primType=4,ir.vertCount=Mr|0,ir.type=5121;else{var Xe=null,je=35044,It=-1,_t=-1,Zt=0,rr=0;Array.isArray(Mr)||Me(Mr)||c(Mr)?Xe=Mr:("data"in Mr&&(Xe=Mr.data),"usage"in Mr&&(je=_e[Mr.usage]),"primitive"in Mr&&(It=Ze[Mr.primitive]),"count"in Mr&&(_t=Mr.count|0),"type"in Mr&&(rr=Dt[Mr.type]),"length"in Mr?Zt=Mr.length|0:(Zt=_t,rr===5123||rr===5122?Zt*=2:(rr===5125||rr===5124)&&(Zt*=4))),ht(ir,Xe,je,It,_t,Zt,rr)}else $t(),ir.primType=4,ir.vertCount=0,ir.type=5121;return Kt}var $t=Yt.create(null,34963,!0),ir=new dr($t._buffer);return br.elementsCount++,Kt(zt),Kt._reglType="elements",Kt._elements=ir,Kt.subdata=function(Mr,Xe){return $t.subdata(Mr,Xe),Kt},Kt.destroy=function(){ut(ir)},Kt},createStream:function(zt){var Vt=Mt.pop();return Vt||(Vt=new dr(Yt.create(null,34963,!0,!1)._buffer)),ht(Vt,zt,35040,-1,-1,0,0),Vt},destroyStream:function(zt){Mt.push(zt)},getElements:function(zt){return typeof zt=="function"&&zt._elements instanceof dr?zt._elements:null},clear:function(){Ae(wt).forEach(ut)}}}function C(xt){for(var jt=Fe.allocType(5123,xt.length),Yt=0;Yt>>31<<15,dr=(ht<<1>>>24)-127,ht=ht>>13&1023;jt[Yt]=-24>dr?br:-14>dr?br+(ht+1024>>-14-dr):15>=Hn,an.height>>=Hn,Vt(an,pn[Hn]),Nr.mipmask|=1<sn;++sn)Nr.images[sn]=null;return Nr}function Zt(Nr){for(var sn=Nr.images,an=0;anNr){for(var sn=0;sn=--this.refCount&&wr(this)}}),ut.profile&&(ht.getTotalTextureSize=function(){var Nr=0;return Object.keys(aa).forEach(function(sn){Nr+=aa[sn].stats.size}),Nr}),{create2D:function(Nr,sn){function an(Hn,Dn){var Ln=pn.texInfo;rr.call(Ln);var Gn=_t();return typeof Hn=="number"?typeof Dn=="number"?Xe(Gn,Hn|0,Dn|0):Xe(Gn,Hn|0,Hn|0):Hn?(sr(Ln,Hn),je(Gn,Hn)):Xe(Gn,1,1),Ln.genMipmaps&&(Gn.mipmask=(Gn.width<<1)-1),pn.mipmask=Gn.mipmask,St(pn,Gn),pn.internalformat=Gn.internalformat,an.width=Gn.width,an.height=Gn.height,hr(pn),It(Gn,3553),nr(Ln,3553),pr(),Zt(Gn),ut.profile&&(pn.stats.size=E(pn.internalformat,pn.type,Gn.width,Gn.height,Ln.genMipmaps,!1)),an.format=zr[pn.internalformat],an.type=kr[pn.type],an.mag=un[Ln.magFilter],an.min=xn[Ln.minFilter],an.wrapS=An[Ln.wrapS],an.wrapT=An[Ln.wrapT],an}var pn=new Bt(3553);return aa[pn.id]=pn,ht.textureCount++,an(Nr,sn),an.subimage=function(Hn,Dn,Ln,Gn){Dn|=0,Ln|=0,Gn|=0;var oa=$t();return St(oa,pn),oa.width=0,oa.height=0,Vt(oa,Hn),oa.width=oa.width||(pn.width>>Gn)-Dn,oa.height=oa.height||(pn.height>>Gn)-Ln,hr(pn),Kt(oa,3553,Dn,Ln,Gn),pr(),ir(oa),an},an.resize=function(Hn,Dn){var Ln=Hn|0,Gn=Dn|0||Ln;if(Ln===pn.width&&Gn===pn.height)return an;an.width=pn.width=Ln,an.height=pn.height=Gn,hr(pn);for(var oa=0;pn.mipmask>>oa;++oa){var Fa=Ln>>oa,ai=Gn>>oa;if(!Fa||!ai)break;xt.texImage2D(3553,oa,pn.format,Fa,ai,0,pn.format,pn.type,null)}return pr(),ut.profile&&(pn.stats.size=E(pn.internalformat,pn.type,Ln,Gn,!1,!1)),an},an._reglType="texture2d",an._texture=pn,ut.profile&&(an.stats=pn.stats),an.destroy=function(){pn.decRef()},an},createCube:function(Nr,sn,an,pn,Hn,Dn){function Ln(Fa,ai,Xt,Ar,on,hn){var vn,Pn=Gn.texInfo;for(rr.call(Pn),vn=0;6>vn;++vn)oa[vn]=_t();if(typeof Fa=="number"||!Fa)for(Fa=Fa|0||1,vn=0;6>vn;++vn)Xe(oa[vn],Fa,Fa);else if(typeof Fa=="object")if(ai)je(oa[0],Fa),je(oa[1],ai),je(oa[2],Xt),je(oa[3],Ar),je(oa[4],on),je(oa[5],hn);else if(sr(Pn,Fa),Dt(Gn,Fa),"faces"in Fa)for(Fa=Fa.faces,vn=0;6>vn;++vn)St(oa[vn],Gn),je(oa[vn],Fa[vn]);else for(vn=0;6>vn;++vn)je(oa[vn],Fa);for(St(Gn,oa[0]),Gn.mipmask=Pn.genMipmaps?(oa[0].width<<1)-1:oa[0].mipmask,Gn.internalformat=oa[0].internalformat,Ln.width=oa[0].width,Ln.height=oa[0].height,hr(Gn),vn=0;6>vn;++vn)It(oa[vn],34069+vn);for(nr(Pn,34067),pr(),ut.profile&&(Gn.stats.size=E(Gn.internalformat,Gn.type,Ln.width,Ln.height,Pn.genMipmaps,!0)),Ln.format=zr[Gn.internalformat],Ln.type=kr[Gn.type],Ln.mag=un[Pn.magFilter],Ln.min=xn[Pn.minFilter],Ln.wrapS=An[Pn.wrapS],Ln.wrapT=An[Pn.wrapT],vn=0;6>vn;++vn)Zt(oa[vn]);return Ln}var Gn=new Bt(34067);aa[Gn.id]=Gn,ht.cubeCount++;var oa=Array(6);return Ln(Nr,sn,an,pn,Hn,Dn),Ln.subimage=function(Fa,ai,Xt,Ar,on){Xt|=0,Ar|=0,on|=0;var hn=$t();return St(hn,Gn),hn.width=0,hn.height=0,Vt(hn,ai),hn.width=hn.width||(Gn.width>>on)-Xt,hn.height=hn.height||(Gn.height>>on)-Ar,hr(Gn),Kt(hn,34069+Fa,Xt,Ar,on),pr(),ir(hn),Ln},Ln.resize=function(Fa){if(Fa|=0,Fa!==Gn.width){Ln.width=Gn.width=Fa,Ln.height=Gn.height=Fa,hr(Gn);for(var ai=0;6>ai;++ai)for(var Xt=0;Gn.mipmask>>Xt;++Xt)xt.texImage2D(34069+ai,Xt,Gn.format,Fa>>Xt,Fa>>Xt,0,Gn.format,Gn.type,null);return pr(),ut.profile&&(Gn.stats.size=E(Gn.internalformat,Gn.type,Ln.width,Ln.height,!1,!0)),Ln}},Ln._reglType="textureCube",Ln._texture=Gn,ut.profile&&(Ln.stats=Gn.stats),Ln.destroy=function(){Gn.decRef()},Ln},clear:function(){for(var Nr=0;Nrpn;++pn)if((an.mipmask&1<>pn,an.height>>pn,0,an.internalformat,an.type,null);else for(var Hn=0;6>Hn;++Hn)xt.texImage2D(34069+Hn,pn,an.internalformat,an.width>>pn,an.height>>pn,0,an.internalformat,an.type,null);nr(an.texInfo,an.target)})},refresh:function(){for(var Nr=0;Nrvr;++vr){for(Kr=0;Krwr;++wr)pr[wr].resize(vr);return hr.width=hr.height=vr,hr},_reglType:"framebufferCube",destroy:function(){pr.forEach(function(wr){wr.destroy()})}})},clear:function(){Ae(nr).forEach(Mr)},restore:function(){It.cur=null,It.next=null,It.dirty=!0,Ae(nr).forEach(function(Bt){Bt.framebuffer=xt.createFramebuffer(),Xe(Bt)})}})}function G(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function z(xt,jt,Yt,br,dr,ht,ut){function wt(Xe){if(Xe!==Mr.currentVAO){var je=jt.oes_vertex_array_object;Xe?je.bindVertexArrayOES(Xe.vao):je.bindVertexArrayOES(null),Mr.currentVAO=Xe}}function St(Xe){if(Xe!==Mr.currentVAO){if(Xe)Xe.bindAttrs();else{for(var je=jt.angle_instanced_arrays,It=0;It=hr.byteLength?pr.subdata(hr):(pr.destroy(),It.buffers[sr]=null)),It.buffers[sr]||(pr=It.buffers[sr]=dr.create(nr,34962,!1,!0)),Bt.buffer=dr.getBuffer(pr),Bt.size=Bt.buffer.dimension|0,Bt.normalized=!1,Bt.type=Bt.buffer.dtype,Bt.offset=0,Bt.stride=0,Bt.divisor=0,Bt.state=1,_t[sr]=1}else dr.getBuffer(nr)?(Bt.buffer=dr.getBuffer(nr),Bt.size=Bt.buffer.dimension|0,Bt.normalized=!1,Bt.type=Bt.buffer.dtype,Bt.offset=0,Bt.stride=0,Bt.divisor=0,Bt.state=1):dr.getBuffer(nr.buffer)?(Bt.buffer=dr.getBuffer(nr.buffer),Bt.size=(+nr.size||Bt.buffer.dimension)|0,Bt.normalized=!!nr.normalized||!1,Bt.type="type"in nr?We[nr.type]:Bt.buffer.dtype,Bt.offset=(nr.offset||0)|0,Bt.stride=(nr.stride||0)|0,Bt.divisor=(nr.divisor||0)|0,Bt.state=1):"x"in nr&&(Bt.x=+nr.x||0,Bt.y=+nr.y||0,Bt.z=+nr.z||0,Bt.w=+nr.w||0,Bt.state=2)}for(pr=0;pr$t&&($t=ir.stats.uniformsCount)}),$t},Yt.getMaxAttributesCount=function(){var $t=0;return Vt.forEach(function(ir){ir.stats.attributesCount>$t&&($t=ir.stats.attributesCount)}),$t}),{clear:function(){var $t=xt.deleteShader.bind(xt);Ae(Dt).forEach($t),Dt={},Ae(Mt).forEach($t),Mt={},Vt.forEach(function(ir){xt.deleteProgram(ir.program)}),Vt.length=0,zt={},Yt.shaderCount=0},program:function($t,ir,Mr,Xe){var je=zt[ir];je||(je=zt[ir]={});var It=je[$t];if(It&&(It.refCount++,!Xe))return It;var _t=new wt(ir,$t);return Yt.shaderCount++,St(_t,Mr,Xe),It||(je[$t]=_t),Vt.push(_t),oe(_t,{destroy:function(){if(_t.refCount--,0>=_t.refCount){xt.deleteProgram(_t.program);var Zt=Vt.indexOf(_t);Vt.splice(Zt,1),Yt.shaderCount--}0>=je[_t.vertId].refCount&&(xt.deleteShader(Mt[_t.vertId]),delete Mt[_t.vertId],delete zt[_t.fragId][_t.vertId]),Object.keys(zt[_t.fragId]).length||(xt.deleteShader(Dt[_t.fragId]),delete Dt[_t.fragId],delete zt[_t.fragId])}})},restore:function(){Dt={},Mt={};for(var $t=0;$t>2),br=0;br>5]|=(xt.charCodeAt(br/8)&255)<<24-br%32;var Yt=8*xt.length;xt=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225];var br=Array(64),dr,ht,ut,wt,St,Dt,Mt,zt,Vt,Kt,$t;for(jt[Yt>>5]|=128<<24-Yt%32,jt[(Yt+64>>9<<4)+15]=Yt,zt=0;ztVt;Vt++){if(16>Vt)br[Vt]=jt[Vt+zt];else{Kt=Vt,$t=br[Vt-2],$t=re($t,17)^re($t,19)^$t>>>10,$t=ie($t,br[Vt-7]);var ir;ir=br[Vt-15],ir=re(ir,7)^re(ir,18)^ir>>>3,br[Kt]=ie(ie($t,ir),br[Vt-16])}Kt=wt,Kt=re(Kt,6)^re(Kt,11)^re(Kt,25),Kt=ie(ie(ie(ie(Mt,Kt),wt&St^~wt&Dt),ct[Vt]),br[Vt]),Mt=Yt,Mt=re(Mt,2)^re(Mt,13)^re(Mt,22),$t=ie(Mt,Yt&dr^Yt&ht^dr&ht),Mt=Dt,Dt=St,St=wt,wt=ie(ut,Kt),ut=ht,ht=dr,dr=Yt,Yt=ie(Kt,$t)}xt[0]=ie(Yt,xt[0]),xt[1]=ie(dr,xt[1]),xt[2]=ie(ht,xt[2]),xt[3]=ie(ut,xt[3]),xt[4]=ie(wt,xt[4]),xt[5]=ie(St,xt[5]),xt[6]=ie(Dt,xt[6]),xt[7]=ie(Mt,xt[7])}for(jt="",br=0;br<32*xt.length;br+=8)jt+=String.fromCharCode(xt[br>>5]>>>24-br%32&255);return jt}function W(xt){for(var jt="",Yt,br=0;br>>4&15)+"0123456789abcdef".charAt(Yt&15);return jt}function q(xt){for(var jt="",Yt=-1,br,dr;++Yt=br&&56320<=dr&&57343>=dr&&(br=65536+((br&1023)<<10)+(dr&1023),Yt++),127>=br?jt+=String.fromCharCode(br):2047>=br?jt+=String.fromCharCode(192|br>>>6&31,128|br&63):65535>=br?jt+=String.fromCharCode(224|br>>>12&15,128|br>>>6&63,128|br&63):2097151>=br&&(jt+=String.fromCharCode(240|br>>>18&7,128|br>>>12&63,128|br>>>6&63,128|br&63));return jt}function re(xt,jt){return xt>>>jt|xt<<32-jt}function ie(xt,jt){var Yt=(xt&65535)+(jt&65535);return(xt>>16)+(jt>>16)+(Yt>>16)<<16|Yt&65535}function le(xt){return Array.prototype.slice.call(xt)}function he(xt){return le(xt).join("")}function $(xt){function jt(){var Mt=[],zt=[];return oe(function(){Mt.push.apply(Mt,le(arguments))},{def:function(){var Vt="v"+dr++;return zt.push(Vt),0"+ua+"?"+Ir+".constant["+ua+"]:0;"}).join(""),"}}else{","if(",On,"(",Ir,".buffer)){",ea,"=",Yn,".createStream(",34962,",",Ir,".buffer);","}else{",ea,"=",Yn,".getBuffer(",Ir,".buffer);","}",ca,'="type" in ',Ir,"?",dn.glTypes,"[",Ir,".type]:",ea,".dtype;",gn.normalized,"=!!",Ir,".normalized;"),Er("size"),Er("offset"),Er("stride"),Er("divisor"),Pr("}}"),Pr.exit("if(",gn.isStream,"){",Yn,".destroyStream(",ea,");","}"),gn})}),vn}function vr(Xt){var Ar=Xt.static,on=Xt.dynamic,hn={};return Object.keys(Ar).forEach(function(vn){var Pn=Ar[vn];hn[vn]=fe(function(Mn,cn){return typeof Pn=="number"||typeof Pn=="boolean"?""+Pn:Mn.link(Pn)})}),Object.keys(on).forEach(function(vn){var Pn=on[vn];hn[vn]=te(Pn,function(Mn,cn){return Mn.invoke(cn,Pn)})}),hn}function Jr(Xt,Ar,on,hn,vn){function Pn(kn){var ea=cn[kn];ea&&(Er[kn]=ea)}var Mn=sr(Xt,Ar),On=Zt(Xt),cn=rr(Xt,On),Pr=Bt(Xt),Er=hr(Xt),Ir=nr(Xt,vn,Mn);Pn("viewport"),Pn(Mr("scissor.box"));var dn=0"u"?"Date.now()":"performance.now()"}function Mn(kn){Yn=Ar.def(),kn(Yn,"=",Pn(),";"),typeof vn=="string"?kn(Ir,".count+=",vn,";"):kn(Ir,".count++;"),Kt&&(hn?(gn=Ar.def(),kn(gn,"=",On,".getNumPendingQueries();")):kn(On,".beginQuery(",Ir,");"))}function cn(kn){kn(Ir,".cpuTime+=",Pn(),"-",Yn,";"),Kt&&(hn?kn(On,".pushScopeStats(",gn,",",On,".getNumPendingQueries(),",Ir,");"):kn(On,".endQuery();"))}function Pr(kn){var ea=Ar.def(dn,".profile");Ar(dn,".profile=",kn,";"),Ar.exit(dn,".profile=",ea,";")}var Er=Xt.shared,Ir=Xt.stats,dn=Er.current,On=Er.timer;on=on.profile;var Yn,gn;if(on){if(ae(on)){on.enable?(Mn(Ar),cn(Ar.exit),Pr("true")):Pr("false");return}on=on.append(Xt,Ar),Pr(on)}else on=Ar.def(dn,".profile");Er=Xt.block(),Mn(Er),Ar("if(",on,"){",Er,"}"),Xt=Xt.block(),cn(Xt),Ar.exit("if(",on,"){",Xt,"}")}function mr(Xt,Ar,on,hn,vn){function Pn(Pr){switch(Pr){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}function Mn(Pr,Er,Ir){function dn(){Ar("if(!",kn,".buffer){",Yn,".enableVertexAttribArray(",gn,");}");var ua=Ir.type,ya;ya=Ir.size?Ar.def(Ir.size,"||",Er):Er,Ar("if(",kn,".type!==",ua,"||",kn,".size!==",ya,"||",la.map(function(Po){return kn+"."+Po+"!=="+Ir[Po]}).join("||"),"){",Yn,".bindBuffer(",34962,",",ea,".buffer);",Yn,".vertexAttribPointer(",[gn,ya,ua,Ir.normalized,Ir.stride,Ir.offset],");",kn,".type=",ua,";",kn,".size=",ya,";",la.map(function(Po){return kn+"."+Po+"="+Ir[Po]+";"}).join(""),"}"),Nr&&(ua=Ir.divisor,Ar("if(",kn,".divisor!==",ua,"){",Xt.instancing,".vertexAttribDivisorANGLE(",[gn,ua],");",kn,".divisor=",ua,";}"))}function On(){Ar("if(",kn,".buffer){",Yn,".disableVertexAttribArray(",gn,");",kn,".buffer=null;","}if(",bt.map(function(ua,ya){return kn+"."+ua+"!=="+ca[ya]}).join("||"),"){",Yn,".vertexAttrib4f(",gn,",",ca,");",bt.map(function(ua,ya){return kn+"."+ua+"="+ca[ya]+";"}).join(""),"}")}var Yn=cn.gl,gn=Ar.def(Pr,".location"),kn=Ar.def(cn.attributes,"[",gn,"]");Pr=Ir.state;var ea=Ir.buffer,ca=[Ir.x,Ir.y,Ir.z,Ir.w],la=["buffer","normalized","offset","stride"];Pr===1?dn():Pr===2?On():(Ar("if(",Pr,"===",1,"){"),dn(),Ar("}else{"),On(),Ar("}"))}var cn=Xt.shared;hn.forEach(function(Pr){var Er=Pr.name,Ir=on.attributes[Er],dn;if(Ir){if(!vn(Ir))return;dn=Ir.append(Xt,Ar)}else{if(!vn(lr))return;var On=Xt.scopeAttrib(Er);dn={},Object.keys(new fa).forEach(function(Yn){dn[Yn]=Ar.def(On,".",Yn)})}Mn(Xt.link(Pr),Pn(Pr.info.type),dn)})}function cr(Xt,Ar,on,hn,vn,Pn){for(var Mn=Xt.shared,cn=Mn.gl,Pr,Er=0;Er>1)",kn],");")}function ya(){on(ea,".drawArraysInstancedANGLE(",[On,Yn,gn,kn],");")}dn&&dn!=="null"?la?ua():(on("if(",dn,"){"),ua(),on("}else{"),ya(),on("}")):ya()}function Mn(){function ua(){on(Pr+".drawElements("+[On,gn,ca,Yn+"<<(("+ca+"-5121)>>1)"]+");")}function ya(){on(Pr+".drawArrays("+[On,Yn,gn]+");")}dn&&dn!=="null"?la?ua():(on("if(",dn,"){"),ua(),on("}else{"),ya(),on("}")):ya()}var cn=Xt.shared,Pr=cn.gl,Er=cn.draw,Ir=hn.draw,dn=function(){var ua=Ir.elements,ya=Ar;return ua?((ua.contextDep&&hn.contextDynamic||ua.propDep)&&(ya=on),ua=ua.append(Xt,ya),Ir.elementsActive&&ya("if("+ua+")"+Pr+".bindBuffer(34963,"+ua+".buffer.buffer);")):(ua=ya.def(),ya(ua,"=",Er,".","elements",";","if(",ua,"){",Pr,".bindBuffer(",34963,",",ua,".buffer.buffer);}","else if(",cn.vao,".currentVAO){",ua,"=",Xt.shared.elements+".getElements("+cn.vao,".currentVAO.elements);",an?"":"if("+ua+")"+Pr+".bindBuffer(34963,"+ua+".buffer.buffer);","}")),ua}(),On=vn("primitive"),Yn=vn("offset"),gn=function(){var ua=Ir.count,ya=Ar;return ua?((ua.contextDep&&hn.contextDynamic||ua.propDep)&&(ya=on),ua=ua.append(Xt,ya)):ua=ya.def(Er,".","count"),ua}();if(typeof gn=="number"){if(gn===0)return}else on("if(",gn,"){"),on.exit("}");var kn,ea;Nr&&(kn=vn("instances"),ea=Xt.instancing);var ca=dn+".type",la=Ir.elements&&ae(Ir.elements)&&!Ir.vaoActive;Nr&&(typeof kn!="number"||0<=kn)?typeof kn=="string"?(on("if(",kn,">0){"),Pn(),on("}else if(",kn,"<0){"),Mn(),on("}")):Pn():Mn()}function kr(Xt,Ar,on,hn,vn){return Ar=It(),vn=Ar.proc("body",vn),Nr&&(Ar.instancing=vn.def(Ar.shared.extensions,".angle_instanced_arrays")),Xt(Ar,vn,on,hn),Ar.compile().body}function un(Xt,Ar,on,hn){Fn(Xt,Ar),on.useVAO?on.drawVAO?Ar(Xt.shared.vao,".setVAO(",on.drawVAO.append(Xt,Ar),");"):Ar(Xt.shared.vao,".setVAO(",Xt.shared.vao,".targetVAO);"):(Ar(Xt.shared.vao,".setVAO(null);"),mr(Xt,Ar,on,hn.attributes,function(){return!0})),cr(Xt,Ar,on,hn.uniforms,function(){return!0},!1),zr(Xt,Ar,Ar,on)}function xn(Xt,Ar){var on=Xt.proc("draw",1);Fn(Xt,on),_r(Xt,on,Ar.context),Br(Xt,on,Ar.framebuffer),wn(Xt,on,Ar),Kr(Xt,on,Ar.state),In(Xt,on,Ar,!1,!0);var hn=Ar.shader.progVar.append(Xt,on);if(on(Xt.shared.gl,".useProgram(",hn,".program);"),Ar.shader.program)un(Xt,on,Ar,Ar.shader.program);else{on(Xt.shared.vao,".setVAO(null);");var vn=Xt.global.def("{}"),Pn=on.def(hn,".id"),Mn=on.def(vn,"[",Pn,"]");on(Xt.cond(Mn).then(Mn,".call(this,a0);").else(Mn,"=",vn,"[",Pn,"]=",Xt.link(function(cn){return kr(un,Xt,Ar,cn,1)}),"(",hn,");",Mn,".call(this,a0);"))}0=--this.refCount&&ut(this)},dr.profile&&(br.getTotalRenderbufferSize=function(){var zt=0;return Object.keys(Mt).forEach(function(Vt){zt+=Mt[Vt].stats.size}),zt}),{create:function(zt,Vt){function Kt(ir,Mr){var Xe=0,je=0,It=32854;if(typeof ir=="object"&&ir?("shape"in ir?(je=ir.shape,Xe=je[0]|0,je=je[1]|0):("radius"in ir&&(Xe=je=ir.radius|0),"width"in ir&&(Xe=ir.width|0),"height"in ir&&(je=ir.height|0)),"format"in ir&&(It=wt[ir.format])):typeof ir=="number"?(Xe=ir|0,je=typeof Mr=="number"?Mr|0:Xe):ir||(Xe=je=1),Xe!==$t.width||je!==$t.height||It!==$t.format)return Kt.width=$t.width=Xe,Kt.height=$t.height=je,$t.format=It,xt.bindRenderbuffer(36161,$t.renderbuffer),xt.renderbufferStorage(36161,It,Xe,je),dr.profile&&($t.stats.size=be[$t.format]*$t.width*$t.height),Kt.format=St[$t.format],Kt}var $t=new ht(xt.createRenderbuffer());return Mt[$t.id]=$t,br.renderbufferCount++,Kt(zt,Vt),Kt.resize=function(ir,Mr){var Xe=ir|0,je=Mr|0||Xe;return Xe===$t.width&&je===$t.height||(Kt.width=$t.width=Xe,Kt.height=$t.height=je,xt.bindRenderbuffer(36161,$t.renderbuffer),xt.renderbufferStorage(36161,$t.format,Xe,je),dr.profile&&($t.stats.size=be[$t.format]*$t.width*$t.height)),Kt},Kt._reglType="renderbuffer",Kt._renderbuffer=$t,dr.profile&&(Kt.stats=$t.stats),Kt.destroy=function(){$t.decRef()},Kt},clear:function(){Ae(Mt).forEach(ut)},restore:function(){Ae(Mt).forEach(function(zt){zt.renderbuffer=xt.createRenderbuffer(),xt.bindRenderbuffer(36161,zt.renderbuffer),xt.renderbufferStorage(36161,zt.format,zt.width,zt.height)}),xt.bindRenderbuffer(36161,null)}}},He=[];He[6408]=4,He[6407]=3;var st=[];st[5121]=1,st[5126]=4,st[36193]=2;var ct=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],bt=["x","y","z","w"],Lt="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Ut={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Gt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Ft={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},tr={cw:2304,ccw:2305},lr=new Q(!1,!1,!1,function(){}),Or=function(xt,jt){function Yt(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function br(Mt,zt,Vt){var Kt=ut.pop()||new Yt;Kt.startQueryIndex=Mt,Kt.endQueryIndex=zt,Kt.sum=0,Kt.stats=Vt,wt.push(Kt)}if(!jt.ext_disjoint_timer_query)return null;var dr=[],ht=[],ut=[],wt=[],St=[],Dt=[];return{beginQuery:function(Mt){var zt=dr.pop()||jt.ext_disjoint_timer_query.createQueryEXT();jt.ext_disjoint_timer_query.beginQueryEXT(35007,zt),ht.push(zt),br(ht.length-1,ht.length,Mt)},endQuery:function(){jt.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:br,update:function(){var Mt,zt;if(Mt=ht.length,Mt!==0){Dt.length=Math.max(Dt.length,Mt+1),St.length=Math.max(St.length,Mt+1),St[0]=0;var Vt=Dt[0]=0;for(zt=Mt=0;zt=In.length&&br()}var bn=ce(In,xn);In[bn]=An}}}function Dt(){var xn=Kr.viewport,An=Kr.scissor_box;xn[0]=xn[1]=An[0]=An[1]=0,rr.viewportWidth=rr.framebufferWidth=rr.drawingBufferWidth=xn[2]=An[2]=Kt.drawingBufferWidth,rr.viewportHeight=rr.framebufferHeight=rr.drawingBufferHeight=xn[3]=An[3]=Kt.drawingBufferHeight}function Mt(){rr.tick+=1,rr.time=Vt(),Dt(),Br.procs.poll()}function zt(){vr.refresh(),Dt(),Br.procs.refresh(),It&&It.update()}function Vt(){return(Te()-_t)/1e3}if(xt=r(xt),!xt)return null;var Kt=xt.gl,$t=Kt.getContextAttributes();Kt.isContextLost();var ir=n(Kt,xt);if(!ir)return null;var wn=t(),Mr={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},Xe=xt.cachedCode||{},je=ir.extensions,It=Or(Kt,je),_t=Te(),sr=Kt.drawingBufferWidth,Zt=Kt.drawingBufferHeight,rr={tick:0,time:0,viewportWidth:sr,viewportHeight:Zt,framebufferWidth:sr,framebufferHeight:Zt,drawingBufferWidth:sr,drawingBufferHeight:Zt,pixelRatio:xt.pixelRatio},sr={elements:null,primitive:4,count:-1,offset:0,instances:-1},nr=Ie(Kt,je),Bt=h(Kt,Mr,xt,function(xn){return pr.destroyBuffer(xn)}),hr=x(Kt,je,Bt,Mr),pr=z(Kt,je,nr,Mr,Bt,hr,sr),wr=U(Kt,wn,Mr,xt),vr=k(Kt,je,nr,function(){Br.procs.poll()},rr,Mr,xt),Jr=Re(Kt,je,nr,Mr,xt),_r=O(Kt,je,nr,vr,Jr,Mr),Br=ne(Kt,wn,je,nr,Bt,hr,vr,_r,{},pr,wr,sr,rr,It,Xe,xt),wn=H(Kt,_r,Br.procs.poll,rr),Kr=Br.next,Fn=Kt.canvas,In=[],mr=[],cr=[],zr=[xt.onDestroy],kr=null;Fn&&(Fn.addEventListener("webglcontextlost",dr,!1),Fn.addEventListener("webglcontextrestored",ht,!1));var un=_r.setFBO=ut({framebuffer:we.define.call(null,1,"framebuffer")});return zt(),$t=oe(ut,{clear:function(xn){if("framebuffer"in xn)if(xn.framebuffer&&xn.framebuffer_reglType==="framebufferCube")for(var An=0;6>An;++An)un(oe({framebuffer:xn.framebuffer.faces[An]},xn),wt);else un(xn,wt);else wt(null,xn)},prop:we.define.bind(null,1),context:we.define.bind(null,2),this:we.define.bind(null,3),draw:ut({}),buffer:function(xn){return Bt.create(xn,34962,!1,!1)},elements:function(xn){return hr.create(xn,!1)},texture:vr.create2D,cube:vr.createCube,renderbuffer:Jr.create,framebuffer:_r.create,framebufferCube:_r.createCube,vao:pr.createVAO,attributes:$t,frame:St,on:function(xn,An){var bn;switch(xn){case"frame":return St(An);case"lost":bn=mr;break;case"restore":bn=cr;break;case"destroy":bn=zr}return bn.push(An),{cancel:function(){for(var _n=0;_n2?"one of ".concat(d," ").concat(l.slice(0,r-1).join(", "),", or ")+l[r-1]:r===2?"one of ".concat(d," ").concat(l[0]," or ").concat(l[1]):"of ".concat(d," ").concat(l[0])}else return"of ".concat(d," ").concat(String(l))}function t(l,d,r){return l.substr(!r||r<0?0:+r,d.length)===d}function y(l,d,r){return(r===void 0||r>l.length)&&(r=l.length),l.substring(r-d.length,r)===d}function p(l,d,r){return typeof r!="number"&&(r=0),r+d.length>l.length?!1:l.indexOf(d,r)!==-1}i("ERR_INVALID_OPT_VALUE",function(l,d){return'The value "'+d+'" is invalid for option "'+l+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(l,d,r){var n;typeof d=="string"&&t(d,"not ")?(n="must not be",d=d.replace(/^not /,"")):n="must be";var u;if(y(l," argument"))u="The ".concat(l," ").concat(n," ").concat(m(d,"type"));else{var a=p(l,".")?"property":"argument";u='The "'.concat(l,'" ').concat(a," ").concat(n," ").concat(m(d,"type"))}return u+=". Received type ".concat(typeof r),u},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(l){return"The "+l+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(l){return"Cannot call "+l+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(l){return"Unknown encoding: "+l},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),R.exports.q=e},37865:function(R,F,e){var i=e(90386),m=Object.keys||function(a){var o=[];for(var c in a)o.push(c);return o};R.exports=r;var t=e(40410),y=e(37493);e(42018)(r,t);for(var p=m(y.prototype),l=0;l0)if(typeof ne!="string"&&!we.objectMode&&Object.getPrototypeOf(ne)!==p.prototype&&(ne=d(ne)),oe)we.endEmitted?L(te,new h):E(te,we,ne,!0);else if(we.ended)L(te,new A);else{if(we.destroyed)return!1;we.reading=!1,we.decoder&&!ce?(ne=we.decoder.write(ne),we.objectMode||ne.length!==0?E(te,we,ne,!1):W(te,we)):E(te,we,ne,!1)}else oe||(we.reading=!1,W(te,we))}return!we.ended&&(we.length=O?te=O:(te--,te|=te>>>1,te|=te>>>2,te|=te>>>4,te|=te>>>8,te|=te>>>16,te++),te}function z(te,ne){return te<=0||ne.length===0&&ne.ended?0:ne.objectMode?1:te!==te?ne.flowing&&ne.length?ne.buffer.head.data.length:ne.length:(te>ne.highWaterMark&&(ne.highWaterMark=G(te)),te<=ne.length?te:ne.ended?ne.length:(ne.needReadable=!0,0))}f.prototype.read=function(te){u("read",te),te=parseInt(te,10);var ne=this._readableState,ce=te;if(te!==0&&(ne.emittedReadable=!1),te===0&&ne.needReadable&&((ne.highWaterMark!==0?ne.length>=ne.highWaterMark:ne.length>0)||ne.ended))return u("read: emitReadable",ne.length,ne.ended),ne.length===0&&ne.ended?Q(this):H(this),null;if(te=z(te,ne),te===0&&ne.ended)return ne.length===0&&Q(this),null;var oe=ne.needReadable;u("need readable",oe),(ne.length===0||ne.length-te0?de=K(te,ne):de=null,de===null?(ne.needReadable=ne.length<=ne.highWaterMark,te=0):(ne.length-=te,ne.awaitDrain=0),ne.length===0&&(ne.ended||(ne.needReadable=!0),ce!==te&&ne.ended&&Q(this)),de!==null&&this.emit("data",de),de};function U(te,ne){if(u("onEofChunk"),!ne.ended){if(ne.decoder){var ce=ne.decoder.end();ce&&ce.length&&(ne.buffer.push(ce),ne.length+=ne.objectMode?1:ce.length)}ne.ended=!0,ne.sync?H(te):(ne.needReadable=!1,ne.emittedReadable||(ne.emittedReadable=!0,B(te)))}}function H(te){var ne=te._readableState;u("emitReadable",ne.needReadable,ne.emittedReadable),ne.needReadable=!1,ne.emittedReadable||(u("emitReadable",ne.flowing),ne.emittedReadable=!0,i.nextTick(B,te))}function B(te){var ne=te._readableState;u("emitReadable_",ne.destroyed,ne.length,ne.ended),!ne.destroyed&&(ne.length||ne.ended)&&(te.emit("readable"),ne.emittedReadable=!1),ne.needReadable=!ne.flowing&&!ne.ended&&ne.length<=ne.highWaterMark,Z(te)}function W(te,ne){ne.readingMore||(ne.readingMore=!0,i.nextTick(q,te,ne))}function q(te,ne){for(;!ne.reading&&!ne.ended&&(ne.length1&&fe(oe.pipes,te)!==-1)&&!Ie&&(u("false write response, pause",oe.awaitDrain),oe.awaitDrain++),ce.pause())}function De(Ye){u("onerror",Ye),_e(),te.removeListener("error",De),t(te,"error")===0&&L(te,Ye)}M(te,"error",De);function ke(){te.removeListener("finish",We),_e()}te.once("close",ke);function We(){u("onfinish"),te.removeListener("close",ke),_e()}te.once("finish",We);function _e(){u("unpipe"),ce.unpipe(te)}return te.emit("pipe",ce),oe.flowing||(u("pipe resume"),ce.resume()),te};function re(te){return function(){var ce=te._readableState;u("pipeOnDrain",ce.awaitDrain),ce.awaitDrain&&ce.awaitDrain--,ce.awaitDrain===0&&t(te,"data")&&(ce.flowing=!0,Z(te))}}f.prototype.unpipe=function(te){var ne=this._readableState,ce={hasUnpiped:!1};if(ne.pipesCount===0)return this;if(ne.pipesCount===1)return te&&te!==ne.pipes?this:(te||(te=ne.pipes),ne.pipes=null,ne.pipesCount=0,ne.flowing=!1,te&&te.emit("unpipe",this,ce),this);if(!te){var oe=ne.pipes,de=ne.pipesCount;ne.pipes=null,ne.pipesCount=0,ne.flowing=!1;for(var we=0;we0,oe.flowing!==!1&&this.resume()):te==="readable"&&!oe.endEmitted&&!oe.readableListening&&(oe.readableListening=oe.needReadable=!0,oe.flowing=!1,oe.emittedReadable=!1,u("on readable",oe.length,oe.reading),oe.length?H(this):oe.reading||i.nextTick(le,this)),ce},f.prototype.addListener=f.prototype.on,f.prototype.removeListener=function(te,ne){var ce=y.prototype.removeListener.call(this,te,ne);return te==="readable"&&i.nextTick(ie,this),ce},f.prototype.removeAllListeners=function(te){var ne=y.prototype.removeAllListeners.apply(this,arguments);return(te==="readable"||te===void 0)&&i.nextTick(ie,this),ne};function ie(te){var ne=te._readableState;ne.readableListening=te.listenerCount("readable")>0,ne.resumeScheduled&&!ne.paused?ne.flowing=!0:te.listenerCount("data")>0&&te.resume()}function le(te){u("readable nexttick read 0"),te.read(0)}f.prototype.resume=function(){var te=this._readableState;return te.flowing||(u("resume"),te.flowing=!te.readableListening,he(this,te)),te.paused=!1,this};function he(te,ne){ne.resumeScheduled||(ne.resumeScheduled=!0,i.nextTick($,te,ne))}function $(te,ne){u("resume",ne.reading),ne.reading||te.read(0),ne.resumeScheduled=!1,te.emit("resume"),Z(te),ne.flowing&&!ne.reading&&te.read(0)}f.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Z(te){var ne=te._readableState;for(u("flow",ne.flowing);ne.flowing&&te.read()!==null;);}f.prototype.wrap=function(te){var ne=this,ce=this._readableState,oe=!1;te.on("end",function(){if(u("wrapped end"),ce.decoder&&!ce.ended){var Se=ce.decoder.end();Se&&Se.length&&ne.push(Se)}ne.push(null)}),te.on("data",function(Se){if(u("wrapped data"),ce.decoder&&(Se=ce.decoder.write(Se)),!(ce.objectMode&&Se==null)&&!(!ce.objectMode&&(!Se||!Se.length))){var Te=ne.push(Se);Te||(oe=!0,te.pause())}});for(var de in te)this[de]===void 0&&typeof te[de]=="function"&&(this[de]=function(Te){return function(){return te[Te].apply(te,arguments)}}(de));for(var we=0;we=ne.length?(ne.decoder?ce=ne.buffer.join(""):ne.buffer.length===1?ce=ne.buffer.first():ce=ne.buffer.concat(ne.length),ne.buffer.clear()):ce=ne.buffer.consume(te,ne.decoder),ce}function Q(te){var ne=te._readableState;u("endReadable",ne.endEmitted),ne.endEmitted||(ne.ended=!0,i.nextTick(ae,ne,te))}function ae(te,ne){if(u("endReadableNT",te.endEmitted,te.length),!te.endEmitted&&te.length===0&&(te.endEmitted=!0,ne.readable=!1,ne.emit("end"),te.autoDestroy)){var ce=ne._writableState;(!ce||ce.autoDestroy&&ce.finished)&&ne.destroy()}}typeof Symbol=="function"&&(f.from=function(te,ne){return D===void 0&&(D=e(31748)),D(f,te,ne)});function fe(te,ne){for(var ce=0,oe=te.length;ce-1))throw new C(K);return this._writableState.defaultEncoding=K,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function E(Z,K,Q){return!Z.objectMode&&Z.decodeStrings!==!1&&typeof K=="string"&&(K=l.from(K,Q)),K}Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function k(Z,K,Q,ae,fe,te){if(!Q){var ne=E(K,ae,fe);ae!==ne&&(Q=!0,fe="buffer",ae=ne)}var ce=K.objectMode?1:ae.length;K.length+=ce;var oe=K.length0?this.tail.next=g:this.head=g,this.tail=g,++this.length}},{key:"unshift",value:function(b){var g={data:b,next:this.head};this.length===0&&(this.tail=g),this.head=g,++this.length}},{key:"shift",value:function(){if(this.length!==0){var b=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,b}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(b){if(this.length===0)return"";for(var g=this.head,A=""+g.data;g=g.next;)A+=b+g.data;return A}},{key:"concat",value:function(b){if(this.length===0)return r.alloc(0);for(var g=r.allocUnsafe(b>>>0),A=this.head,v=0;A;)o(A.data,g,v),v+=A.data.length,A=A.next;return g}},{key:"consume",value:function(b,g){var A;return bh.length?h.length:b;if(x===h.length?v+=h:v+=h.slice(0,b),b-=x,b===0){x===h.length?(++A,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=h.slice(x));break}++A}return this.length-=A,v}},{key:"_getBuffer",value:function(b){var g=r.allocUnsafe(b),A=this.head,v=1;for(A.data.copy(g),b-=A.data.length;A=A.next;){var h=A.data,x=b>h.length?h.length:b;if(h.copy(g,g.length-b,0,x),b-=x,b===0){x===h.length?(++v,A.next?this.head=A.next:this.head=this.tail=null):(this.head=A,A.data=h.slice(x));break}++v}return this.length-=v,g}},{key:a,value:function(b,g){return u(this,m({},g,{depth:0,customInspect:!1}))}}]),c}()},65756:function(R,F,e){var i=e(90386);function m(r,n){var u=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(n?n(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(l,this,r)):i.nextTick(l,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(c){!n&&c?u._writableState?u._writableState.errorEmitted?i.nextTick(y,u):(u._writableState.errorEmitted=!0,i.nextTick(t,u,c)):i.nextTick(t,u,c):n?(i.nextTick(y,u),n(c)):i.nextTick(y,u)}),this)}function t(r,n){l(r,n),y(r)}function y(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function p(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function l(r,n){r.emit("error",n)}function d(r,n){var u=r._readableState,a=r._writableState;u&&u.autoDestroy||a&&a.autoDestroy?r.destroy(n):r.emit("error",n)}R.exports={destroy:m,undestroy:p,errorOrDestroy:d}},12726:function(R,F,e){var i=e(74322).q.ERR_STREAM_PREMATURE_CLOSE;function m(l){var d=!1;return function(){if(!d){d=!0;for(var r=arguments.length,n=new Array(r),u=0;u0;return r(h,C,D,function(L){A||(A=L),L&&v.forEach(n),!C&&(v.forEach(n),g(A))})});return s.reduce(u)}R.exports=o},56306:function(R,F,e){var i=e(74322).q.ERR_INVALID_OPT_VALUE;function m(y,p,l){return y.highWaterMark!=null?y.highWaterMark:p?y[l]:null}function t(y,p,l,d){var r=m(p,d,l);if(r!=null){if(!(isFinite(r)&&Math.floor(r)===r)||r<0){var n=d?l:"highWaterMark";throw new i(n,r)}return Math.floor(r)}return y.objectMode?16:16384}R.exports={getHighWaterMark:t}},71405:function(R,F,e){R.exports=e(15398).EventEmitter},68019:function(R,F,e){var i=e(71665).Buffer,m=i.isEncoding||function(v){switch(v=""+v,v&&v.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t(v){if(!v)return"utf8";for(var h;;)switch(v){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return v;default:if(h)return;v=(""+v).toLowerCase(),h=!0}}function y(v){var h=t(v);if(typeof h!="string"&&(i.isEncoding===m||!m(v)))throw new Error("Unknown encoding: "+v);return h||v}F.s=p;function p(v){this.encoding=y(v);var h;switch(this.encoding){case"utf16le":this.text=o,this.end=c,h=4;break;case"utf8":this.fillLast=n,h=4;break;case"base64":this.text=s,this.end=b,h=3;break;default:this.write=g,this.end=A;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(h)}p.prototype.write=function(v){if(v.length===0)return"";var h,x;if(this.lastNeed){if(h=this.fillLast(v),h===void 0)return"";x=this.lastNeed,this.lastNeed=0}else x=0;return x>5===6?2:v>>4===14?3:v>>3===30?4:v>>6===2?-1:-2}function d(v,h,x){var C=h.length-1;if(C=0?(D>0&&(v.lastNeed=D-1),D):--C=0?(D>0&&(v.lastNeed=D-2),D):--C=0?(D>0&&(D===2?D=0:v.lastNeed=D-3),D):0))}function r(v,h,x){if((h[0]&192)!==128)return v.lastNeed=0,"\uFFFD";if(v.lastNeed>1&&h.length>1){if((h[1]&192)!==128)return v.lastNeed=1,"\uFFFD";if(v.lastNeed>2&&h.length>2&&(h[2]&192)!==128)return v.lastNeed=2,"\uFFFD"}}function n(v){var h=this.lastTotal-this.lastNeed,x=r(this,v);if(x!==void 0)return x;if(this.lastNeed<=v.length)return v.copy(this.lastChar,h,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,h,0,v.length),this.lastNeed-=v.length}function u(v,h){var x=d(this,v,h);if(!this.lastNeed)return v.toString("utf8",h);this.lastTotal=x;var C=v.length-(x-this.lastNeed);return v.copy(this.lastChar,0,C),v.toString("utf8",h,C)}function a(v){var h=v&&v.length?this.write(v):"";return this.lastNeed?h+"\uFFFD":h}function o(v,h){if((v.length-h)%2===0){var x=v.toString("utf16le",h);if(x){var C=x.charCodeAt(x.length-1);if(C>=55296&&C<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],x.slice(0,-1)}return x}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",h,v.length-1)}function c(v){var h=v&&v.length?this.write(v):"";if(this.lastNeed){var x=this.lastTotal-this.lastNeed;return h+this.lastChar.toString("utf16le",0,x)}return h}function s(v,h){var x=(v.length-h)%3;return x===0?v.toString("base64",h):(this.lastNeed=3-x,this.lastTotal=3,x===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",h,v.length-x))}function b(v){var h=v&&v.length?this.write(v):"";return this.lastNeed?h+this.lastChar.toString("base64",0,3-this.lastNeed):h}function g(v){return v.toString(this.encoding)}function A(v){return v&&v.length?this.write(v):""}},90715:function(R,F,e){var i=e(32791),m=e(41633)("stream-parser");R.exports=d;var t=-1,y=0,p=1,l=2;function d(v){var h=v&&typeof v._transform=="function",x=v&&typeof v._write=="function";if(!h&&!x)throw new Error("must pass a Writable or Transform stream in");m("extending Parser into stream"),v._bytes=n,v._skipBytes=u,h&&(v._passthrough=a),h?v._transform=c:v._write=o}function r(v){m("initializing parser stream"),v._parserBytesLeft=0,v._parserBuffers=[],v._parserBuffered=0,v._parserState=t,v._parserCallback=null,typeof v.push=="function"&&(v._parserOutput=v.push.bind(v)),v._parserInit=!0}function n(v,h){i(!this._parserCallback,'there is already a "callback" set!'),i(isFinite(v)&&v>0,'can only buffer a finite number of bytes > 0, got "'+v+'"'),this._parserInit||r(this),m("buffering %o bytes",v),this._parserBytesLeft=v,this._parserCallback=h,this._parserState=y}function u(v,h){i(!this._parserCallback,'there is already a "callback" set!'),i(v>0,'can only skip > 0 bytes, got "'+v+'"'),this._parserInit||r(this),m("skipping %o bytes",v),this._parserBytesLeft=v,this._parserCallback=h,this._parserState=p}function a(v,h){i(!this._parserCallback,'There is already a "callback" set!'),i(v>0,'can only pass through > 0 bytes, got "'+v+'"'),this._parserInit||r(this),m("passing through %o bytes",v),this._parserBytesLeft=v,this._parserCallback=h,this._parserState=l}function o(v,h,x){this._parserInit||r(this),m("write(%o bytes)",v.length),typeof h=="function"&&(x=h),g(this,v,null,x)}function c(v,h,x){this._parserInit||r(this),m("transform(%o bytes)",v.length),typeof h!="function"&&(h=this._parserOutput),g(this,v,h,x)}function s(v,h,x,C){return v._parserBytesLeft<=0?C(new Error("got data but not currently parsing anything")):h.length<=v._parserBytesLeft?function(){return b(v,h,x,C)}:function(){var D=h.slice(0,v._parserBytesLeft);return b(v,D,x,function(L){if(L)return C(L);if(h.length>D.length)return function(){return s(v,h.slice(D.length),x,C)}})}}function b(v,h,x,C){if(v._parserBytesLeft-=h.length,m("%o bytes left for stream piece",v._parserBytesLeft),v._parserState===y?(v._parserBuffers.push(h),v._parserBuffered+=h.length):v._parserState===l&&x(h),v._parserBytesLeft===0){var D=v._parserCallback;if(D&&v._parserState===y&&v._parserBuffers.length>1&&(h=Buffer.concat(v._parserBuffers,v._parserBuffered)),v._parserState!==y&&(h=null),v._parserCallback=null,v._parserBuffered=0,v._parserState=t,v._parserBuffers.splice(0),D){var L=[];h&&L.push(h),x&&L.push(x);var w=D.length>L.length;w&&L.push(A(C));var M=D.apply(v,L);if(!w||C===M)return C}}else return C}var g=A(s);function A(v){return function(){for(var h=v.apply(this,arguments);typeof h=="function";)h=h();return h}}},41633:function(R,F,e){var i=e(90386);F=R.exports=e(74469),F.log=y,F.formatArgs=t,F.save=p,F.load=l,F.useColors=m,F.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:d(),F.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function m(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}F.formatters.j=function(r){try{return JSON.stringify(r)}catch(n){return"[UnexpectedJSONParseError]: "+n.message}};function t(r){var n=this.useColors;if(r[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+r[0]+(n?"%c ":" ")+"+"+F.humanize(this.diff),!!n){var u="color: "+this.color;r.splice(1,0,u,"color: inherit");var a=0,o=0;r[0].replace(/%[a-zA-Z%]/g,function(c){c!=="%%"&&(a++,c==="%c"&&(o=a))}),r.splice(o,0,u)}}function y(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function p(r){try{r==null?F.storage.removeItem("debug"):F.storage.debug=r}catch{}}function l(){var r;try{r=F.storage.debug}catch{}return!r&&typeof i<"u"&&"env"in i&&(r={}.DEBUG),r}F.enable(l());function d(){try{return window.localStorage}catch{}}},74469:function(R,F,e){F=R.exports=t.debug=t.default=t,F.coerce=d,F.disable=p,F.enable=y,F.enabled=l,F.humanize=e(11375),F.names=[],F.skips=[],F.formatters={};var i;function m(r){var n=0,u;for(u in r)n=(n<<5)-n+r.charCodeAt(u),n|=0;return F.colors[Math.abs(n)%F.colors.length]}function t(r){function n(){if(!!n.enabled){var u=n,a=+new Date,o=a-(i||a);u.diff=o,u.prev=i,u.curr=a,i=a;for(var c=new Array(arguments.length),s=0;s0)return y(r);if(u==="number"&&isNaN(r)===!1)return n.long?l(r):p(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function y(r){if(r=String(r),!(r.length>100)){var n=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(r);if(!!n){var u=parseFloat(n[1]),a=(n[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return u*t;case"days":case"day":case"d":return u*m;case"hours":case"hour":case"hrs":case"hr":case"h":return u*i;case"minutes":case"minute":case"mins":case"min":case"m":return u*e;case"seconds":case"second":case"secs":case"sec":case"s":return u*F;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}}}function p(r){return r>=m?Math.round(r/m)+"d":r>=i?Math.round(r/i)+"h":r>=e?Math.round(r/e)+"m":r>=F?Math.round(r/F)+"s":r+"ms"}function l(r){return d(r,m,"day")||d(r,i,"hour")||d(r,e,"minute")||d(r,F,"second")||r+" ms"}function d(r,n,u){if(!(r",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof p.ignore=="string"&&(p.ignore=[p.ignore]),p.ignore=p.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var l=i.parse(t,{flat:!0,brackets:p.ignore}),d=l[0],r=d.split(y);if(p.escape){for(var n=[],u=0;u0;){g=v[v.length-1];var h=e[g];if(p[g]=0&&d[g].push(l[C])}p[g]=x}else{if(t[g]===m[g]){for(var D=[],L=[],w=0,x=A.length-1;x>=0;--x){var M=A[x];if(y[M]=!1,D.push(M),L.push(d[M]),w+=d[M].length,l[M]=u.length,M===g){A.length=x;break}}u.push(D);for(var S=new Array(w),x=0;x1&&(s=1),s<-1&&(s=-1),c*Math.acos(s)},l=function(n,u,a,o,c,s,b,g,A,v,h,x){var C=Math.pow(c,2),D=Math.pow(s,2),L=Math.pow(h,2),w=Math.pow(x,2),M=C*D-C*w-D*L;M<0&&(M=0),M/=C*w+D*L,M=Math.sqrt(M)*(b===g?-1:1);var S=M*c/s*x,f=M*-s/c*h,P=v*S-A*f+(n+a)/2,E=A*S+v*f+(u+o)/2,k=(h-S)/c,O=(x-f)/s,G=(-h-S)/c,z=(-x-f)/s,U=p(1,0,k,O),H=p(k,O,G,z);return g===0&&H>0&&(H-=m),g===1&&H<0&&(H+=m),[P,E,U,H]},d=function(n){var u=n.px,a=n.py,o=n.cx,c=n.cy,s=n.rx,b=n.ry,g=n.xAxisRotation,A=g===void 0?0:g,v=n.largeArcFlag,h=v===void 0?0:v,x=n.sweepFlag,C=x===void 0?0:x,D=[];if(s===0||b===0)return[];var L=Math.sin(A*m/360),w=Math.cos(A*m/360),M=w*(u-o)/2+L*(a-c)/2,S=-L*(u-o)/2+w*(a-c)/2;if(M===0&&S===0)return[];s=Math.abs(s),b=Math.abs(b);var f=Math.pow(M,2)/Math.pow(s,2)+Math.pow(S,2)/Math.pow(b,2);f>1&&(s*=Math.sqrt(f),b*=Math.sqrt(f));var P=l(u,a,o,c,s,b,h,C,L,w,M,S),E=i(P,4),k=E[0],O=E[1],G=E[2],z=E[3],U=Math.abs(z)/(m/4);Math.abs(1-U)<1e-7&&(U=1);var H=Math.max(Math.ceil(U),1);z/=H;for(var B=0;Br[2]&&(r[2]=a[o+0]),a[o+1]>r[3]&&(r[3]=a[o+1]);return r}},29988:function(R,F,e){R.exports=m;var i=e(7095);function m(p){for(var l,d=[],r=0,n=0,u=0,a=0,o=null,c=null,s=0,b=0,g=0,A=p.length;g4?(r=v[v.length-4],n=v[v.length-3]):(r=s,n=b),d.push(v)}return d}function t(p,l,d,r){return["C",p,l,d,r,d,r]}function y(p,l,d,r,n,u){return["C",p/3+.6666666666666666*d,l/3+.6666666666666666*r,n/3+.6666666666666666*d,u/3+.6666666666666666*r,n,u]}},82019:function(R,F,e){var i=e(1750),m=e(95616),t=e(31457),y=e(89546),p=e(44781),l=document.createElement("canvas"),d=l.getContext("2d");R.exports=r;function r(a,o){if(!y(a))throw Error("Argument should be valid svg path string");o||(o={});var c,s;o.shape?(c=o.shape[0],s=o.shape[1]):(c=l.width=o.w||o.width||200,s=l.height=o.h||o.height||200);var b=Math.min(c,s),g=o.stroke||0,A=o.viewbox||o.viewBox||i(a),v=[c/(A[2]-A[0]),s/(A[3]-A[1])],h=Math.min(v[0]||0,v[1]||0)/2;if(d.fillStyle="black",d.fillRect(0,0,c,s),d.fillStyle="white",g&&(typeof g!="number"&&(g=1),g>0?d.strokeStyle="white":d.strokeStyle="black",d.lineWidth=Math.abs(g)),d.translate(c*.5,s*.5),d.scale(h,h),u()){var x=new Path2D(a);d.fill(x),g&&d.stroke(x)}else{var C=m(a);t(d,C),d.fill(),g&&d.stroke()}d.setTransform(1,0,0,1,0,0);var D=p(d,{cutoff:o.cutoff!=null?o.cutoff:.5,radius:o.radius!=null?o.radius:b*.5});return D}var n;function u(){if(n!=null)return n;var a=document.createElement("canvas").getContext("2d");if(a.canvas.width=a.canvas.height=1,!window.Path2D)return n=!1;var o=new Path2D("M0,0h1v1h-1v-1Z");a.fillStyle="black",a.fill(o);var c=a.getImageData(0,0,1,1);return n=c&&c.data&&c.data[3]===255}},84267:function(R,F,e){var i;(function(m){var t=/^\s+/,y=/\s+$/,p=0,l=m.round,d=m.min,r=m.max,n=m.random;function u(ne,ce){if(ne=ne||"",ce=ce||{},ne instanceof u)return ne;if(!(this instanceof u))return new u(ne,ce);var oe=a(ne);this._originalInput=ne,this._r=oe.r,this._g=oe.g,this._b=oe.b,this._a=oe.a,this._roundA=l(100*this._a)/100,this._format=ce.format||oe.format,this._gradientType=ce.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=oe.ok,this._tc_id=p++}u.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var ne=this.toRgb();return(ne.r*299+ne.g*587+ne.b*114)/1e3},getLuminance:function(){var ne=this.toRgb(),ce,oe,de,we,Se,Te;return ce=ne.r/255,oe=ne.g/255,de=ne.b/255,ce<=.03928?we=ce/12.92:we=m.pow((ce+.055)/1.055,2.4),oe<=.03928?Se=oe/12.92:Se=m.pow((oe+.055)/1.055,2.4),de<=.03928?Te=de/12.92:Te=m.pow((de+.055)/1.055,2.4),.2126*we+.7152*Se+.0722*Te},setAlpha:function(ne){return this._a=B(ne),this._roundA=l(100*this._a)/100,this},toHsv:function(){var ne=b(this._r,this._g,this._b);return{h:ne.h*360,s:ne.s,v:ne.v,a:this._a}},toHsvString:function(){var ne=b(this._r,this._g,this._b),ce=l(ne.h*360),oe=l(ne.s*100),de=l(ne.v*100);return this._a==1?"hsv("+ce+", "+oe+"%, "+de+"%)":"hsva("+ce+", "+oe+"%, "+de+"%, "+this._roundA+")"},toHsl:function(){var ne=c(this._r,this._g,this._b);return{h:ne.h*360,s:ne.s,l:ne.l,a:this._a}},toHslString:function(){var ne=c(this._r,this._g,this._b),ce=l(ne.h*360),oe=l(ne.s*100),de=l(ne.l*100);return this._a==1?"hsl("+ce+", "+oe+"%, "+de+"%)":"hsla("+ce+", "+oe+"%, "+de+"%, "+this._roundA+")"},toHex:function(ne){return A(this._r,this._g,this._b,ne)},toHexString:function(ne){return"#"+this.toHex(ne)},toHex8:function(ne){return v(this._r,this._g,this._b,this._a,ne)},toHex8String:function(ne){return"#"+this.toHex8(ne)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(W(this._r,255)*100)+"%",g:l(W(this._g,255)*100)+"%",b:l(W(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+l(W(this._r,255)*100)+"%, "+l(W(this._g,255)*100)+"%, "+l(W(this._b,255)*100)+"%)":"rgba("+l(W(this._r,255)*100)+"%, "+l(W(this._g,255)*100)+"%, "+l(W(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:U[A(this._r,this._g,this._b,!0)]||!1},toFilter:function(ne){var ce="#"+h(this._r,this._g,this._b,this._a),oe=ce,de=this._gradientType?"GradientType = 1, ":"";if(ne){var we=u(ne);oe="#"+h(we._r,we._g,we._b,we._a)}return"progid:DXImageTransform.Microsoft.gradient("+de+"startColorstr="+ce+",endColorstr="+oe+")"},toString:function(ne){var ce=!!ne;ne=ne||this._format;var oe=!1,de=this._a<1&&this._a>=0,we=!ce&&de&&(ne==="hex"||ne==="hex6"||ne==="hex3"||ne==="hex4"||ne==="hex8"||ne==="name");return we?ne==="name"&&this._a===0?this.toName():this.toRgbString():(ne==="rgb"&&(oe=this.toRgbString()),ne==="prgb"&&(oe=this.toPercentageRgbString()),(ne==="hex"||ne==="hex6")&&(oe=this.toHexString()),ne==="hex3"&&(oe=this.toHexString(!0)),ne==="hex4"&&(oe=this.toHex8String(!0)),ne==="hex8"&&(oe=this.toHex8String()),ne==="name"&&(oe=this.toName()),ne==="hsl"&&(oe=this.toHslString()),ne==="hsv"&&(oe=this.toHsvString()),oe||this.toHexString())},clone:function(){return u(this.toString())},_applyModification:function(ne,ce){var oe=ne.apply(null,[this].concat([].slice.call(ce)));return this._r=oe._r,this._g=oe._g,this._b=oe._b,this.setAlpha(oe._a),this},lighten:function(){return this._applyModification(L,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(M,arguments)},desaturate:function(){return this._applyModification(x,arguments)},saturate:function(){return this._applyModification(C,arguments)},greyscale:function(){return this._applyModification(D,arguments)},spin:function(){return this._applyModification(S,arguments)},_applyCombination:function(ne,ce){return ne.apply(null,[this].concat([].slice.call(ce)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(f,arguments)},monochromatic:function(){return this._applyCombination(G,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(P,arguments)},tetrad:function(){return this._applyCombination(E,arguments)}},u.fromRatio=function(ne,ce){if(typeof ne=="object"){var oe={};for(var de in ne)ne.hasOwnProperty(de)&&(de==="a"?oe[de]=ne[de]:oe[de]=$(ne[de]));ne=oe}return u(ne,ce)};function a(ne){var ce={r:0,g:0,b:0},oe=1,de=null,we=null,Se=null,Te=!1,Fe=!1;return typeof ne=="string"&&(ne=fe(ne)),typeof ne=="object"&&(ae(ne.r)&&ae(ne.g)&&ae(ne.b)?(ce=o(ne.r,ne.g,ne.b),Te=!0,Fe=String(ne.r).substr(-1)==="%"?"prgb":"rgb"):ae(ne.h)&&ae(ne.s)&&ae(ne.v)?(de=$(ne.s),we=$(ne.v),ce=g(ne.h,de,we),Te=!0,Fe="hsv"):ae(ne.h)&&ae(ne.s)&&ae(ne.l)&&(de=$(ne.s),Se=$(ne.l),ce=s(ne.h,de,Se),Te=!0,Fe="hsl"),ne.hasOwnProperty("a")&&(oe=ne.a)),oe=B(oe),{ok:Te,format:ne.format||Fe,r:d(255,r(ce.r,0)),g:d(255,r(ce.g,0)),b:d(255,r(ce.b,0)),a:oe}}function o(ne,ce,oe){return{r:W(ne,255)*255,g:W(ce,255)*255,b:W(oe,255)*255}}function c(ne,ce,oe){ne=W(ne,255),ce=W(ce,255),oe=W(oe,255);var de=r(ne,ce,oe),we=d(ne,ce,oe),Se,Te,Fe=(de+we)/2;if(de==we)Se=Te=0;else{var Ie=de-we;switch(Te=Fe>.5?Ie/(2-de-we):Ie/(de+we),de){case ne:Se=(ce-oe)/Ie+(ce1&&(De-=1),De<.16666666666666666?Me+(Ae-Me)*6*De:De<.5?Ae:De<.6666666666666666?Me+(Ae-Me)*(.6666666666666666-De)*6:Me}if(ce===0)de=we=Se=oe;else{var Fe=oe<.5?oe*(1+ce):oe+ce-oe*ce,Ie=2*oe-Fe;de=Te(Ie,Fe,ne+.3333333333333333),we=Te(Ie,Fe,ne),Se=Te(Ie,Fe,ne-.3333333333333333)}return{r:de*255,g:we*255,b:Se*255}}function b(ne,ce,oe){ne=W(ne,255),ce=W(ce,255),oe=W(oe,255);var de=r(ne,ce,oe),we=d(ne,ce,oe),Se,Te,Fe=de,Ie=de-we;if(Te=de===0?0:Ie/de,de==we)Se=0;else{switch(de){case ne:Se=(ce-oe)/Ie+(ce>1)+720)%360;--ce;)de.h=(de.h+we)%360,Se.push(u(de));return Se}function G(ne,ce){ce=ce||6;for(var oe=u(ne).toHsv(),de=oe.h,we=oe.s,Se=oe.v,Te=[],Fe=1/ce;ce--;)Te.push(u({h:de,s:we,v:Se})),Se=(Se+Fe)%1;return Te}u.mix=function(ne,ce,oe){oe=oe===0?0:oe||50;var de=u(ne).toRgb(),we=u(ce).toRgb(),Se=oe/100,Te={r:(we.r-de.r)*Se+de.r,g:(we.g-de.g)*Se+de.g,b:(we.b-de.b)*Se+de.b,a:(we.a-de.a)*Se+de.a};return u(Te)},u.readability=function(ne,ce){var oe=u(ne),de=u(ce);return(m.max(oe.getLuminance(),de.getLuminance())+.05)/(m.min(oe.getLuminance(),de.getLuminance())+.05)},u.isReadable=function(ne,ce,oe){var de=u.readability(ne,ce),we,Se;switch(Se=!1,we=te(oe),we.level+we.size){case"AAsmall":case"AAAlarge":Se=de>=4.5;break;case"AAlarge":Se=de>=3;break;case"AAAsmall":Se=de>=7;break}return Se},u.mostReadable=function(ne,ce,oe){var de=null,we=0,Se,Te,Fe,Ie;oe=oe||{},Te=oe.includeFallbackColors,Fe=oe.level,Ie=oe.size;for(var Me=0;Mewe&&(we=Se,de=u(ce[Me]));return u.isReadable(ne,de,{level:Fe,size:Ie})||!Te?de:(oe.includeFallbackColors=!1,u.mostReadable(ne,["#fff","#000"],oe))};var z=u.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},U=u.hexNames=H(z);function H(ne){var ce={};for(var oe in ne)ne.hasOwnProperty(oe)&&(ce[ne[oe]]=oe);return ce}function B(ne){return ne=parseFloat(ne),(isNaN(ne)||ne<0||ne>1)&&(ne=1),ne}function W(ne,ce){ie(ne)&&(ne="100%");var oe=le(ne);return ne=d(ce,r(0,parseFloat(ne))),oe&&(ne=parseInt(ne*ce,10)/100),m.abs(ne-ce)<1e-6?1:ne%ce/parseFloat(ce)}function q(ne){return d(1,r(0,ne))}function re(ne){return parseInt(ne,16)}function ie(ne){return typeof ne=="string"&&ne.indexOf(".")!=-1&&parseFloat(ne)===1}function le(ne){return typeof ne=="string"&&ne.indexOf("%")!=-1}function he(ne){return ne.length==1?"0"+ne:""+ne}function $(ne){return ne<=1&&(ne=ne*100+"%"),ne}function Z(ne){return m.round(parseFloat(ne)*255).toString(16)}function K(ne){return re(ne)/255}var Q=function(){var ne="[-\\+]?\\d+%?",ce="[-\\+]?\\d*\\.\\d+%?",oe="(?:"+ce+")|(?:"+ne+")",de="[\\s|\\(]+("+oe+")[,|\\s]+("+oe+")[,|\\s]+("+oe+")\\s*\\)?",we="[\\s|\\(]+("+oe+")[,|\\s]+("+oe+")[,|\\s]+("+oe+")[,|\\s]+("+oe+")\\s*\\)?";return{CSS_UNIT:new RegExp(oe),rgb:new RegExp("rgb"+de),rgba:new RegExp("rgba"+we),hsl:new RegExp("hsl"+de),hsla:new RegExp("hsla"+we),hsv:new RegExp("hsv"+de),hsva:new RegExp("hsva"+we),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function ae(ne){return!!Q.CSS_UNIT.exec(ne)}function fe(ne){ne=ne.replace(t,"").replace(y,"").toLowerCase();var ce=!1;if(z[ne])ne=z[ne],ce=!0;else if(ne=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var oe;return(oe=Q.rgb.exec(ne))?{r:oe[1],g:oe[2],b:oe[3]}:(oe=Q.rgba.exec(ne))?{r:oe[1],g:oe[2],b:oe[3],a:oe[4]}:(oe=Q.hsl.exec(ne))?{h:oe[1],s:oe[2],l:oe[3]}:(oe=Q.hsla.exec(ne))?{h:oe[1],s:oe[2],l:oe[3],a:oe[4]}:(oe=Q.hsv.exec(ne))?{h:oe[1],s:oe[2],v:oe[3]}:(oe=Q.hsva.exec(ne))?{h:oe[1],s:oe[2],v:oe[3],a:oe[4]}:(oe=Q.hex8.exec(ne))?{r:re(oe[1]),g:re(oe[2]),b:re(oe[3]),a:K(oe[4]),format:ce?"name":"hex8"}:(oe=Q.hex6.exec(ne))?{r:re(oe[1]),g:re(oe[2]),b:re(oe[3]),format:ce?"name":"hex"}:(oe=Q.hex4.exec(ne))?{r:re(oe[1]+""+oe[1]),g:re(oe[2]+""+oe[2]),b:re(oe[3]+""+oe[3]),a:K(oe[4]+""+oe[4]),format:ce?"name":"hex8"}:(oe=Q.hex3.exec(ne))?{r:re(oe[1]+""+oe[1]),g:re(oe[2]+""+oe[2]),b:re(oe[3]+""+oe[3]),format:ce?"name":"hex"}:!1}function te(ne){var ce,oe;return ne=ne||{level:"AA",size:"small"},ce=(ne.level||"AA").toUpperCase(),oe=(ne.size||"small").toLowerCase(),ce!=="AA"&&ce!=="AAA"&&(ce="AA"),oe!=="small"&&oe!=="large"&&(oe="small"),{level:ce,size:oe}}R.exports?R.exports=u:(i=function(){return u}.call(F,e,F,R),i!==void 0&&(R.exports=i))})(Math)},57060:function(R){R.exports=i,R.exports.float32=R.exports.float=i,R.exports.fract32=R.exports.fract=e;var F=new Float32Array(1);function e(m,t){if(m.length){if(m instanceof Float32Array)return new Float32Array(m.length);t instanceof Float32Array||(t=i(m));for(var y=0,p=t.length;y":(y.length>100&&(y=y.slice(0,99)+"\u2026"),y=y.replace(m,function(p){switch(p){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),y)}},47403:function(R,F,e){var i=e(24582),m={object:!0,function:!0,undefined:!0};R.exports=function(t){return i(t)?hasOwnProperty.call(m,typeof t):!1}},82527:function(R,F,e){var i=e(69190),m=e(84985);R.exports=function(t){return m(t)?t:i(t,"%v is not a plain function",arguments[1])}},84985:function(R,F,e){var i=e(73116),m=/^\s*class[\s{/}]/,t=Function.prototype.toString;R.exports=function(y){return!(!i(y)||m.test(t.call(y)))}},24511:function(R,F,e){var i=e(47403);R.exports=function(m){if(!i(m))return!1;try{return m.constructor?m.constructor.prototype===m:!1}catch{return!1}}},9234:function(R,F,e){var i=e(24582),m=e(47403),t=Object.prototype.toString;R.exports=function(y){if(!i(y))return null;if(m(y)){var p=y.toString;if(typeof p!="function"||p===t)return null}try{return""+y}catch{return null}}},10424:function(R,F,e){var i=e(69190),m=e(24582);R.exports=function(t){return m(t)?t:i(t,"Cannot use %v",arguments[1])}},24582:function(R){var F=void 0;R.exports=function(e){return e!==F&&e!==null}},58404:function(R,F,e){var i=e(13547),m=e(12129),t=e(12856).Buffer;e.g.__TYPEDARRAY_POOL||(e.g.__TYPEDARRAY_POOL={UINT8:m([32,0]),UINT16:m([32,0]),UINT32:m([32,0]),BIGUINT64:m([32,0]),INT8:m([32,0]),INT16:m([32,0]),INT32:m([32,0]),BIGINT64:m([32,0]),FLOAT:m([32,0]),DOUBLE:m([32,0]),DATA:m([32,0]),UINT8C:m([32,0]),BUFFER:m([32,0])});var y=typeof Uint8ClampedArray<"u",p=typeof BigUint64Array<"u",l=typeof BigInt64Array<"u",d=e.g.__TYPEDARRAY_POOL;d.UINT8C||(d.UINT8C=m([32,0])),d.BIGUINT64||(d.BIGUINT64=m([32,0])),d.BIGINT64||(d.BIGINT64=m([32,0])),d.BUFFER||(d.BUFFER=m([32,0]));var r=d.DATA,n=d.BUFFER;F.free=function(f){if(t.isBuffer(f))n[i.log2(f.length)].push(f);else{if(Object.prototype.toString.call(f)!=="[object ArrayBuffer]"&&(f=f.buffer),!f)return;var P=f.length||f.byteLength,E=i.log2(P)|0;r[E].push(f)}};function u(S){if(!!S){var f=S.length||S.byteLength,P=i.log2(f);r[P].push(S)}}function a(S){u(S.buffer)}F.freeUint8=F.freeUint16=F.freeUint32=F.freeBigUint64=F.freeInt8=F.freeInt16=F.freeInt32=F.freeBigInt64=F.freeFloat32=F.freeFloat=F.freeFloat64=F.freeDouble=F.freeUint8Clamped=F.freeDataView=a,F.freeArrayBuffer=u,F.freeBuffer=function(f){n[i.log2(f.length)].push(f)},F.malloc=function(f,P){if(P===void 0||P==="arraybuffer")return o(f);switch(P){case"uint8":return c(f);case"uint16":return s(f);case"uint32":return b(f);case"int8":return g(f);case"int16":return A(f);case"int32":return v(f);case"float":case"float32":return h(f);case"double":case"float64":return x(f);case"uint8_clamped":return C(f);case"bigint64":return L(f);case"biguint64":return D(f);case"buffer":return M(f);case"data":case"dataview":return w(f);default:return null}return null};function o(f){var f=i.nextPow2(f),P=i.log2(f),E=r[P];return E.length>0?E.pop():new ArrayBuffer(f)}F.mallocArrayBuffer=o;function c(S){return new Uint8Array(o(S),0,S)}F.mallocUint8=c;function s(S){return new Uint16Array(o(2*S),0,S)}F.mallocUint16=s;function b(S){return new Uint32Array(o(4*S),0,S)}F.mallocUint32=b;function g(S){return new Int8Array(o(S),0,S)}F.mallocInt8=g;function A(S){return new Int16Array(o(2*S),0,S)}F.mallocInt16=A;function v(S){return new Int32Array(o(4*S),0,S)}F.mallocInt32=v;function h(S){return new Float32Array(o(4*S),0,S)}F.mallocFloat32=F.mallocFloat=h;function x(S){return new Float64Array(o(8*S),0,S)}F.mallocFloat64=F.mallocDouble=x;function C(S){return y?new Uint8ClampedArray(o(S),0,S):c(S)}F.mallocUint8Clamped=C;function D(S){return p?new BigUint64Array(o(8*S),0,S):null}F.mallocBigUint64=D;function L(S){return l?new BigInt64Array(o(8*S),0,S):null}F.mallocBigInt64=L;function w(S){return new DataView(o(S),0,S)}F.mallocDataView=w;function M(S){S=i.nextPow2(S);var f=i.log2(S),P=n[f];return P.length>0?P.pop():new t(S)}F.mallocBuffer=M,F.clearCache=function(){for(var f=0;f<32;++f)d.UINT8[f].length=0,d.UINT16[f].length=0,d.UINT32[f].length=0,d.INT8[f].length=0,d.INT16[f].length=0,d.INT32[f].length=0,d.FLOAT[f].length=0,d.DOUBLE[f].length=0,d.BIGUINT64[f].length=0,d.BIGINT64[f].length=0,d.UINT8C[f].length=0,r[f].length=0,n[f].length=0}},90448:function(R){var F=/[\'\"]/;R.exports=function(i){return i?(F.test(i.charAt(0))&&(i=i.substr(1)),F.test(i.charAt(i.length-1))&&(i=i.substr(0,i.length-1)),i):""}},93447:function(R){R.exports=function(e,i,m){Array.isArray(m)||(m=[].slice.call(arguments,2));for(var t=0,y=m.length;t"u"?!1:P.working?P(Se):Se instanceof Map}F.isMap=E;function k(Se){return r(Se)==="[object Set]"}k.working=typeof Set<"u"&&k(new Set);function O(Se){return typeof Set>"u"?!1:k.working?k(Se):Se instanceof Set}F.isSet=O;function G(Se){return r(Se)==="[object WeakMap]"}G.working=typeof WeakMap<"u"&&G(new WeakMap);function z(Se){return typeof WeakMap>"u"?!1:G.working?G(Se):Se instanceof WeakMap}F.isWeakMap=z;function U(Se){return r(Se)==="[object WeakSet]"}U.working=typeof WeakSet<"u"&&U(new WeakSet);function H(Se){return U(Se)}F.isWeakSet=H;function B(Se){return r(Se)==="[object ArrayBuffer]"}B.working=typeof ArrayBuffer<"u"&&B(new ArrayBuffer);function W(Se){return typeof ArrayBuffer>"u"?!1:B.working?B(Se):Se instanceof ArrayBuffer}F.isArrayBuffer=W;function q(Se){return r(Se)==="[object DataView]"}q.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&q(new DataView(new ArrayBuffer(1),0,1));function re(Se){return typeof DataView>"u"?!1:q.working?q(Se):Se instanceof DataView}F.isDataView=re;var ie=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function le(Se){return r(Se)==="[object SharedArrayBuffer]"}function he(Se){return typeof ie>"u"?!1:(typeof le.working>"u"&&(le.working=le(new ie)),le.working?le(Se):Se instanceof ie)}F.isSharedArrayBuffer=he;function $(Se){return r(Se)==="[object AsyncFunction]"}F.isAsyncFunction=$;function Z(Se){return r(Se)==="[object Map Iterator]"}F.isMapIterator=Z;function K(Se){return r(Se)==="[object Set Iterator]"}F.isSetIterator=K;function Q(Se){return r(Se)==="[object Generator]"}F.isGeneratorObject=Q;function ae(Se){return r(Se)==="[object WebAssembly.Module]"}F.isWebAssemblyCompiledModule=ae;function fe(Se){return s(Se,n)}F.isNumberObject=fe;function te(Se){return s(Se,u)}F.isStringObject=te;function ne(Se){return s(Se,a)}F.isBooleanObject=ne;function ce(Se){return l&&s(Se,o)}F.isBigIntObject=ce;function oe(Se){return d&&s(Se,c)}F.isSymbolObject=oe;function de(Se){return fe(Se)||te(Se)||ne(Se)||ce(Se)||oe(Se)}F.isBoxedPrimitive=de;function we(Se){return typeof Uint8Array<"u"&&(W(Se)||he(Se))}F.isAnyArrayBuffer=we,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Se){Object.defineProperty(F,Se,{enumerable:!1,value:function(){throw new Error(Se+" is not supported in userland")}})})},43827:function(R,F,e){var i=e(90386),m=Object.getOwnPropertyDescriptors||function(ie){for(var le=Object.keys(ie),he={},$=0;$=$)return Q;switch(Q){case"%s":return String(he[le++]);case"%d":return Number(he[le++]);case"%j":try{return JSON.stringify(he[le++])}catch{return"[Circular]"}default:return Q}}),K=he[le];le<$;K=he[++le])h(K)||!S(K)?Z+=" "+K:Z+=" "+d(K);return Z},F.deprecate=function(re,ie){if(typeof i<"u"&&i.noDeprecation===!0)return re;if(typeof i>"u")return function(){return F.deprecate(re,ie).apply(this,arguments)};var le=!1;function he(){if(!le){if(i.throwDeprecation)throw new Error(ie);i.traceDeprecation?console.trace(ie):console.error(ie),le=!0}return re.apply(this,arguments)}return he};var y={},p=/^$/;if({}.NODE_DEBUG){var l={}.NODE_DEBUG;l=l.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),p=new RegExp("^"+l+"$","i")}F.debuglog=function(re){if(re=re.toUpperCase(),!y[re])if(p.test(re)){var ie=i.pid;y[re]=function(){var le=F.format.apply(F,arguments);console.error("%s %d: %s",re,ie,le)}}else y[re]=function(){};return y[re]};function d(re,ie){var le={seen:[],stylize:n};return arguments.length>=3&&(le.depth=arguments[2]),arguments.length>=4&&(le.colors=arguments[3]),v(ie)?le.showHidden=ie:ie&&F._extend(le,ie),w(le.showHidden)&&(le.showHidden=!1),w(le.depth)&&(le.depth=2),w(le.colors)&&(le.colors=!1),w(le.customInspect)&&(le.customInspect=!0),le.colors&&(le.stylize=r),a(le,re,le.depth)}F.inspect=d,d.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},d.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function r(re,ie){var le=d.styles[ie];return le?"\x1B["+d.colors[le][0]+"m"+re+"\x1B["+d.colors[le][1]+"m":re}function n(re,ie){return re}function u(re){var ie={};return re.forEach(function(le,he){ie[le]=!0}),ie}function a(re,ie,le){if(re.customInspect&&ie&&E(ie.inspect)&&ie.inspect!==F.inspect&&!(ie.constructor&&ie.constructor.prototype===ie)){var he=ie.inspect(le,re);return D(he)||(he=a(re,he,le)),he}var $=o(re,ie);if($)return $;var Z=Object.keys(ie),K=u(Z);if(re.showHidden&&(Z=Object.getOwnPropertyNames(ie)),P(ie)&&(Z.indexOf("message")>=0||Z.indexOf("description")>=0))return c(ie);if(Z.length===0){if(E(ie)){var Q=ie.name?": "+ie.name:"";return re.stylize("[Function"+Q+"]","special")}if(M(ie))return re.stylize(RegExp.prototype.toString.call(ie),"regexp");if(f(ie))return re.stylize(Date.prototype.toString.call(ie),"date");if(P(ie))return c(ie)}var ae="",fe=!1,te=["{","}"];if(A(ie)&&(fe=!0,te=["[","]"]),E(ie)){var ne=ie.name?": "+ie.name:"";ae=" [Function"+ne+"]"}if(M(ie)&&(ae=" "+RegExp.prototype.toString.call(ie)),f(ie)&&(ae=" "+Date.prototype.toUTCString.call(ie)),P(ie)&&(ae=" "+c(ie)),Z.length===0&&(!fe||ie.length==0))return te[0]+ae+te[1];if(le<0)return M(ie)?re.stylize(RegExp.prototype.toString.call(ie),"regexp"):re.stylize("[Object]","special");re.seen.push(ie);var ce;return fe?ce=s(re,ie,le,K,Z):ce=Z.map(function(oe){return b(re,ie,le,K,oe,fe)}),re.seen.pop(),g(ce,ae,te)}function o(re,ie){if(w(ie))return re.stylize("undefined","undefined");if(D(ie)){var le="'"+JSON.stringify(ie).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return re.stylize(le,"string")}if(C(ie))return re.stylize(""+ie,"number");if(v(ie))return re.stylize(""+ie,"boolean");if(h(ie))return re.stylize("null","null")}function c(re){return"["+Error.prototype.toString.call(re)+"]"}function s(re,ie,le,he,$){for(var Z=[],K=0,Q=ie.length;K-1&&(Z?Q=Q.split(` +`).map(function(fe){return" "+fe}).join(` +`).slice(2):Q=` +`+Q.split(` +`).map(function(fe){return" "+fe}).join(` +`))):Q=re.stylize("[Circular]","special")),w(K)){if(Z&&$.match(/^\d+$/))return Q;K=JSON.stringify(""+$),K.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(K=K.slice(1,-1),K=re.stylize(K,"name")):(K=K.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),K=re.stylize(K,"string"))}return K+": "+Q}function g(re,ie,le){var he=re.reduce(function($,Z){return Z.indexOf(` +`)>=0,$+Z.replace(/\u001b\[\d\d?m/g,"").length+1},0);return he>60?le[0]+(ie===""?"":ie+` + `)+" "+re.join(`, + `)+" "+le[1]:le[0]+ie+" "+re.join(", ")+" "+le[1]}F.types=e(4936);function A(re){return Array.isArray(re)}F.isArray=A;function v(re){return typeof re=="boolean"}F.isBoolean=v;function h(re){return re===null}F.isNull=h;function x(re){return re==null}F.isNullOrUndefined=x;function C(re){return typeof re=="number"}F.isNumber=C;function D(re){return typeof re=="string"}F.isString=D;function L(re){return typeof re=="symbol"}F.isSymbol=L;function w(re){return re===void 0}F.isUndefined=w;function M(re){return S(re)&&O(re)==="[object RegExp]"}F.isRegExp=M,F.types.isRegExp=M;function S(re){return typeof re=="object"&&re!==null}F.isObject=S;function f(re){return S(re)&&O(re)==="[object Date]"}F.isDate=f,F.types.isDate=f;function P(re){return S(re)&&(O(re)==="[object Error]"||re instanceof Error)}F.isError=P,F.types.isNativeError=P;function E(re){return typeof re=="function"}F.isFunction=E;function k(re){return re===null||typeof re=="boolean"||typeof re=="number"||typeof re=="string"||typeof re=="symbol"||typeof re>"u"}F.isPrimitive=k,F.isBuffer=e(45920);function O(re){return Object.prototype.toString.call(re)}function G(re){return re<10?"0"+re.toString(10):re.toString(10)}var z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function U(){var re=new Date,ie=[G(re.getHours()),G(re.getMinutes()),G(re.getSeconds())].join(":");return[re.getDate(),z[re.getMonth()],ie].join(" ")}F.log=function(){console.log("%s - %s",U(),F.format.apply(F,arguments))},F.inherits=e(42018),F._extend=function(re,ie){if(!ie||!S(ie))return re;for(var le=Object.keys(ie),he=le.length;he--;)re[le[he]]=ie[le[he]];return re};function H(re,ie){return Object.prototype.hasOwnProperty.call(re,ie)}var B=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;F.promisify=function(ie){if(typeof ie!="function")throw new TypeError('The "original" argument must be of type Function');if(B&&ie[B]){var le=ie[B];if(typeof le!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(le,B,{value:le,enumerable:!1,writable:!1,configurable:!0}),le}function le(){for(var he,$,Z=new Promise(function(ae,fe){he=ae,$=fe}),K=[],Q=0;Q"u"?e.g:globalThis,r=m(),n=t("String.prototype.slice"),u={},a=Object.getPrototypeOf;l&&y&&a&&i(r,function(s){if(typeof d[s]=="function"){var b=new d[s];if(Symbol.toStringTag in b){var g=a(b),A=y(g,Symbol.toStringTag);if(!A){var v=a(g);A=y(v,Symbol.toStringTag)}u[s]=A.get}}});var o=function(b){var g=!1;return i(u,function(A,v){if(!g)try{var h=A.call(b);h===v&&(g=h)}catch{}}),g},c=e(9187);R.exports=function(b){return c(b)?!l||!(Symbol.toStringTag in b)?n(p(b),8,-1):o(b):!1}},3961:function(R,F,e){var i=e(63489),m=e(56131),t=i.instance();function y(c){this.local=this.regionalOptions[c||""]||this.regionalOptions[""]}y.prototype=new i.baseCalendar,m(y.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(c,s){if(typeof c=="string"){var b=c.match(l);return b?b[0]:""}var g=this._validateYear(c),A=c.month(),v=""+this.toChineseMonth(g,A);return s&&v.length<2&&(v="0"+v),this.isIntercalaryMonth(g,A)&&(v+="i"),v},monthNames:function(c){if(typeof c=="string"){var s=c.match(d);return s?s[0]:""}var b=this._validateYear(c),g=c.month(),A=this.toChineseMonth(b,g),v=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][A-1];return this.isIntercalaryMonth(b,g)&&(v="\u95F0"+v),v},monthNamesShort:function(c){if(typeof c=="string"){var s=c.match(r);return s?s[0]:""}var b=this._validateYear(c),g=c.month(),A=this.toChineseMonth(b,g),v=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][A-1];return this.isIntercalaryMonth(b,g)&&(v="\u95F0"+v),v},parseMonth:function(c,s){c=this._validateYear(c);var b=parseInt(s),g;if(isNaN(b))s[0]==="\u95F0"&&(g=!0,s=s.substring(1)),s[s.length-1]==="\u6708"&&(s=s.substring(0,s.length-1)),b=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(s);else{var A=s[s.length-1];g=A==="i"||A==="I"}var v=this.toMonthIndex(c,b,g);return v},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(c,s){if(c.year&&(c=c.year()),typeof c!="number"||c<1888||c>2111)throw s.replace(/\{0\}/,this.local.name);return c},toMonthIndex:function(c,s,b){var g=this.intercalaryMonth(c),A=b&&s!==g;if(A||s<1||s>12)throw i.local.invalidMonth.replace(/\{0\}/,this.local.name);var v;return g?!b&&s<=g?v=s-1:v=s:v=s-1,v},toChineseMonth:function(c,s){c.year&&(c=c.year(),s=c.month());var b=this.intercalaryMonth(c),g=b?12:11;if(s<0||s>g)throw i.local.invalidMonth.replace(/\{0\}/,this.local.name);var A;return b?s>13;return b},isIntercalaryMonth:function(c,s){c.year&&(c=c.year(),s=c.month());var b=this.intercalaryMonth(c);return!!b&&b===s},leapYear:function(c){return this.intercalaryMonth(c)!==0},weekOfYear:function(c,s,b){var g=this._validateYear(c,i.local.invalidyear),A=u[g-u[0]],v=A>>9&4095,h=A>>5&15,x=A&31,C;C=t.newDate(v,h,x),C.add(4-(C.dayOfWeek()||7),"d");var D=this.toJD(c,s,b)-C.toJD();return 1+Math.floor(D/7)},monthsInYear:function(c){return this.leapYear(c)?13:12},daysInMonth:function(c,s){c.year&&(s=c.month(),c=c.year()),c=this._validateYear(c);var b=n[c-n[0]],g=b>>13,A=g?12:11;if(s>A)throw i.local.invalidMonth.replace(/\{0\}/,this.local.name);var v=b&1<<12-s?30:29;return v},weekDay:function(c,s,b){return(this.dayOfWeek(c,s,b)||7)<6},toJD:function(c,s,b){var g=this._validate(c,v,b,i.local.invalidDate);c=this._validateYear(g.year()),s=g.month(),b=g.day();var A=this.isIntercalaryMonth(c,s),v=this.toChineseMonth(c,s),h=o(c,v,b,A);return t.toJD(h.year,h.month,h.day)},fromJD:function(c){var s=t.fromJD(c),b=a(s.year(),s.month(),s.day()),g=this.toMonthIndex(b.year,b.month,b.isIntercalary);return this.newDate(b.year,g,b.day)},fromString:function(c){var s=c.match(p),b=this._validateYear(+s[1]),g=+s[2],A=!!s[3],v=this.toMonthIndex(b,g,A),h=+s[4];return this.newDate(b,v,h)},add:function(c,s,b){var g=c.year(),A=c.month(),v=this.isIntercalaryMonth(g,A),h=this.toChineseMonth(g,A),x=Object.getPrototypeOf(y.prototype).add.call(this,c,s,b);if(b==="y"){var C=x.year(),D=x.month(),L=this.isIntercalaryMonth(C,h),w=v&&L?this.toMonthIndex(C,h,!0):this.toMonthIndex(C,h,!1);w!==D&&x.month(w)}return x}});var p=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,l=/^\d?\d[iI]?/m,d=/^闰?十?[一二三四五六七八九]?月/m,r=/^闰?十?[一二三四五六七八九]?/m;i.calendars.chinese=y;var n=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],u=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function a(c,s,b,g){var A,v;if(typeof c=="object")A=c,v=s||{};else{var h=typeof c=="number"&&c>=1888&&c<=2111;if(!h)throw new Error("Solar year outside range 1888-2111");var x=typeof s=="number"&&s>=1&&s<=12;if(!x)throw new Error("Solar month outside range 1 - 12");var C=typeof b=="number"&&b>=1&&b<=31;if(!C)throw new Error("Solar day outside range 1 - 31");A={year:c,month:s,day:b},v=g||{}}var D=u[A.year-u[0]],L=A.year<<9|A.month<<5|A.day;v.year=L>=D?A.year:A.year-1,D=u[v.year-u[0]];var w=D>>9&4095,M=D>>5&15,S=D&31,f,P=new Date(w,M-1,S),E=new Date(A.year,A.month-1,A.day);f=Math.round((E-P)/864e5);var k=n[v.year-n[0]],O;for(O=0;O<13;O++){var G=k&1<<12-O?30:29;if(f>13;return!z||O=1888&&c<=2111;if(!x)throw new Error("Lunar year outside range 1888-2111");var C=typeof s=="number"&&s>=1&&s<=12;if(!C)throw new Error("Lunar month outside range 1 - 12");var D=typeof b=="number"&&b>=1&&b<=30;if(!D)throw new Error("Lunar day outside range 1 - 30");var L;typeof g=="object"?(L=!1,v=g):(L=!!g,v=A||{}),h={year:c,month:s,day:b,isIntercalary:L}}var w;w=h.day-1;var M=n[h.year-n[0]],S=M>>13,f;S&&(h.month>S||h.isIntercalary)?f=h.month:f=h.month-1;for(var P=0;P>9&4095,G=k>>5&15,z=k&31,U=new Date(O,G-1,z+w);return v.year=U.getFullYear(),v.month=1+U.getMonth(),v.day=U.getDate(),v}},38751:function(R,F,e){var i=e(63489),m=e(56131);function t(y){this.local=this.regionalOptions[y||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,m(t.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(l){var p=this._validate(l,this.minMonth,this.minDay,i.local.invalidYear),l=p.year()+(p.year()<0?1:0);return l%4===3||l%4===-1},monthsInYear:function(y){return this._validate(y,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear),13},weekOfYear:function(y,p,l){var d=this.newDate(y,p,l);return d.add(-d.dayOfWeek(),"d"),Math.floor((d.dayOfYear()-1)/7)+1},daysInMonth:function(y,p){var l=this._validate(y,p,this.minDay,i.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===13&&this.leapYear(l.year())?1:0)},weekDay:function(y,p,l){return(this.dayOfWeek(y,p,l)||7)<6},toJD:function(y,p,l){var d=this._validate(y,p,l,i.local.invalidDate);return y=d.year(),y<0&&y++,d.day()+(d.month()-1)*30+(y-1)*365+Math.floor(y/4)+this.jdEpoch-1},fromJD:function(y){var p=Math.floor(y)+.5-this.jdEpoch,l=Math.floor((p-Math.floor((p+366)/1461))/365)+1;l<=0&&l--,p=Math.floor(y)+.5-this.newDate(l,1,1).toJD();var d=Math.floor(p/30)+1,r=p-(d-1)*30+1;return this.newDate(l,d,r)}}),i.calendars.coptic=t},86825:function(R,F,e){var i=e(63489),m=e(56131);function t(p){this.local=this.regionalOptions[p||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,m(t.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(p){return this._validate(p,this.minMonth,this.minDay,i.local.invalidYear),!1},monthsInYear:function(p){return this._validate(p,this.minMonth,this.minDay,i.local.invalidYear),13},daysInYear:function(p){return this._validate(p,this.minMonth,this.minDay,i.local.invalidYear),400},weekOfYear:function(p,l,d){var r=this.newDate(p,l,d);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/8)+1},daysInMonth:function(p,l){var d=this._validate(p,l,this.minDay,i.local.invalidMonth);return this.daysPerMonth[d.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(p,l,d){var r=this._validate(p,l,d,i.local.invalidDate);return(r.day()+1)%8},weekDay:function(p,l,d){var r=this.dayOfWeek(p,l,d);return r>=2&&r<=6},extraInfo:function(p,l,d){var r=this._validate(p,l,d,i.local.invalidDate);return{century:y[Math.floor((r.year()-1)/100)+1]||""}},toJD:function(p,l,d){var r=this._validate(p,l,d,i.local.invalidDate);return p=r.year()+(r.year()<0?1:0),l=r.month(),d=r.day(),d+(l>1?16:0)+(l>2?(l-2)*32:0)+(p-1)*400+this.jdEpoch-1},fromJD:function(p){p=Math.floor(p+.5)-Math.floor(this.jdEpoch)-1;var l=Math.floor(p/400)+1;p-=(l-1)*400,p+=p>15?16:0;var d=Math.floor(p/32)+1,r=p-(d-1)*32+1;return this.newDate(l<=0?l-1:l,d,r)}});var y={20:"Fruitbat",21:"Anchovy"};i.calendars.discworld=t},37715:function(R,F,e){var i=e(63489),m=e(56131);function t(y){this.local=this.regionalOptions[y||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,m(t.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(l){var p=this._validate(l,this.minMonth,this.minDay,i.local.invalidYear),l=p.year()+(p.year()<0?1:0);return l%4===3||l%4===-1},monthsInYear:function(y){return this._validate(y,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear),13},weekOfYear:function(y,p,l){var d=this.newDate(y,p,l);return d.add(-d.dayOfWeek(),"d"),Math.floor((d.dayOfYear()-1)/7)+1},daysInMonth:function(y,p){var l=this._validate(y,p,this.minDay,i.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===13&&this.leapYear(l.year())?1:0)},weekDay:function(y,p,l){return(this.dayOfWeek(y,p,l)||7)<6},toJD:function(y,p,l){var d=this._validate(y,p,l,i.local.invalidDate);return y=d.year(),y<0&&y++,d.day()+(d.month()-1)*30+(y-1)*365+Math.floor(y/4)+this.jdEpoch-1},fromJD:function(y){var p=Math.floor(y)+.5-this.jdEpoch,l=Math.floor((p-Math.floor((p+366)/1461))/365)+1;l<=0&&l--,p=Math.floor(y)+.5-this.newDate(l,1,1).toJD();var d=Math.floor(p/30)+1,r=p-(d-1)*30+1;return this.newDate(l,d,r)}}),i.calendars.ethiopian=t},99384:function(R,F,e){var i=e(63489),m=e(56131);function t(p){this.local=this.regionalOptions[p||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,m(t.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(p){var l=this._validate(p,this.minMonth,this.minDay,i.local.invalidYear);return this._leapYear(l.year())},_leapYear:function(p){return p=p<0?p+1:p,y(p*7+1,19)<7},monthsInYear:function(p){return this._validate(p,this.minMonth,this.minDay,i.local.invalidYear),this._leapYear(p.year?p.year():p)?13:12},weekOfYear:function(p,l,d){var r=this.newDate(p,l,d);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(p){var l=this._validate(p,this.minMonth,this.minDay,i.local.invalidYear);return p=l.year(),this.toJD(p===-1?1:p+1,7,1)-this.toJD(p,7,1)},daysInMonth:function(p,l){return p.year&&(l=p.month(),p=p.year()),this._validate(p,l,this.minDay,i.local.invalidMonth),l===12&&this.leapYear(p)||l===8&&y(this.daysInYear(p),10)===5?30:l===9&&y(this.daysInYear(p),10)===3?29:this.daysPerMonth[l-1]},weekDay:function(p,l,d){return this.dayOfWeek(p,l,d)!==6},extraInfo:function(p,l,d){var r=this._validate(p,l,d,i.local.invalidDate);return{yearType:(this.leapYear(r)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(r)%10-3]}},toJD:function(p,l,d){var r=this._validate(p,l,d,i.local.invalidDate);p=r.year(),l=r.month(),d=r.day();var n=p<=0?p+1:p,u=this.jdEpoch+this._delay1(n)+this._delay2(n)+d+1;if(l<7){for(var a=7;a<=this.monthsInYear(p);a++)u+=this.daysInMonth(p,a);for(var a=1;a=this.toJD(l===-1?1:l+1,7,1);)l++;for(var d=pthis.toJD(l,d,this.daysInMonth(l,d));)d++;var r=p-this.toJD(l,d,1)+1;return this.newDate(l,d,r)}});function y(p,l){return p-l*Math.floor(p/l)}i.calendars.hebrew=t},43805:function(R,F,e){var i=e(63489),m=e(56131);function t(y){this.local=this.regionalOptions[y||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,m(t.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012Bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(y){var p=this._validate(y,this.minMonth,this.minDay,i.local.invalidYear);return(p.year()*11+14)%30<11},weekOfYear:function(y,p,l){var d=this.newDate(y,p,l);return d.add(-d.dayOfWeek(),"d"),Math.floor((d.dayOfYear()-1)/7)+1},daysInYear:function(y){return this.leapYear(y)?355:354},daysInMonth:function(y,p){var l=this._validate(y,p,this.minDay,i.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(y,p,l){return this.dayOfWeek(y,p,l)!==5},toJD:function(y,p,l){var d=this._validate(y,p,l,i.local.invalidDate);return y=d.year(),p=d.month(),l=d.day(),y=y<=0?y+1:y,l+Math.ceil(29.5*(p-1))+(y-1)*354+Math.floor((3+11*y)/30)+this.jdEpoch-1},fromJD:function(y){y=Math.floor(y)+.5;var p=Math.floor((30*(y-this.jdEpoch)+10646)/10631);p=p<=0?p-1:p;var l=Math.min(12,Math.ceil((y-29-this.toJD(p,1,1))/29.5)+1),d=y-this.toJD(p,l,1)+1;return this.newDate(p,l,d)}}),i.calendars.islamic=t},88874:function(R,F,e){var i=e(63489),m=e(56131);function t(y){this.local=this.regionalOptions[y||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,m(t.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(l){var p=this._validate(l,this.minMonth,this.minDay,i.local.invalidYear),l=p.year()<0?p.year()+1:p.year();return l%4===0},weekOfYear:function(y,p,l){var d=this.newDate(y,p,l);return d.add(4-(d.dayOfWeek()||7),"d"),Math.floor((d.dayOfYear()-1)/7)+1},daysInMonth:function(y,p){var l=this._validate(y,p,this.minDay,i.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(y,p,l){return(this.dayOfWeek(y,p,l)||7)<6},toJD:function(y,p,l){var d=this._validate(y,p,l,i.local.invalidDate);return y=d.year(),p=d.month(),l=d.day(),y<0&&y++,p<=2&&(y--,p+=12),Math.floor(365.25*(y+4716))+Math.floor(30.6001*(p+1))+l-1524.5},fromJD:function(y){var p=Math.floor(y+.5),l=p+1524,d=Math.floor((l-122.1)/365.25),r=Math.floor(365.25*d),n=Math.floor((l-r)/30.6001),u=n-Math.floor(n<14?1:13),a=d-Math.floor(u>2?4716:4715),o=l-r-Math.floor(30.6001*n);return a<=0&&a--,this.newDate(a,u,o)}}),i.calendars.julian=t},83290:function(R,F,e){var i=e(63489),m=e(56131);function t(l){this.local=this.regionalOptions[l||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,m(t.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(l){return this._validate(l,this.minMonth,this.minDay,i.local.invalidYear),!1},formatYear:function(l){var d=this._validate(l,this.minMonth,this.minDay,i.local.invalidYear);l=d.year();var r=Math.floor(l/400);l=l%400,l+=l<0?400:0;var n=Math.floor(l/20);return r+"."+n+"."+l%20},forYear:function(l){if(l=l.split("."),l.length<3)throw"Invalid Mayan year";for(var d=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";d=d*20+n}return d},monthsInYear:function(l){return this._validate(l,this.minMonth,this.minDay,i.local.invalidYear),18},weekOfYear:function(l,d,r){return this._validate(l,d,r,i.local.invalidDate),0},daysInYear:function(l){return this._validate(l,this.minMonth,this.minDay,i.local.invalidYear),360},daysInMonth:function(l,d){return this._validate(l,d,this.minDay,i.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(l,d,r){var n=this._validate(l,d,r,i.local.invalidDate);return n.day()},weekDay:function(l,d,r){return this._validate(l,d,r,i.local.invalidDate),!0},extraInfo:function(l,d,r){var n=this._validate(l,d,r,i.local.invalidDate),u=n.toJD(),a=this._toHaab(u),o=this._toTzolkin(u);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(l){l-=this.jdEpoch;var d=y(l+8+(18-1)*20,365);return[Math.floor(d/20)+1,y(d,20)]},_toTzolkin:function(l){return l-=this.jdEpoch,[p(l+20,20),p(l+4,13)]},toJD:function(l,d,r){var n=this._validate(l,d,r,i.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(l){l=Math.floor(l)+.5-this.jdEpoch;var d=Math.floor(l/360);l=l%360,l+=l<0?360:0;var r=Math.floor(l/20),n=l%20;return this.newDate(d,r,n)}});function y(l,d){return l-d*Math.floor(l/d)}function p(l,d){return y(l-1,d)+1}i.calendars.mayan=t},29108:function(R,F,e){var i=e(63489),m=e(56131);function t(p){this.local=this.regionalOptions[p||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar;var y=i.instance("gregorian");m(t.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(p){var l=this._validate(p,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear);return y.leapYear(l.year()+(l.year()<1?1:0)+1469)},weekOfYear:function(p,l,d){var r=this.newDate(p,l,d);return r.add(1-(r.dayOfWeek()||7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(p,l){var d=this._validate(p,l,this.minDay,i.local.invalidMonth);return this.daysPerMonth[d.month()-1]+(d.month()===12&&this.leapYear(d.year())?1:0)},weekDay:function(p,l,d){return(this.dayOfWeek(p,l,d)||7)<6},toJD:function(n,l,d){var r=this._validate(n,l,d,i.local.invalidMonth),n=r.year();n<0&&n++;for(var u=r.day(),a=1;a=this.toJD(l+1,1,1);)l++;for(var d=p-Math.floor(this.toJD(l,1,1)+.5)+1,r=1;d>this.daysInMonth(l,r);)d-=this.daysInMonth(l,r),r++;return this.newDate(l,r,d)}}),i.calendars.nanakshahi=t},55422:function(R,F,e){var i=e(63489),m=e(56131);function t(y){this.local=this.regionalOptions[y||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,m(t.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(y){return this.daysInYear(y)!==this.daysPerYear},weekOfYear:function(y,p,l){var d=this.newDate(y,p,l);return d.add(-d.dayOfWeek(),"d"),Math.floor((d.dayOfYear()-1)/7)+1},daysInYear:function(y){var p=this._validate(y,this.minMonth,this.minDay,i.local.invalidYear);if(y=p.year(),typeof this.NEPALI_CALENDAR_DATA[y]>"u")return this.daysPerYear;for(var l=0,d=this.minMonth;d<=12;d++)l+=this.NEPALI_CALENDAR_DATA[y][d];return l},daysInMonth:function(y,p){return y.year&&(p=y.month(),y=y.year()),this._validate(y,p,this.minDay,i.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[y]>"u"?this.daysPerMonth[p-1]:this.NEPALI_CALENDAR_DATA[y][p]},weekDay:function(y,p,l){return this.dayOfWeek(y,p,l)!==6},toJD:function(y,p,l){var d=this._validate(y,p,l,i.local.invalidDate);y=d.year(),p=d.month(),l=d.day();var r=i.instance(),n=0,u=p,a=y;this._createMissingCalendarData(y);var o=y-(u>9||u===9&&l>=this.NEPALI_CALENDAR_DATA[a][0]?56:57);for(p!==9&&(n=l,u--);u!==9;)u<=0&&(u=12,a--),n+=this.NEPALI_CALENDAR_DATA[a][u],u--;return p===9?(n+=l-this.NEPALI_CALENDAR_DATA[a][0],n<0&&(n+=r.daysInYear(o))):n+=this.NEPALI_CALENDAR_DATA[a][9]-this.NEPALI_CALENDAR_DATA[a][0],r.newDate(o,1,1).add(n,"d").toJD()},fromJD:function(y){var p=i.instance(),l=p.fromJD(y),d=l.year(),r=l.dayOfYear(),n=d+56;this._createMissingCalendarData(n);for(var u=9,a=this.NEPALI_CALENDAR_DATA[n][0],o=this.NEPALI_CALENDAR_DATA[n][u]-a+1;r>o;)u++,u>12&&(u=1,n++),o+=this.NEPALI_CALENDAR_DATA[n][u];var c=this.NEPALI_CALENDAR_DATA[n][u]-(o-r);return this.newDate(n,u,c)},_createMissingCalendarData:function(y){var p=this.daysPerMonth.slice(0);p.unshift(17);for(var l=y-1;l"u"&&(this.NEPALI_CALENDAR_DATA[l]=p)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),i.calendars.nepali=t},94320:function(R,F,e){var i=e(63489),m=e(56131);function t(p){this.local=this.regionalOptions[p||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,m(t.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(p){var l=this._validate(p,this.minMonth,this.minDay,i.local.invalidYear);return((l.year()-(l.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(p,l,d){var r=this.newDate(p,l,d);return r.add(-((r.dayOfWeek()+1)%7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(p,l){var d=this._validate(p,l,this.minDay,i.local.invalidMonth);return this.daysPerMonth[d.month()-1]+(d.month()===12&&this.leapYear(d.year())?1:0)},weekDay:function(p,l,d){return this.dayOfWeek(p,l,d)!==5},toJD:function(p,l,d){var r=this._validate(p,l,d,i.local.invalidDate);p=r.year(),l=r.month(),d=r.day();var n=p-(p>=0?474:473),u=474+y(n,2820);return d+(l<=7?(l-1)*31:(l-1)*30+6)+Math.floor((u*682-110)/2816)+(u-1)*365+Math.floor(n/2820)*1029983+this.jdEpoch-1},fromJD:function(p){p=Math.floor(p)+.5;var l=p-this.toJD(475,1,1),d=Math.floor(l/1029983),r=y(l,1029983),n=2820;if(r!==1029982){var u=Math.floor(r/366),a=y(r,366);n=Math.floor((2134*u+2816*a+2815)/1028522)+u+1}var o=n+2820*d+474;o=o<=0?o-1:o;var c=p-this.toJD(o,1,1)+1,s=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),b=p-this.toJD(o,s,1)+1;return this.newDate(o,s,b)}});function y(p,l){return p-l*Math.floor(p/l)}i.calendars.persian=t,i.calendars.jalali=t},31320:function(R,F,e){var i=e(63489),m=e(56131),t=i.instance();function y(p){this.local=this.regionalOptions[p||""]||this.regionalOptions[""]}y.prototype=new i.baseCalendar,m(y.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(d){var l=this._validate(d,this.minMonth,this.minDay,i.local.invalidYear),d=this._t2gYear(l.year());return t.leapYear(d)},weekOfYear:function(n,l,d){var r=this._validate(n,this.minMonth,this.minDay,i.local.invalidYear),n=this._t2gYear(r.year());return t.weekOfYear(n,r.month(),r.day())},daysInMonth:function(p,l){var d=this._validate(p,l,this.minDay,i.local.invalidMonth);return this.daysPerMonth[d.month()-1]+(d.month()===2&&this.leapYear(d.year())?1:0)},weekDay:function(p,l,d){return(this.dayOfWeek(p,l,d)||7)<6},toJD:function(n,l,d){var r=this._validate(n,l,d,i.local.invalidDate),n=this._t2gYear(r.year());return t.toJD(n,r.month(),r.day())},fromJD:function(p){var l=t.fromJD(p),d=this._g2tYear(l.year());return this.newDate(d,l.month(),l.day())},_t2gYear:function(p){return p+this.yearsOffset+(p>=-this.yearsOffset&&p<=-1?1:0)},_g2tYear:function(p){return p-this.yearsOffset-(p>=1&&p<=this.yearsOffset?1:0)}}),i.calendars.taiwan=y},51367:function(R,F,e){var i=e(63489),m=e(56131),t=i.instance();function y(p){this.local=this.regionalOptions[p||""]||this.regionalOptions[""]}y.prototype=new i.baseCalendar,m(y.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(d){var l=this._validate(d,this.minMonth,this.minDay,i.local.invalidYear),d=this._t2gYear(l.year());return t.leapYear(d)},weekOfYear:function(n,l,d){var r=this._validate(n,this.minMonth,this.minDay,i.local.invalidYear),n=this._t2gYear(r.year());return t.weekOfYear(n,r.month(),r.day())},daysInMonth:function(p,l){var d=this._validate(p,l,this.minDay,i.local.invalidMonth);return this.daysPerMonth[d.month()-1]+(d.month()===2&&this.leapYear(d.year())?1:0)},weekDay:function(p,l,d){return(this.dayOfWeek(p,l,d)||7)<6},toJD:function(n,l,d){var r=this._validate(n,l,d,i.local.invalidDate),n=this._t2gYear(r.year());return t.toJD(n,r.month(),r.day())},fromJD:function(p){var l=t.fromJD(p),d=this._g2tYear(l.year());return this.newDate(d,l.month(),l.day())},_t2gYear:function(p){return p-this.yearsOffset-(p>=1&&p<=this.yearsOffset?1:0)},_g2tYear:function(p){return p+this.yearsOffset+(p>=-this.yearsOffset&&p<=-1?1:0)}}),i.calendars.thai=y},21457:function(R,F,e){var i=e(63489),m=e(56131);function t(p){this.local=this.regionalOptions[p||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,m(t.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(p){var l=this._validate(p,this.minMonth,this.minDay,i.local.invalidYear);return this.daysInYear(l.year())===355},weekOfYear:function(p,l,d){var r=this.newDate(p,l,d);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(p){for(var l=0,d=1;d<=12;d++)l+=this.daysInMonth(p,d);return l},daysInMonth:function(p,l){for(var d=this._validate(p,l,this.minDay,i.local.invalidMonth),r=d.toJD()-24e5+.5,n=0,u=0;ur)return y[n]-y[n-1];n++}return 30},weekDay:function(p,l,d){return this.dayOfWeek(p,l,d)!==5},toJD:function(p,l,d){var r=this._validate(p,l,d,i.local.invalidDate),n=12*(r.year()-1)+r.month()-15292,u=r.day()+y[n-1]-1;return u+24e5-.5},fromJD:function(p){for(var l=p-24e5+.5,d=0,r=0;rl);r++)d++;var n=d+15292,u=Math.floor((n-1)/12),a=u+1,o=n-12*u,c=l-y[d-1]+1;return this.newDate(a,o,c)},isValid:function(p,l,d){var r=i.baseCalendar.prototype.isValid.apply(this,arguments);return r&&(p=p.year!=null?p.year:p,r=p>=1276&&p<=1500),r},_validate:function(p,l,d,r){var n=i.baseCalendar.prototype._validate.apply(this,arguments);if(n.year<1276||n.year>1500)throw r.replace(/\{0\}/,this.local.name);return n}}),i.calendars.ummalqura=t;var y=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},63489:function(R,F,e){var i=e(56131);function m(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}i(m.prototype,{instance:function(r,n){r=(r||"gregorian").toLowerCase(),n=n||"";var u=this._localCals[r+"-"+n];if(!u&&this.calendars[r]&&(u=new this.calendars[r](n),this._localCals[r+"-"+n]=u),!u)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,r);return u},newDate:function(r,n,u,a,o){return a=(r!=null&&r.year?r.calendar():typeof a=="string"?this.instance(a,o):a)||this.instance(),a.newDate(r,n,u)},substituteDigits:function(r){return function(n){return(n+"").replace(/[0-9]/g,function(u){return r[u]})}},substituteChineseDigits:function(r,n){return function(u){for(var a="",o=0;u>0;){var c=u%10;a=(c===0?"":r[c]+n[o])+a,o++,u=Math.floor(u/10)}return a.indexOf(r[1]+n[1])===0&&(a=a.substr(1)),a||r[0]}}});function t(r,n,u,a){if(this._calendar=r,this._year=n,this._month=u,this._day=a,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(d.local.invalidDate||d.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function y(r,n){return r=""+r,"000000".substring(0,n-r.length)+r}i(t.prototype,{newDate:function(r,n,u){return this._calendar.newDate(r==null?this:r,n,u)},year:function(r){return arguments.length===0?this._year:this.set(r,"y")},month:function(r){return arguments.length===0?this._month:this.set(r,"m")},day:function(r){return arguments.length===0?this._day:this.set(r,"d")},date:function(r,n,u){if(!this._calendar.isValid(r,n,u))throw(d.local.invalidDate||d.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=r,this._month=n,this._day=u,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(r,n){return this._calendar.add(this,r,n)},set:function(r,n){return this._calendar.set(this,r,n)},compareTo:function(r){if(this._calendar.name!==r._calendar.name)throw(d.local.differentCalendars||d.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,r._calendar.local.name);var n=this._year!==r._year?this._year-r._year:this._month!==r._month?this.monthOfYear()-r.monthOfYear():this._day-r._day;return n===0?0:n<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(r){return this._calendar.fromJD(r)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(r){return this._calendar.fromJSDate(r)},toString:function(){return(this.year()<0?"-":"")+y(Math.abs(this.year()),4)+"-"+y(this.month(),2)+"-"+y(this.day(),2)}});function p(){this.shortYearCutoff="+10"}i(p.prototype,{_validateLevel:0,newDate:function(r,n,u){return r==null?this.today():(r.year&&(this._validate(r,n,u,d.local.invalidDate||d.regionalOptions[""].invalidDate),u=r.day(),n=r.month(),r=r.year()),new t(this,r,n,u))},today:function(){return this.fromJSDate(new Date)},epoch:function(r){var n=this._validate(r,this.minMonth,this.minDay,d.local.invalidYear||d.regionalOptions[""].invalidYear);return n.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(r){var n=this._validate(r,this.minMonth,this.minDay,d.local.invalidYear||d.regionalOptions[""].invalidYear);return(n.year()<0?"-":"")+y(Math.abs(n.year()),4)},monthsInYear:function(r){return this._validate(r,this.minMonth,this.minDay,d.local.invalidYear||d.regionalOptions[""].invalidYear),12},monthOfYear:function(r,n){var u=this._validate(r,n,this.minDay,d.local.invalidMonth||d.regionalOptions[""].invalidMonth);return(u.month()+this.monthsInYear(u)-this.firstMonth)%this.monthsInYear(u)+this.minMonth},fromMonthOfYear:function(r,n){var u=(n+this.firstMonth-2*this.minMonth)%this.monthsInYear(r)+this.minMonth;return this._validate(r,u,this.minDay,d.local.invalidMonth||d.regionalOptions[""].invalidMonth),u},daysInYear:function(r){var n=this._validate(r,this.minMonth,this.minDay,d.local.invalidYear||d.regionalOptions[""].invalidYear);return this.leapYear(n)?366:365},dayOfYear:function(r,n,u){var a=this._validate(r,n,u,d.local.invalidDate||d.regionalOptions[""].invalidDate);return a.toJD()-this.newDate(a.year(),this.fromMonthOfYear(a.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(r,n,u){var a=this._validate(r,n,u,d.local.invalidDate||d.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(a))+2)%this.daysInWeek()},extraInfo:function(r,n,u){return this._validate(r,n,u,d.local.invalidDate||d.regionalOptions[""].invalidDate),{}},add:function(r,n,u){return this._validate(r,this.minMonth,this.minDay,d.local.invalidDate||d.regionalOptions[""].invalidDate),this._correctAdd(r,this._add(r,n,u),n,u)},_add:function(r,n,u){if(this._validateLevel++,u==="d"||u==="w"){var a=r.toJD()+n*(u==="w"?this.daysInWeek():1),o=r.calendar().fromJD(a);return this._validateLevel--,[o.year(),o.month(),o.day()]}try{var c=r.year()+(u==="y"?n:0),s=r.monthOfYear()+(u==="m"?n:0),o=r.day(),b=function(v){for(;sh-1+v.minMonth;)c++,s-=h,h=v.monthsInYear(c)};u==="y"?(r.month()!==this.fromMonthOfYear(c,s)&&(s=this.newDate(c,r.month(),this.minDay).monthOfYear()),s=Math.min(s,this.monthsInYear(c)),o=Math.min(o,this.daysInMonth(c,this.fromMonthOfYear(c,s)))):u==="m"&&(b(this),o=Math.min(o,this.daysInMonth(c,this.fromMonthOfYear(c,s))));var g=[c,this.fromMonthOfYear(c,s),o];return this._validateLevel--,g}catch(A){throw this._validateLevel--,A}},_correctAdd:function(r,n,u,a){if(!this.hasYearZero&&(a==="y"||a==="m")&&(n[0]===0||r.year()>0!=n[0]>0)){var o={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[a],c=u<0?-1:1;n=this._add(r,u*o[0]+c*o[1],o[2])}return r.date(n[0],n[1],n[2])},set:function(r,n,u){this._validate(r,this.minMonth,this.minDay,d.local.invalidDate||d.regionalOptions[""].invalidDate);var a=u==="y"?n:r.year(),o=u==="m"?n:r.month(),c=u==="d"?n:r.day();return(u==="y"||u==="m")&&(c=Math.min(c,this.daysInMonth(a,o))),r.date(a,o,c)},isValid:function(r,n,u){this._validateLevel++;var a=this.hasYearZero||r!==0;if(a){var o=this.newDate(r,n,this.minDay);a=n>=this.minMonth&&n-this.minMonth=this.minDay&&u-this.minDay13.5?13:1),A=o-(g>2.5?4716:4715);return A<=0&&A--,this.newDate(A,g,b)},toJSDate:function(r,n,u){var a=this._validate(r,n,u,d.local.invalidDate||d.regionalOptions[""].invalidDate),o=new Date(a.year(),a.month()-1,a.day());return o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0),o.setHours(o.getHours()>12?o.getHours()+2:0),o},fromJSDate:function(r){return this.newDate(r.getFullYear(),r.getMonth()+1,r.getDate())}});var d=R.exports=new m;d.cdate=t,d.baseCalendar=p,d.calendars.gregorian=l},94338:function(R,F,e){var i=e(56131),m=e(63489);i(m.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),m.local=m.regionalOptions[""],i(m.cdate.prototype,{formatDate:function(t,y){return typeof t!="string"&&(y=t,t=""),this._calendar.formatDate(t||"",this,y)}}),i(m.baseCalendar.prototype,{UNIX_EPOCH:m.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:m.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(t,y,p){if(typeof t!="string"&&(p=y,y=t,t=""),!y)return"";if(y.calendar()!==this)throw m.local.invalidFormat||m.regionalOptions[""].invalidFormat;t=t||this.local.dateFormat,p=p||{};var l=p.dayNamesShort||this.local.dayNamesShort,d=p.dayNames||this.local.dayNames,r=p.monthNumbers||this.local.monthNumbers,n=p.monthNamesShort||this.local.monthNamesShort,u=p.monthNames||this.local.monthNames;p.calculateWeek||this.local.calculateWeek;for(var a=function(D,L){for(var w=1;C+w1},o=function(D,L,w,M){var S=""+L;if(a(D,M))for(;S.length1},C=function(O,G){var z=x(O,G),U=[2,3,z?4:2,z?4:2,10,11,20]["oyYJ@!".indexOf(O)+1],H=new RegExp("^-?\\d{1,"+U+"}"),B=y.substring(f).match(H);if(!B)throw(m.local.missingNumberAt||m.regionalOptions[""].missingNumberAt).replace(/\{0\}/,f);return f+=B[0].length,parseInt(B[0],10)},D=this,L=function(){if(typeof u=="function"){x("m");var O=u.call(D,y.substring(f));return f+=O.length,O}return C("m")},w=function(O,G,z,U){for(var H=x(O,U)?z:G,B=0;B-1){b=1,g=A;for(var k=this.daysInMonth(s,b);g>k;k=this.daysInMonth(s,b))b++,g-=k}return c>-1?this.fromJD(c):this.newDate(s,b,g)},determineDate:function(t,y,p,l,d){p&&typeof p!="object"&&(d=l,l=p,p=null),typeof l!="string"&&(d=l,l="");var r=this,n=function(u){try{return r.parseDate(l,u,d)}catch{}u=u.toLowerCase();for(var a=(u.match(/^c/)&&p?p.newDate():null)||r.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=o.exec(u);c;)a.add(parseInt(c[1],10),c[2]||"d"),c=o.exec(u);return a};return y=y?y.newDate():null,t=t==null?y:typeof t=="string"?n(t):typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?y:r.today().add(t,"d"):r.newDate(t),t}})},69862:function(){},40964:function(){},72077:function(R,F,e){var i=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],m=typeof globalThis>"u"?e.g:globalThis;R.exports=function(){for(var y=[],p=0;p>8&15|De>>4&240,De>>4&15|De&240,(De&15)<<4|De&15,1):ke===8?L(De>>24&255,De>>16&255,De>>8&255,(De&255)/255):ke===4?L(De>>12&15|De>>8&240,De>>8&15|De>>4&240,De>>4&15|De&240,((De&15)<<4|De&15)/255):null):(De=u.exec(Ae))?new S(De[1],De[2],De[3],1):(De=a.exec(Ae))?new S(De[1]*255/100,De[2]*255/100,De[3]*255/100,1):(De=o.exec(Ae))?L(De[1],De[2],De[3],De[4]):(De=c.exec(Ae))?L(De[1]*255/100,De[2]*255/100,De[3]*255/100,De[4]):(De=s.exec(Ae))?z(De[1],De[2]/100,De[3]/100,1):(De=b.exec(Ae))?z(De[1],De[2]/100,De[3]/100,De[4]):g.hasOwnProperty(Ae)?D(g[Ae]):Ae==="transparent"?new S(NaN,NaN,NaN,0):null}function D(Ae){return new S(Ae>>16&255,Ae>>8&255,Ae&255,1)}function L(Ae,De,ke,We){return We<=0&&(Ae=De=ke=NaN),new S(Ae,De,ke,We)}function w(Ae){return Ae instanceof t||(Ae=C(Ae)),Ae?(Ae=Ae.rgb(),new S(Ae.r,Ae.g,Ae.b,Ae.opacity)):new S}function M(Ae,De,ke,We){return arguments.length===1?w(Ae):new S(Ae,De,ke,We==null?1:We)}function S(Ae,De,ke,We){this.r=+Ae,this.g=+De,this.b=+ke,this.opacity=+We}i(S,M,m(t,{brighter:function(De){return De=De==null?p:Math.pow(p,De),new S(this.r*De,this.g*De,this.b*De,this.opacity)},darker:function(De){return De=De==null?y:Math.pow(y,De),new S(this.r*De,this.g*De,this.b*De,this.opacity)},rgb:function(){return this},clamp:function(){return new S(O(this.r),O(this.g),O(this.b),k(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:f,formatHex:f,formatHex8:P,formatRgb:E,toString:E}));function f(){return"#".concat(G(this.r)).concat(G(this.g)).concat(G(this.b))}function P(){return"#".concat(G(this.r)).concat(G(this.g)).concat(G(this.b)).concat(G((isNaN(this.opacity)?1:this.opacity)*255))}function E(){var Ae=k(this.opacity);return"".concat(Ae===1?"rgb(":"rgba(").concat(O(this.r),", ").concat(O(this.g),", ").concat(O(this.b)).concat(Ae===1?")":", ".concat(Ae,")"))}function k(Ae){return isNaN(Ae)?1:Math.max(0,Math.min(1,Ae))}function O(Ae){return Math.max(0,Math.min(255,Math.round(Ae)||0))}function G(Ae){return Ae=O(Ae),(Ae<16?"0":"")+Ae.toString(16)}function z(Ae,De,ke,We){return We<=0?Ae=De=ke=NaN:ke<=0||ke>=1?Ae=De=NaN:De<=0&&(Ae=NaN),new B(Ae,De,ke,We)}function U(Ae){if(Ae instanceof B)return new B(Ae.h,Ae.s,Ae.l,Ae.opacity);if(Ae instanceof t||(Ae=C(Ae)),!Ae)return new B;if(Ae instanceof B)return Ae;Ae=Ae.rgb();var De=Ae.r/255,ke=Ae.g/255,We=Ae.b/255,_e=Math.min(De,ke,We),Ye=Math.max(De,ke,We),Pe=NaN,Ve=Ye-_e,Ze=(Ye+_e)/2;return Ve?(De===Ye?Pe=(ke-We)/Ve+(ke0&&Ze<1?0:Pe,new B(Pe,Ve,Ze,Ae.opacity)}function H(Ae,De,ke,We){return arguments.length===1?U(Ae):new B(Ae,De,ke,We==null?1:We)}function B(Ae,De,ke,We){this.h=+Ae,this.s=+De,this.l=+ke,this.opacity=+We}i(B,H,m(t,{brighter:function(De){return De=De==null?p:Math.pow(p,De),new B(this.h,this.s,this.l*De,this.opacity)},darker:function(De){return De=De==null?y:Math.pow(y,De),new B(this.h,this.s,this.l*De,this.opacity)},rgb:function(){var De=this.h%360+(this.h<0)*360,ke=isNaN(De)||isNaN(this.s)?0:this.s,We=this.l,_e=We+(We<.5?We:1-We)*ke,Ye=2*We-_e;return new S(re(De>=240?De-240:De+120,Ye,_e),re(De,Ye,_e),re(De<120?De+240:De-120,Ye,_e),this.opacity)},clamp:function(){return new B(W(this.h),q(this.s),q(this.l),k(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var De=k(this.opacity);return"".concat(De===1?"hsl(":"hsla(").concat(W(this.h),", ").concat(q(this.s)*100,"%, ").concat(q(this.l)*100,"%").concat(De===1?")":", ".concat(De,")"))}}));function W(Ae){return Ae=(Ae||0)%360,Ae<0?Ae+360:Ae}function q(Ae){return Math.max(0,Math.min(1,Ae||0))}function re(Ae,De,ke){return(Ae<60?De+(ke-De)*Ae/60:Ae<180?ke:Ae<240?De+(ke-De)*(240-Ae)/60:De)*255}var ie=function(Ae){return function(){return Ae}};function le(Ae,De){return function(ke){return Ae+ke*De}}function he(Ae,De,ke){return Ae=Math.pow(Ae,ke),De=Math.pow(De,ke)-Ae,ke=1/ke,function(We){return Math.pow(Ae+We*De,ke)}}function $(Ae){return(Ae=+Ae)==1?Z:function(De,ke){return ke-De?he(De,ke,Ae):ie(isNaN(De)?ke:De)}}function Z(Ae,De){var ke=De-Ae;return ke?le(Ae,ke):ie(isNaN(Ae)?De:Ae)}var K=function Ae(De){var ke=$(De);function We(_e,Ye){var Pe=ke((_e=M(_e)).r,(Ye=M(Ye)).r),Ve=ke(_e.g,Ye.g),Ze=ke(_e.b,Ye.b),Ke=Z(_e.opacity,Ye.opacity);return function(lt){return _e.r=Pe(lt),_e.g=Ve(lt),_e.b=Ze(lt),_e.opacity=Ke(lt),_e+""}}return We.gamma=Ae,We}(1);function Q(Ae,De){var ke=De?De.length:0,We=Ae?Math.min(ke,Ae.length):0,_e=new Array(We),Ye=new Array(ke),Pe;for(Pe=0;Peke&&(Ye=De.slice(ke,Ye),Ve[Pe]?Ve[Pe]+=Ye:Ve[++Pe]=Ye),(We=We[0])===(_e=_e[0])?Ve[Pe]?Ve[Pe]+=_e:Ve[++Pe]=_e:(Ve[++Pe]=null,Ze.push({i:Pe,x:fe(We,_e)})),ke=oe.lastIndex;return ke{const[T]=nf.exports.useContext(F1),N=[];return T&&T.forEach(V=>{let Y=[],X=[],J=-10,R=10,F=V.nodeExpr;for(let e=J;e<=R;e+=.5)Y.push(e),X.push(F.evaluate({x:e,...V.currentScope}));N.push({x:Y,y:X,type:"line",mode:"lines"})}),ni("div",{className:"ast-draw-container ast-plot-container h-full w-full sm:w-3/4 sm:grow",children:ni(MR,{data:N,layout:{showlegend:!1,autosize:!0,margin:{l:35,r:20,b:20,t:20,pad:5}},useResizeHandler:!0,style:{width:"100%",height:"100%"}})})};async function ER(T,N){let V=new FileReader;V.readAsDataURL(T),V.onload=function(){N(V.result)},V.onerror=function(Y){console.log("Error: ",Y)}}const CR=({setImage:T})=>{const N=nf.exports.useRef();return Qo("div",{className:"ast-ul-icon m-auto text-center",children:[ni("input",{type:"file",onChange:Y=>{Y.preventDefault(),ER(Y.target.files[0],T)},hidden:!0,ref:N}),Qo("button",{onClick:()=>N.current.click(),children:[ni("span",{className:"fa-regular fa-image","aria-hidden":"true"}),ni("span",{className:"sr-only",children:"Image Upload"})]})]})},DR=()=>Qo("button",{className:"ast-ul-icon m-auto text-center",children:[ni("span",{className:"fa-solid fa-pencil","aria-hidden":"true"}),ni("span",{className:"sr-only",children:"Draw Upload"})]}),LR=()=>Qo("button",{className:"ast-ul-icon m-auto text-center",children:[ni("span",{className:"fa-solid fa-camera","aria-hidden":"true"}),ni("span",{className:"sr-only",children:"Camera Upload"})]});function $s(){return $s=Object.assign?Object.assign.bind():function(T){for(var N=1;N=T.length?{done:!0}:{done:!1,value:T[Y++]}},e:function(i){throw i},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var J=!0,R=!1,F;return{s:function(){V=V.call(T)},n:function(){var i=V.next();return J=i.done,i},e:function(i){R=!0,F=i},f:function(){try{!J&&V.return!=null&&V.return()}finally{if(R)throw F}}}}function XR(T,N){if(!!T){if(typeof T=="string")return AT(T,N);var V=Object.prototype.toString.call(T).slice(8,-1);if(V==="Object"&&T.constructor&&(V=T.constructor.name),V==="Map"||V==="Set")return Array.from(T);if(V==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(V))return AT(T,N)}}function AT(T,N){(N==null||N>T.length)&&(N=T.length);for(var V=0,Y=new Array(N);V1&&arguments[1]!==void 0?arguments[1]:"any",de=oe?F(oe).index:X.length,we=[],Se=0;Se1&&arguments[1]!==void 0?arguments[1]:",";return ce.map(function(de){return de.name}).join(oe)}function n(ce){var oe=ce.indexOf("...")===0,de=oe?ce.length>3?ce.slice(3):"any":ce,we=de.split("|").map(function(Ie){return F(Ie.trim())}),Se=!1,Te=oe?"...":"",Fe=we.map(function(Ie){return Se=Ie.isAny||Se,Te+=Ie.name+"|",{name:Ie.name,typeIndex:Ie.index,test:Ie.test,isAny:Ie.isAny,conversion:null,conversionIndex:-1}});return{types:Fe,name:Te.slice(0,-1),hasAny:Se,hasConversion:!1,restParam:oe}}function u(ce){var oe=ce.types.map(function(Fe){return Fe.name}),de=M(oe),we=ce.hasAny,Se=ce.name,Te=de.map(function(Fe){var Ie=F(Fe.from);return we=Ie.isAny||we,Se+="|"+Fe.from,{name:Fe.from,typeIndex:Ie.index,test:Ie.test,isAny:Ie.isAny,conversion:Fe,conversionIndex:Fe.index}});return{types:ce.types.concat(Te),name:Se,hasAny:we,hasConversion:Te.length>0,restParam:ce.restParam}}function a(ce){return ce.typeSet||(ce.typeSet=new Set,ce.types.forEach(function(oe){return ce.typeSet.add(oe.name)})),ce.typeSet}function o(ce){var oe=[];if(typeof ce!="string")throw new TypeError("Signatures must be strings");var de=ce.trim();if(de==="")return oe;for(var we=de.split(","),Se=0;Se=Se+1}}else return ce.length===0?function(Me){return Me.length===0}:ce.length===1?(de=s(ce[0]),function(Me){return de(Me[0])&&Me.length===1}):ce.length===2?(de=s(ce[0]),we=s(ce[1]),function(Me){return de(Me[0])&&we(Me[1])&&Me.length===2}):(oe=ce.map(s),function(Me){for(var Ae=0;Ae0){var Ve=t(oe[Ie]);return we=new TypeError("Unexpected type of argument in function "+Te+" (expected: "+Se.join(" or ")+", actual: "+Ve.join(" | ")+", index: "+Ie+")"),we.data={category:"wrongType",fn:Te,index:Ie,actual:Ve,expected:Se},{v:we}}}else Fe=Pe};for(Ie=0;Ieke)return we=new TypeError("Too many arguments in function "+Te+" (expected: "+ke+", actual: "+oe.length+")"),we.data={category:"tooManyArgs",fn:Te,index:oe.length,expectedLength:ke},we;for(var We=[],_e=0;_e0)return 1;var we=D(ce)-D(oe);return we<0?-1:we>0?1:0}function w(ce,oe){var de=ce.params,we=oe.params,Se=W(de),Te=W(we),Fe=c(de),Ie=c(we);if(Fe&&Se.hasAny){if(!Ie||!Te.hasAny)return 1}else if(Ie&&Te.hasAny)return-1;var Me=0,Ae=0,De,ke=kf(de),We;try{for(ke.s();!(We=ke.n()).done;)De=We.value,De.hasAny&&++Me,De.hasConversion&&++Ae}catch(Be){ke.e(Be)}finally{ke.f()}var _e=0,Ye=0,Pe=kf(we),Ve;try{for(Pe.s();!(Ve=Pe.n()).done;)De=Ve.value,De.hasAny&&++_e,De.hasConversion&&++Ye}catch(Be){Pe.e(Be)}finally{Pe.f()}if(Me!==_e)return Me-_e;if(Fe&&Se.hasConversion){if(!Ie||!Te.hasConversion)return 1}else if(Ie&&Te.hasConversion)return-1;if(Ae!==Ye)return Ae-Ye;if(Fe){if(!Ie)return 1}else if(Ie)return-1;var Ze=(de.length-we.length)*(Fe?-1:1);if(Ze!==0)return Ze;for(var Ke=[],lt=0,vt=0;vt1&&oe.sort(function(Me,Ae){return Me.index-Ae.index});var de=oe[0].conversionsTo;if(ce.length===1)return de;de=de.concat([]);for(var we=new Set(ce),Se=1;Se=De:_e?De>=ke:De===ke}function k(ce){return ce.map(function(oe){return K(oe)?$(oe.referToSelf.callback):Z(oe)?he(oe.referTo.references,oe.referTo.callback):oe})}function O(ce,oe,de){var we=[],Se,Te=kf(ce),Fe;try{for(Te.s();!(Fe=Te.n()).done;){Se=Fe.value;var Ie=de[Se];if(typeof Ie!="number")throw new TypeError('No definition for referenced signature "'+Se+'"');if(Ie=oe[Ie],typeof Ie!="function")return!1;we.push(Ie)}}catch(Me){Te.e(Me)}finally{Te.f()}return we}function G(ce,oe,de){for(var we=k(ce),Se=new Array(we.length).fill(!1),Te=!0;Te;){Te=!1;for(var Fe=!0,Ie=0;Ie0?1:T<0?-1:0},jR=Math.log2||function(N){return Math.log(N)/Math.LN2},$R=Math.log10||function(N){return Math.log(N)/Math.LN10},KR=Math.log1p||function(T){return Math.log(T+1)},JR=Math.cbrt||function(N){if(N===0)return N;var V=N<0,Y;return V&&(N=-N),isFinite(N)?(Y=Math.exp(Math.log(N)/3),Y=(N/(Y*Y)+2*Y)/3):Y=N,V?-Y:Y},QR=Math.expm1||function(N){return N>=2e-4||N<=-2e-4?Math.exp(N)-1:N+N*N/2+N*N*N/6};function i2(T,N,V){var Y={2:"0b",8:"0o",16:"0x"},X=Y[N],J="";if(V){if(V<1)throw new Error("size must be in greater than 0");if(!Ya(V))throw new Error("size must be an integer");if(T>2**(V-1)-1||T<-(2**(V-1)))throw new Error("Value must be in range [-2^".concat(V-1,", 2^").concat(V-1,"-1]"));if(!Ya(T))throw new Error("Value must be an integer");T<0&&(T=T+2**V),J="i".concat(V)}var R="";return T<0&&(T=-T,R="-"),"".concat(R).concat(X).concat(T.toString(N)).concat(J)}function Rd(T,N){if(typeof N=="function")return N(T);if(T===1/0)return"Infinity";if(T===-1/0)return"-Infinity";if(isNaN(T))return"NaN";var V="auto",Y,X;if(N&&(N.notation&&(V=N.notation),Ni(N)?Y=N:Ni(N.precision)&&(Y=N.precision),N.wordSize&&(X=N.wordSize,typeof X!="number")))throw new Error('Option "wordSize" must be a number');switch(V){case"fixed":return i8(T,Y);case"exponential":return o8(T,Y);case"engineering":return qR(T,Y);case"bin":return i2(T,2,X);case"oct":return i2(T,8,X);case"hex":return i2(T,16,X);case"auto":return eF(T,Y,N&&N).replace(/((\.\d*?)(0+))($|e)/,function(){var J=arguments[2],R=arguments[4];return J!=="."?J+R:R});default:throw new Error('Unknown notation "'+V+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function O1(T){var N=String(T).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!N)throw new SyntaxError("Invalid number "+T);var V=N[1],Y=N[2],X=parseFloat(N[4]||"0"),J=Y.indexOf(".");X+=J!==-1?J-1:Y.length-1;var R=Y.replace(".","").replace(/^0*/,function(F){return X-=F.length,""}).replace(/0*$/,"").split("").map(function(F){return parseInt(F)});return R.length===0&&(R.push(0),X++),{sign:V,coefficients:R,exponent:X}}function qR(T,N){if(isNaN(T)||!isFinite(T))return String(T);var V=O1(T),Y=z1(V,N),X=Y.exponent,J=Y.coefficients,R=X%3===0?X:X<0?X-3-X%3:X-X%3;if(Ni(N))for(;N>J.length||X-R+1>J.length;)J.push(0);else for(var F=Math.abs(X-R)-(J.length-1),e=0;e0;)m++,i--;var t=J.slice(m).join(""),y=Ni(N)&&t.length||t.match(/[1-9]/)?"."+t:"",p=J.slice(0,m).join("")+y+"e"+(X>=0?"+":"")+R.toString();return Y.sign+p}function i8(T,N){if(isNaN(T)||!isFinite(T))return String(T);var V=O1(T),Y=typeof N=="number"?z1(V,V.exponent+1+N):V,X=Y.coefficients,J=Y.exponent+1,R=J+(N||0);return X.length0?"."+X.join(""):"")+"e"+(J>=0?"+":"")+J}function eF(T,N,V){if(isNaN(T)||!isFinite(T))return String(T);var Y=V&&V.lowerExp!==void 0?V.lowerExp:-3,X=V&&V.upperExp!==void 0?V.upperExp:5,J=O1(T),R=N?z1(J,N):J;if(R.exponent=X)return o8(T,N);var F=R.coefficients,e=R.exponent;F.length0?e:0;return iN){var X=Y.splice(N,Y.length-N);if(X[0]>=5){var J=N-1;for(Y[J]++;Y[J]===10;)Y.pop(),J===0&&(Y.unshift(0),V.exponent++,J++),J--,Y[J]++}}return V}function $p(T){for(var N=[],V=0;V0?!0:T<0?!1:1/T===1/0,Y=N>0?!0:N<0?!1:1/N===1/0;return V^Y?-T:T}function o2(T,N,V){var Y=T.constructor,X=new Y(2),J="";if(V){if(V<1)throw new Error("size must be in greater than 0");if(!Ya(V))throw new Error("size must be an integer");if(T.greaterThan(X.pow(V-1).sub(1))||T.lessThan(X.pow(V-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(V-1,", 2^").concat(V-1,"-1]"));if(!T.isInteger())throw new Error("Value must be an integer");T.lessThan(0)&&(T=T.add(X.pow(V))),J="i".concat(V)}switch(N){case 2:return"".concat(T.toBinary()).concat(J);case 8:return"".concat(T.toOctal()).concat(J);case 16:return"".concat(T.toHexadecimal()).concat(J);default:throw new Error("Base ".concat(N," not supported "))}}function fF(T,N){if(typeof N=="function")return N(T);if(!T.isFinite())return T.isNaN()?"NaN":T.gt(0)?"Infinity":"-Infinity";var V="auto",Y,X;if(N!==void 0&&(N.notation&&(V=N.notation),typeof N=="number"?Y=N:N.precision&&(Y=N.precision),N.wordSize&&(X=N.wordSize,typeof X!="number")))throw new Error('Option "wordSize" must be a number');switch(V){case"fixed":return hF(T,Y);case"exponential":return ET(T,Y);case"engineering":return cF(T,Y);case"bin":return o2(T,2,X);case"oct":return o2(T,8,X);case"hex":return o2(T,16,X);case"auto":{var J=N&&N.lowerExp!==void 0?N.lowerExp:-3,R=N&&N.upperExp!==void 0?N.upperExp:5;if(T.isZero())return"0";var F,e=T.toSignificantDigits(Y),i=e.e;return i>=J&&i=0?"+":"")+Y.toString()}function ET(T,N){return N!==void 0?T.toExponential(N-1):T.toExponential()}function hF(T,N){return T.toFixed(N)}function vF(T,N){var V=T.length-N.length,Y=T.length;return T.substring(V,Y)===N}function vi(T,N){var V=dF(T,N);return N&&typeof N=="object"&&"truncate"in N&&V.length>N.truncate?V.substring(0,N.truncate-3)+"...":V}function dF(T,N){if(typeof T=="number")return Rd(T,N);if(Ei(T))return fF(T,N);if(pF(T))return!N||N.fraction!=="decimal"?T.s*T.n+"/"+T.d:T.toString();if(Array.isArray(T))return s8(T,N);if(zl(T))return'"'+T+'"';if(typeof T=="function")return T.syntax?String(T.syntax):"function";if(T&&typeof T=="object"){if(typeof T.format=="function")return T.format(N);if(T&&T.toString(N)!=={}.toString())return T.toString(N);var V=Object.keys(T).map(Y=>'"'+Y+'": '+vi(T[Y],N));return"{"+V.join(", ")+"}"}return String(T)}function $m(T){for(var N=String(T),V="",Y=0;Y/g,">"),N}function s8(T,N){if(Array.isArray(T)){for(var V="[",Y=T.length,X=0;XN?1:-1}function bi(T,N,V){if(!(this instanceof bi))throw new SyntaxError("Constructor must be called with the new operator");this.actual=T,this.expected=N,this.relation=V,this.message="Dimension mismatch ("+(Array.isArray(T)?"["+T.join(", ")+"]":T)+" "+(this.relation||"!=")+" "+(Array.isArray(N)?"["+N.join(", ")+"]":N)+")",this.stack=new Error().stack}bi.prototype=new RangeError;bi.prototype.constructor=RangeError;bi.prototype.name="DimensionError";bi.prototype.isDimensionError=!0;function $f(T,N,V){if(!(this instanceof $f))throw new SyntaxError("Constructor must be called with the new operator");this.index=T,arguments.length<3?(this.min=0,this.max=N):(this.min=N,this.max=V),this.min!==void 0&&this.index=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=new Error().stack}$f.prototype=new RangeError;$f.prototype.constructor=RangeError;$f.prototype.name="IndexError";$f.prototype.isIndexError=!0;function Si(T){for(var N=[];Array.isArray(T);)N.push(T.length),T=T[0];return N}function l8(T,N,V){var Y,X=T.length;if(X!==N[V])throw new bi(X,N[V]);if(V")}function CT(T,N){var V=N.length===0;if(V){if(Array.isArray(T))throw new bi(T.length,0)}else l8(T,N,0)}function io(T,N){if(!Ni(T)||!Ya(T))throw new TypeError("Index must be an integer (value: "+T+")");if(T<0||typeof N=="number"&&T>=N)throw new $f(T,N)}function i0(T,N,V){if(!Array.isArray(T)||!Array.isArray(N))throw new TypeError("Array expected");if(N.length===0)throw new Error("Resizing to scalar is not supported");N.forEach(function(X){if(!Ni(X)||!Ya(X)||X<0)throw new TypeError("Invalid size, must contain positive integers (size: "+vi(N)+")")});var Y=V!==void 0?V:0;return ub(T,N,0,Y),T}function ub(T,N,V,Y){var X,J,R=T.length,F=N[V],e=Math.min(R,F);if(T.length=F,V=0,e=N%V===0;if(F)if(e)Y[J]=-N/V;else throw new Error("Could not replace wildcard, since "+N+" is no multiple of "+-V);return Y}function f8(T){return T.reduce((N,V)=>N*V,1)}function gF(T,N){for(var V=T,Y,X=N.length-1;X>0;X--){var J=N[X];Y=[];for(var R=V.length/J,F=0;FN.test(V))}function DT(T,N){return Array.prototype.join.call(T,N)}function o0(T){if(!Array.isArray(T))throw new TypeError("Array input expected");if(T.length===0)return T;var N=[],V=0;N[0]={value:T[0],identifier:0};for(var Y=1;Y!yF(J)).every(J=>V[J]!==void 0);if(!Y){var X=N.filter(J=>V[J]===void 0);throw new Error('Cannot create function "'.concat(T,'", ')+"some dependencies are missing: ".concat(X.map(J=>'"'.concat(J,'"')).join(", "),"."))}}function yF(T){return T&&T[0]==="?"}function xF(T){return T&&T[0]==="?"?T.slice(1):T}function lf(T,N){if(p8(T)&&A3(T,N))return T[N];throw typeof T[N]=="function"&&T3(T,N)?new Error('Cannot access method "'+N+'" as a property'):new Error('No access to property "'+N+'"')}function s0(T,N,V){if(p8(T)&&A3(T,N))return T[N]=V,V;throw new Error('No access to property "'+N+'"')}function bF(T,N){return N in T}function A3(T,N){return!T||typeof T!="object"?!1:ka(AF,N)?!0:!(N in Object.prototype||N in Function.prototype)}function wF(T,N){if(!T3(T,N))throw new Error('No access to method "'+N+'"')}function T3(T,N){return T==null||typeof T[N]!="function"||ka(T,N)&&Object.getPrototypeOf&&N in Object.getPrototypeOf(T)?!1:ka(TF,N)?!0:!(N in Object.prototype||N in Function.prototype)}function p8(T){return typeof T=="object"&&T&&T.constructor===Object}var AF={length:!0,name:!0},TF={toString:!0,valueOf:!0,toLocaleString:!0};class M3{constructor(N){this.wrappedObject=N}keys(){return Object.keys(this.wrappedObject)}get(N){return lf(this.wrappedObject,N)}set(N,V){return s0(this.wrappedObject,N,V),this}has(N){return bF(this.wrappedObject,N)}}function l0(){return new Map}function Kp(T){if(!T)return l0();if(S3(T))return T;if(b3(T))return new M3(T);throw new Error("createMap can create maps from objects or Maps")}function MF(T){if(T instanceof M3)return T.wrappedObject;var N={};for(var V of T.keys()){var Y=T.get(V);s0(N,V,Y)}return N}function S3(T){return T?T instanceof Map||T instanceof M3||typeof T.set=="function"&&typeof T.get=="function"&&typeof T.keys=="function"&&typeof T.has=="function":!1}function LT(T){for(var N=arguments.length,V=new Array(N>1?N-1:0),Y=1;Yzl&&/^(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])*$/.test(F)},{name:"string",test:zl},{name:"Chain",test:r8},{name:"Array",test:ro},{name:"Matrix",test:Qa},{name:"DenseMatrix",test:Jy},{name:"SparseMatrix",test:Ld},{name:"Range",test:x3},{name:"Index",test:I1},{name:"boolean",test:PR},{name:"ResultSet",test:NR},{name:"Help",test:t8},{name:"function",test:RR},{name:"Date",test:FR},{name:"RegExp",test:IR},{name:"null",test:_R},{name:"undefined",test:OR},{name:"AccessorNode",test:kd},{name:"ArrayNode",test:Qu},{name:"AssignmentNode",test:zR},{name:"BlockNode",test:kR},{name:"ConditionalNode",test:BR},{name:"ConstantNode",test:Bi},{name:"FunctionNode",test:_v},{name:"FunctionAssignmentNode",test:Kg},{name:"IndexNode",test:p0},{name:"Node",test:no},{name:"ObjectNode",test:_1},{name:"OperatorNode",test:ds},{name:"ParenthesisNode",test:Nh},{name:"RangeNode",test:UR},{name:"RelationalNode",test:HR},{name:"SymbolNode",test:_s},{name:"Map",test:S3},{name:"Object",test:b3}]),R.addConversions([{from:"number",to:"BigNumber",convert:function(e){if(V||s2(e),tF(e)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new V(e)}},{from:"number",to:"Complex",convert:function(e){return Y||Km(e),new Y(e,0)}},{from:"BigNumber",to:"Complex",convert:function(e){return Y||Km(e),new Y(e.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(e){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return Y||Km(e),new Y(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){J||l2(e);var i=new J(e);if(i.valueOf()!==e)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return i}},{from:"string",to:"number",convert:function(e){var i=Number(e);if(isNaN(i))throw new Error('Cannot convert "'+e+'" to a number');return i}},{from:"string",to:"BigNumber",convert:function(e){V||s2(e);try{return new V(e)}catch{throw new Error('Cannot convert "'+e+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(e){J||l2(e);try{return new J(e)}catch{throw new Error('Cannot convert "'+e+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(e){Y||Km(e);try{return new Y(e)}catch{throw new Error('Cannot convert "'+e+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(e){return V||s2(e),new V(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return J||l2(e),new J(+e)}},{from:"boolean",to:"string",convert:function(e){return String(e)}},{from:"Array",to:"Matrix",convert:function(e){return X||CF(),new X(e)}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}]),R.onMismatch=(F,e,i)=>{var m=R.createError(F,e,i);if(["wrongType","mismatch"].includes(m.data.category)&&e.length===1&&Lc(e[0])&&i.some(y=>!y.params.includes(","))){var t=new TypeError("Function '".concat(F,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(F,")'."));throw t.data=m.data,t}throw m},R.onMismatch=(F,e,i)=>{var m=R.createError(F,e,i);if(["wrongType","mismatch"].includes(m.data.category)&&e.length===1&&Lc(e[0])&&i.some(y=>!y.params.includes(","))){var t=new TypeError("Function '".concat(F,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(F,")'."));throw t.data=m.data,t}throw m},R});function s2(T){throw new Error("Cannot convert value ".concat(T," into a BigNumber: no class 'BigNumber' provided"))}function Km(T){throw new Error("Cannot convert value ".concat(T," into a Complex number: no class 'Complex' provided"))}function CF(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function l2(T){throw new Error("Cannot convert value ".concat(T," into a Fraction, no class 'Fraction' provided."))}var DF="ResultSet",LF=[],PF=Lr(DF,LF,()=>{function T(N){if(!(this instanceof T))throw new SyntaxError("Constructor must be called with the new operator");this.entries=N||[]}return T.prototype.type="ResultSet",T.prototype.isResultSet=!0,T.prototype.valueOf=function(){return this.entries},T.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},T.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},T.fromJSON=function(N){return new T(N.entries)},T},{isClass:!0});/*! + * decimal.js v10.4.3 + * An arbitrary-precision Decimal type for JavaScript. + * https://github.com/MikeMcl/decimal.js + * Copyright (c) 2022 Michael Mclaughlin + * MIT Licence + */var Vp=9e15,Hv=1e9,fb="0123456789abcdef",t1="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",r1="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",cb={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Vp,maxE:Vp,crypto:!1},m8,Ah,ii=!0,B1="[DecimalError] ",Ov=B1+"Invalid argument: ",y8=B1+"Precision limit exceeded",x8=B1+"crypto unavailable",b8="[object Decimal]",xl=Math.floor,Ts=Math.pow,NF=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,RF=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,FF=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,w8=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Zf=1e7,qa=7,IF=9007199254740991,_F=t1.length-1,hb=r1.length-1,ta={toStringTag:b8};ta.absoluteValue=ta.abs=function(){var T=new this.constructor(this);return T.s<0&&(T.s=1),$a(T)};ta.ceil=function(){return $a(new this.constructor(this),this.e+1,2)};ta.clampedTo=ta.clamp=function(T,N){var V,Y=this,X=Y.constructor;if(T=new X(T),N=new X(N),!T.s||!N.s)return new X(NaN);if(T.gt(N))throw Error(Ov+N);return V=Y.cmp(T),V<0?T:Y.cmp(N)>0?N:new X(Y)};ta.comparedTo=ta.cmp=function(T){var N,V,Y,X,J=this,R=J.d,F=(T=new J.constructor(T)).d,e=J.s,i=T.s;if(!R||!F)return!e||!i?NaN:e!==i?e:R===F?0:!R^e<0?1:-1;if(!R[0]||!F[0])return R[0]?e:F[0]?-i:0;if(e!==i)return e;if(J.e!==T.e)return J.e>T.e^e<0?1:-1;for(Y=R.length,X=F.length,N=0,V=YF[N]^e<0?1:-1;return Y===X?0:Y>X^e<0?1:-1};ta.cosine=ta.cos=function(){var T,N,V=this,Y=V.constructor;return V.d?V.d[0]?(T=Y.precision,N=Y.rounding,Y.precision=T+Math.max(V.e,V.sd())+qa,Y.rounding=1,V=OF(Y,E8(Y,V)),Y.precision=T,Y.rounding=N,$a(Ah==2||Ah==3?V.neg():V,T,N,!0)):new Y(1):new Y(NaN)};ta.cubeRoot=ta.cbrt=function(){var T,N,V,Y,X,J,R,F,e,i,m=this,t=m.constructor;if(!m.isFinite()||m.isZero())return new t(m);for(ii=!1,J=m.s*Ts(m.s*m,1/3),!J||Math.abs(J)==1/0?(V=Ks(m.d),T=m.e,(J=(T-V.length+1)%3)&&(V+=J==1||J==-2?"0":"00"),J=Ts(V,1/3),T=xl((T+1)/3)-(T%3==(T<0?-1:2)),J==1/0?V="5e"+T:(V=J.toExponential(),V=V.slice(0,V.indexOf("e")+1)+T),Y=new t(V),Y.s=m.s):Y=new t(J.toString()),R=(T=t.precision)+3;;)if(F=Y,e=F.times(F).times(F),i=e.plus(m),Y=po(i.plus(m).times(F),i.plus(e),R+2,1),Ks(F.d).slice(0,R)===(V=Ks(Y.d)).slice(0,R))if(V=V.slice(R-3,R+1),V=="9999"||!X&&V=="4999"){if(!X&&($a(F,T+1,0),F.times(F).times(F).eq(m))){Y=F;break}R+=4,X=1}else{(!+V||!+V.slice(1)&&V.charAt(0)=="5")&&($a(Y,T+1,1),N=!Y.times(Y).times(Y).eq(m));break}return ii=!0,$a(Y,T,t.rounding,N)};ta.decimalPlaces=ta.dp=function(){var T,N=this.d,V=NaN;if(N){if(T=N.length-1,V=(T-xl(this.e/qa))*qa,T=N[T],T)for(;T%10==0;T/=10)V--;V<0&&(V=0)}return V};ta.dividedBy=ta.div=function(T){return po(this,new this.constructor(T))};ta.dividedToIntegerBy=ta.divToInt=function(T){var N=this,V=N.constructor;return $a(po(N,new V(T),0,1,1),V.precision,V.rounding)};ta.equals=ta.eq=function(T){return this.cmp(T)===0};ta.floor=function(){return $a(new this.constructor(this),this.e+1,3)};ta.greaterThan=ta.gt=function(T){return this.cmp(T)>0};ta.greaterThanOrEqualTo=ta.gte=function(T){var N=this.cmp(T);return N==1||N===0};ta.hyperbolicCosine=ta.cosh=function(){var T,N,V,Y,X,J=this,R=J.constructor,F=new R(1);if(!J.isFinite())return new R(J.s?1/0:NaN);if(J.isZero())return F;V=R.precision,Y=R.rounding,R.precision=V+Math.max(J.e,J.sd())+4,R.rounding=1,X=J.d.length,X<32?(T=Math.ceil(X/3),N=(1/H1(4,T)).toString()):(T=16,N="2.3283064365386962890625e-10"),J=u0(R,1,J.times(N),new R(1),!0);for(var e,i=T,m=new R(8);i--;)e=J.times(J),J=F.minus(e.times(m.minus(e.times(m))));return $a(J,R.precision=V,R.rounding=Y,!0)};ta.hyperbolicSine=ta.sinh=function(){var T,N,V,Y,X=this,J=X.constructor;if(!X.isFinite()||X.isZero())return new J(X);if(N=J.precision,V=J.rounding,J.precision=N+Math.max(X.e,X.sd())+4,J.rounding=1,Y=X.d.length,Y<3)X=u0(J,2,X,X,!0);else{T=1.4*Math.sqrt(Y),T=T>16?16:T|0,X=X.times(1/H1(5,T)),X=u0(J,2,X,X,!0);for(var R,F=new J(5),e=new J(16),i=new J(20);T--;)R=X.times(X),X=X.times(F.plus(R.times(e.times(R).plus(i))))}return J.precision=N,J.rounding=V,$a(X,N,V,!0)};ta.hyperbolicTangent=ta.tanh=function(){var T,N,V=this,Y=V.constructor;return V.isFinite()?V.isZero()?new Y(V):(T=Y.precision,N=Y.rounding,Y.precision=T+7,Y.rounding=1,po(V.sinh(),V.cosh(),Y.precision=T,Y.rounding=N)):new Y(V.s)};ta.inverseCosine=ta.acos=function(){var T,N=this,V=N.constructor,Y=N.abs().cmp(1),X=V.precision,J=V.rounding;return Y!==-1?Y===0?N.isNeg()?Gf(V,X,J):new V(0):new V(NaN):N.isZero()?Gf(V,X+4,J).times(.5):(V.precision=X+6,V.rounding=1,N=N.asin(),T=Gf(V,X+4,J).times(.5),V.precision=X,V.rounding=J,T.minus(N))};ta.inverseHyperbolicCosine=ta.acosh=function(){var T,N,V=this,Y=V.constructor;return V.lte(1)?new Y(V.eq(1)?0:NaN):V.isFinite()?(T=Y.precision,N=Y.rounding,Y.precision=T+Math.max(Math.abs(V.e),V.sd())+4,Y.rounding=1,ii=!1,V=V.times(V).minus(1).sqrt().plus(V),ii=!0,Y.precision=T,Y.rounding=N,V.ln()):new Y(V)};ta.inverseHyperbolicSine=ta.asinh=function(){var T,N,V=this,Y=V.constructor;return!V.isFinite()||V.isZero()?new Y(V):(T=Y.precision,N=Y.rounding,Y.precision=T+2*Math.max(Math.abs(V.e),V.sd())+6,Y.rounding=1,ii=!1,V=V.times(V).plus(1).sqrt().plus(V),ii=!0,Y.precision=T,Y.rounding=N,V.ln())};ta.inverseHyperbolicTangent=ta.atanh=function(){var T,N,V,Y,X=this,J=X.constructor;return X.isFinite()?X.e>=0?new J(X.abs().eq(1)?X.s/0:X.isZero()?X:NaN):(T=J.precision,N=J.rounding,Y=X.sd(),Math.max(Y,T)<2*-X.e-1?$a(new J(X),T,N,!0):(J.precision=V=Y-X.e,X=po(X.plus(1),new J(1).minus(X),V+T,1),J.precision=T+4,J.rounding=1,X=X.ln(),J.precision=T,J.rounding=N,X.times(.5))):new J(NaN)};ta.inverseSine=ta.asin=function(){var T,N,V,Y,X=this,J=X.constructor;return X.isZero()?new J(X):(N=X.abs().cmp(1),V=J.precision,Y=J.rounding,N!==-1?N===0?(T=Gf(J,V+4,Y).times(.5),T.s=X.s,T):new J(NaN):(J.precision=V+6,J.rounding=1,X=X.div(new J(1).minus(X.times(X)).sqrt().plus(1)).atan(),J.precision=V,J.rounding=Y,X.times(2)))};ta.inverseTangent=ta.atan=function(){var T,N,V,Y,X,J,R,F,e,i=this,m=i.constructor,t=m.precision,y=m.rounding;if(i.isFinite()){if(i.isZero())return new m(i);if(i.abs().eq(1)&&t+4<=hb)return R=Gf(m,t+4,y).times(.25),R.s=i.s,R}else{if(!i.s)return new m(NaN);if(t+4<=hb)return R=Gf(m,t+4,y).times(.5),R.s=i.s,R}for(m.precision=F=t+10,m.rounding=1,V=Math.min(28,F/qa+2|0),T=V;T;--T)i=i.div(i.times(i).plus(1).sqrt().plus(1));for(ii=!1,N=Math.ceil(F/qa),Y=1,e=i.times(i),R=new m(i),X=i;T!==-1;)if(X=X.times(e),J=R.minus(X.div(Y+=2)),X=X.times(e),R=J.plus(X.div(Y+=2)),R.d[N]!==void 0)for(T=N;R.d[T]===J.d[T]&&T--;);return V&&(R=R.times(2<this.d.length-2};ta.isNaN=function(){return!this.s};ta.isNegative=ta.isNeg=function(){return this.s<0};ta.isPositive=ta.isPos=function(){return this.s>0};ta.isZero=function(){return!!this.d&&this.d[0]===0};ta.lessThan=ta.lt=function(T){return this.cmp(T)<0};ta.lessThanOrEqualTo=ta.lte=function(T){return this.cmp(T)<1};ta.logarithm=ta.log=function(T){var N,V,Y,X,J,R,F,e,i=this,m=i.constructor,t=m.precision,y=m.rounding,p=5;if(T==null)T=new m(10),N=!0;else{if(T=new m(T),V=T.d,T.s<0||!V||!V[0]||T.eq(1))return new m(NaN);N=T.eq(10)}if(V=i.d,i.s<0||!V||!V[0]||i.eq(1))return new m(V&&!V[0]?-1/0:i.s!=1?NaN:V?0:1/0);if(N)if(V.length>1)J=!0;else{for(X=V[0];X%10===0;)X/=10;J=X!==1}if(ii=!1,F=t+p,R=Mv(i,F),Y=N?n1(m,F+10):Mv(T,F),e=po(R,Y,F,1),Hg(e.d,X=t,y))do if(F+=10,R=Mv(i,F),Y=N?n1(m,F+10):Mv(T,F),e=po(R,Y,F,1),!J){+Ks(e.d).slice(X+1,X+15)+1==1e14&&(e=$a(e,t+1,0));break}while(Hg(e.d,X+=10,y));return ii=!0,$a(e,t,y)};ta.minus=ta.sub=function(T){var N,V,Y,X,J,R,F,e,i,m,t,y,p=this,l=p.constructor;if(T=new l(T),!p.d||!T.d)return!p.s||!T.s?T=new l(NaN):p.d?T.s=-T.s:T=new l(T.d||p.s!==T.s?p:NaN),T;if(p.s!=T.s)return T.s=-T.s,p.plus(T);if(i=p.d,y=T.d,F=l.precision,e=l.rounding,!i[0]||!y[0]){if(y[0])T.s=-T.s;else if(i[0])T=new l(p);else return new l(e===3?-0:0);return ii?$a(T,F,e):T}if(V=xl(T.e/qa),m=xl(p.e/qa),i=i.slice(),J=m-V,J){for(t=J<0,t?(N=i,J=-J,R=y.length):(N=y,V=m,R=i.length),Y=Math.max(Math.ceil(F/qa),R)+2,J>Y&&(J=Y,N.length=1),N.reverse(),Y=J;Y--;)N.push(0);N.reverse()}else{for(Y=i.length,R=y.length,t=Y0;--Y)i[R++]=0;for(Y=y.length;Y>J;){if(i[--Y]R?J+1:R+1,X>R&&(X=R,V.length=1),V.reverse();X--;)V.push(0);V.reverse()}for(R=i.length,X=m.length,R-X<0&&(X=R,V=m,m=i,i=V),N=0;X;)N=(i[--X]=i[X]+m[X]+N)/Zf|0,i[X]%=Zf;for(N&&(i.unshift(N),++Y),R=i.length;i[--R]==0;)i.pop();return T.d=i,T.e=U1(i,Y),ii?$a(T,F,e):T};ta.precision=ta.sd=function(T){var N,V=this;if(T!==void 0&&T!==!!T&&T!==1&&T!==0)throw Error(Ov+T);return V.d?(N=A8(V.d),T&&V.e+1>N&&(N=V.e+1)):N=NaN,N};ta.round=function(){var T=this,N=T.constructor;return $a(new N(T),T.e+1,N.rounding)};ta.sine=ta.sin=function(){var T,N,V=this,Y=V.constructor;return V.isFinite()?V.isZero()?new Y(V):(T=Y.precision,N=Y.rounding,Y.precision=T+Math.max(V.e,V.sd())+qa,Y.rounding=1,V=kF(Y,E8(Y,V)),Y.precision=T,Y.rounding=N,$a(Ah>2?V.neg():V,T,N,!0)):new Y(NaN)};ta.squareRoot=ta.sqrt=function(){var T,N,V,Y,X,J,R=this,F=R.d,e=R.e,i=R.s,m=R.constructor;if(i!==1||!F||!F[0])return new m(!i||i<0&&(!F||F[0])?NaN:F?R:1/0);for(ii=!1,i=Math.sqrt(+R),i==0||i==1/0?(N=Ks(F),(N.length+e)%2==0&&(N+="0"),i=Math.sqrt(N),e=xl((e+1)/2)-(e<0||e%2),i==1/0?N="5e"+e:(N=i.toExponential(),N=N.slice(0,N.indexOf("e")+1)+e),Y=new m(N)):Y=new m(i.toString()),V=(e=m.precision)+3;;)if(J=Y,Y=J.plus(po(R,J,V+2,1)).times(.5),Ks(J.d).slice(0,V)===(N=Ks(Y.d)).slice(0,V))if(N=N.slice(V-3,V+1),N=="9999"||!X&&N=="4999"){if(!X&&($a(J,e+1,0),J.times(J).eq(R))){Y=J;break}V+=4,X=1}else{(!+N||!+N.slice(1)&&N.charAt(0)=="5")&&($a(Y,e+1,1),T=!Y.times(Y).eq(R));break}return ii=!0,$a(Y,e,m.rounding,T)};ta.tangent=ta.tan=function(){var T,N,V=this,Y=V.constructor;return V.isFinite()?V.isZero()?new Y(V):(T=Y.precision,N=Y.rounding,Y.precision=T+10,Y.rounding=1,V=V.sin(),V.s=1,V=po(V,new Y(1).minus(V.times(V)).sqrt(),T+10,0),Y.precision=T,Y.rounding=N,$a(Ah==2||Ah==4?V.neg():V,T,N,!0)):new Y(NaN)};ta.times=ta.mul=function(T){var N,V,Y,X,J,R,F,e,i,m=this,t=m.constructor,y=m.d,p=(T=new t(T)).d;if(T.s*=m.s,!y||!y[0]||!p||!p[0])return new t(!T.s||y&&!y[0]&&!p||p&&!p[0]&&!y?NaN:!y||!p?T.s/0:T.s*0);for(V=xl(m.e/qa)+xl(T.e/qa),e=y.length,i=p.length,e=0;){for(N=0,X=e+Y;X>Y;)F=J[X]+p[Y]*y[X-Y-1]+N,J[X--]=F%Zf|0,N=F/Zf|0;J[X]=(J[X]+N)%Zf|0}for(;!J[--R];)J.pop();return N?++V:J.shift(),T.d=J,T.e=U1(J,V),ii?$a(T,t.precision,t.rounding):T};ta.toBinary=function(T,N){return E3(this,2,T,N)};ta.toDecimalPlaces=ta.toDP=function(T,N){var V=this,Y=V.constructor;return V=new Y(V),T===void 0?V:(lu(T,0,Hv),N===void 0?N=Y.rounding:lu(N,0,8),$a(V,T+V.e+1,N))};ta.toExponential=function(T,N){var V,Y=this,X=Y.constructor;return T===void 0?V=Pc(Y,!0):(lu(T,0,Hv),N===void 0?N=X.rounding:lu(N,0,8),Y=$a(new X(Y),T+1,N),V=Pc(Y,!0,T+1)),Y.isNeg()&&!Y.isZero()?"-"+V:V};ta.toFixed=function(T,N){var V,Y,X=this,J=X.constructor;return T===void 0?V=Pc(X):(lu(T,0,Hv),N===void 0?N=J.rounding:lu(N,0,8),Y=$a(new J(X),T+X.e+1,N),V=Pc(Y,!1,T+Y.e+1)),X.isNeg()&&!X.isZero()?"-"+V:V};ta.toFraction=function(T){var N,V,Y,X,J,R,F,e,i,m,t,y,p=this,l=p.d,d=p.constructor;if(!l)return new d(p);if(i=V=new d(1),Y=e=new d(0),N=new d(Y),J=N.e=A8(l)-p.e-1,R=J%qa,N.d[0]=Ts(10,R<0?qa+R:R),T==null)T=J>0?N:i;else{if(F=new d(T),!F.isInt()||F.lt(i))throw Error(Ov+F);T=F.gt(N)?J>0?N:i:F}for(ii=!1,F=new d(Ks(l)),m=d.precision,d.precision=J=l.length*qa*2;t=po(F,N,0,1,1),X=V.plus(t.times(Y)),X.cmp(T)!=1;)V=Y,Y=X,X=i,i=e.plus(t.times(X)),e=X,X=N,N=F.minus(t.times(X)),F=X;return X=po(T.minus(V),Y,0,1,1),e=e.plus(X.times(i)),V=V.plus(X.times(Y)),e.s=i.s=p.s,y=po(i,Y,J,1).minus(p).abs().cmp(po(e,V,J,1).minus(p).abs())<1?[i,Y]:[e,V],d.precision=m,ii=!0,y};ta.toHexadecimal=ta.toHex=function(T,N){return E3(this,16,T,N)};ta.toNearest=function(T,N){var V=this,Y=V.constructor;if(V=new Y(V),T==null){if(!V.d)return V;T=new Y(1),N=Y.rounding}else{if(T=new Y(T),N===void 0?N=Y.rounding:lu(N,0,8),!V.d)return T.s?V:T;if(!T.d)return T.s&&(T.s=V.s),T}return T.d[0]?(ii=!1,V=po(V,T,0,N,1).times(T),ii=!0,$a(V)):(T.s=V.s,V=T),V};ta.toNumber=function(){return+this};ta.toOctal=function(T,N){return E3(this,8,T,N)};ta.toPower=ta.pow=function(T){var N,V,Y,X,J,R,F=this,e=F.constructor,i=+(T=new e(T));if(!F.d||!T.d||!F.d[0]||!T.d[0])return new e(Ts(+F,i));if(F=new e(F),F.eq(1))return F;if(Y=e.precision,J=e.rounding,T.eq(1))return $a(F,Y,J);if(N=xl(T.e/qa),N>=T.d.length-1&&(V=i<0?-i:i)<=IF)return X=T8(e,F,V,Y),T.s<0?new e(1).div(X):$a(X,Y,J);if(R=F.s,R<0){if(Ne.maxE+1||N0?R/0:0):(ii=!1,e.rounding=F.s=1,V=Math.min(12,(N+"").length),X=vb(T.times(Mv(F,Y+V)),Y),X.d&&(X=$a(X,Y+5,1),Hg(X.d,Y,J)&&(N=Y+10,X=$a(vb(T.times(Mv(F,N+V)),N),N+5,1),+Ks(X.d).slice(Y+1,Y+15)+1==1e14&&(X=$a(X,Y+1,0)))),X.s=R,ii=!0,e.rounding=J,$a(X,Y,J))};ta.toPrecision=function(T,N){var V,Y=this,X=Y.constructor;return T===void 0?V=Pc(Y,Y.e<=X.toExpNeg||Y.e>=X.toExpPos):(lu(T,1,Hv),N===void 0?N=X.rounding:lu(N,0,8),Y=$a(new X(Y),T,N),V=Pc(Y,T<=Y.e||Y.e<=X.toExpNeg,T)),Y.isNeg()&&!Y.isZero()?"-"+V:V};ta.toSignificantDigits=ta.toSD=function(T,N){var V=this,Y=V.constructor;return T===void 0?(T=Y.precision,N=Y.rounding):(lu(T,1,Hv),N===void 0?N=Y.rounding:lu(N,0,8)),$a(new Y(V),T,N)};ta.toString=function(){var T=this,N=T.constructor,V=Pc(T,T.e<=N.toExpNeg||T.e>=N.toExpPos);return T.isNeg()&&!T.isZero()?"-"+V:V};ta.truncated=ta.trunc=function(){return $a(new this.constructor(this),this.e+1,1)};ta.valueOf=ta.toJSON=function(){var T=this,N=T.constructor,V=Pc(T,T.e<=N.toExpNeg||T.e>=N.toExpPos);return T.isNeg()?"-"+V:V};function Ks(T){var N,V,Y,X=T.length-1,J="",R=T[0];if(X>0){for(J+=R,N=1;NV)throw Error(Ov+T)}function Hg(T,N,V,Y){var X,J,R,F;for(J=T[0];J>=10;J/=10)--N;return--N<0?(N+=qa,X=0):(X=Math.ceil((N+1)/qa),N%=qa),J=Ts(10,qa-N),F=T[X]%J|0,Y==null?N<3?(N==0?F=F/100|0:N==1&&(F=F/10|0),R=V<4&&F==99999||V>3&&F==49999||F==5e4||F==0):R=(V<4&&F+1==J||V>3&&F+1==J/2)&&(T[X+1]/J/100|0)==Ts(10,N-2)-1||(F==J/2||F==0)&&(T[X+1]/J/100|0)==0:N<4?(N==0?F=F/1e3|0:N==1?F=F/100|0:N==2&&(F=F/10|0),R=(Y||V<4)&&F==9999||!Y&&V>3&&F==4999):R=((Y||V<4)&&F+1==J||!Y&&V>3&&F+1==J/2)&&(T[X+1]/J/1e3|0)==Ts(10,N-3)-1,R}function Ey(T,N,V){for(var Y,X=[0],J,R=0,F=T.length;RV-1&&(X[Y+1]===void 0&&(X[Y+1]=0),X[Y+1]+=X[Y]/V|0,X[Y]%=V)}return X.reverse()}function OF(T,N){var V,Y,X;if(N.isZero())return N;Y=N.d.length,Y<32?(V=Math.ceil(Y/3),X=(1/H1(4,V)).toString()):(V=16,X="2.3283064365386962890625e-10"),T.precision+=V,N=u0(T,1,N.times(X),new T(1));for(var J=V;J--;){var R=N.times(N);N=R.times(R).minus(R).times(8).plus(1)}return T.precision-=V,N}var po=function(){function T(Y,X,J){var R,F=0,e=Y.length;for(Y=Y.slice();e--;)R=Y[e]*X+F,Y[e]=R%J|0,F=R/J|0;return F&&Y.unshift(F),Y}function N(Y,X,J,R){var F,e;if(J!=R)e=J>R?1:-1;else for(F=e=0;FX[F]?1:-1;break}return e}function V(Y,X,J,R){for(var F=0;J--;)Y[J]-=F,F=Y[J]1;)Y.shift()}return function(Y,X,J,R,F,e){var i,m,t,y,p,l,d,r,n,u,a,o,c,s,b,g,A,v,h,x,C=Y.constructor,D=Y.s==X.s?1:-1,L=Y.d,w=X.d;if(!L||!L[0]||!w||!w[0])return new C(!Y.s||!X.s||(L?w&&L[0]==w[0]:!w)?NaN:L&&L[0]==0||!w?D*0:D/0);for(e?(p=1,m=Y.e-X.e):(e=Zf,p=qa,m=xl(Y.e/p)-xl(X.e/p)),h=w.length,A=L.length,n=new C(D),u=n.d=[],t=0;w[t]==(L[t]||0);t++);if(w[t]>(L[t]||0)&&m--,J==null?(s=J=C.precision,R=C.rounding):F?s=J+(Y.e-X.e)+1:s=J,s<0)u.push(1),l=!0;else{if(s=s/p+2|0,t=0,h==1){for(y=0,w=w[0],s++;(t1&&(w=T(w,y,e),L=T(L,y,e),h=w.length,A=L.length),g=h,a=L.slice(0,h),o=a.length;o=e/2&&++v;do y=0,i=N(w,a,h,o),i<0?(c=a[0],h!=o&&(c=c*e+(a[1]||0)),y=c/v|0,y>1?(y>=e&&(y=e-1),d=T(w,y,e),r=d.length,o=a.length,i=N(d,a,r,o),i==1&&(y--,V(d,h=10;y/=10)t++;n.e=t+m*p-1,$a(n,F?J+n.e+1:J,R,l)}return n}}();function $a(T,N,V,Y){var X,J,R,F,e,i,m,t,y,p=T.constructor;e:if(N!=null){if(t=T.d,!t)return T;for(X=1,F=t[0];F>=10;F/=10)X++;if(J=N-X,J<0)J+=qa,R=N,m=t[y=0],e=m/Ts(10,X-R-1)%10|0;else if(y=Math.ceil((J+1)/qa),F=t.length,y>=F)if(Y){for(;F++<=y;)t.push(0);m=e=0,X=1,J%=qa,R=J-qa+1}else break e;else{for(m=F=t[y],X=1;F>=10;F/=10)X++;J%=qa,R=J-qa+X,e=R<0?0:m/Ts(10,X-R-1)%10|0}if(Y=Y||N<0||t[y+1]!==void 0||(R<0?m:m%Ts(10,X-R-1)),i=V<4?(e||Y)&&(V==0||V==(T.s<0?3:2)):e>5||e==5&&(V==4||Y||V==6&&(J>0?R>0?m/Ts(10,X-R):0:t[y-1])%10&1||V==(T.s<0?8:7)),N<1||!t[0])return t.length=0,i?(N-=T.e+1,t[0]=Ts(10,(qa-N%qa)%qa),T.e=-N||0):t[0]=T.e=0,T;if(J==0?(t.length=y,F=1,y--):(t.length=y+1,F=Ts(10,qa-J),t[y]=R>0?(m/Ts(10,X-R)%Ts(10,R)|0)*F:0),i)for(;;)if(y==0){for(J=1,R=t[0];R>=10;R/=10)J++;for(R=t[0]+=F,F=1;R>=10;R/=10)F++;J!=F&&(T.e++,t[0]==Zf&&(t[0]=1));break}else{if(t[y]+=F,t[y]!=Zf)break;t[y--]=0,F=1}for(J=t.length;t[--J]===0;)t.pop()}return ii&&(T.e>p.maxE?(T.d=null,T.e=NaN):T.e0?J=J.charAt(0)+"."+J.slice(1)+mv(Y):R>1&&(J=J.charAt(0)+"."+J.slice(1)),J=J+(T.e<0?"e":"e+")+T.e):X<0?(J="0."+mv(-X-1)+J,V&&(Y=V-R)>0&&(J+=mv(Y))):X>=R?(J+=mv(X+1-R),V&&(Y=V-X-1)>0&&(J=J+"."+mv(Y))):((Y=X+1)0&&(X+1===R&&(J+="."),J+=mv(Y))),J}function U1(T,N){var V=T[0];for(N*=qa;V>=10;V/=10)N++;return N}function n1(T,N,V){if(N>_F)throw ii=!0,V&&(T.precision=V),Error(y8);return $a(new T(t1),N,1,!0)}function Gf(T,N,V){if(N>hb)throw Error(y8);return $a(new T(r1),N,V,!0)}function A8(T){var N=T.length-1,V=N*qa+1;if(N=T[N],N){for(;N%10==0;N/=10)V--;for(N=T[0];N>=10;N/=10)V++}return V}function mv(T){for(var N="";T--;)N+="0";return N}function T8(T,N,V,Y){var X,J=new T(1),R=Math.ceil(Y/qa+4);for(ii=!1;;){if(V%2&&(J=J.times(N),NT(J.d,R)&&(X=!0)),V=xl(V/2),V===0){V=J.d.length-1,X&&J.d[V]===0&&++J.d[V];break}N=N.times(N),NT(N.d,R)}return ii=!0,J}function PT(T){return T.d[T.d.length-1]&1}function M8(T,N,V){for(var Y,X=new T(N[0]),J=0;++J17)return new y(T.d?T.d[0]?T.s<0?0:1/0:1:T.s?T.s<0?0:T:0/0);for(N==null?(ii=!1,e=l):e=N,F=new y(.03125);T.e>-2;)T=T.times(F),t+=5;for(Y=Math.log(Ts(2,t))/Math.LN10*2+5|0,e+=Y,V=J=R=new y(1),y.precision=e;;){if(J=$a(J.times(T),e,1),V=V.times(++m),F=R.plus(po(J,V,e,1)),Ks(F.d).slice(0,e)===Ks(R.d).slice(0,e)){for(X=t;X--;)R=$a(R.times(R),e,1);if(N==null)if(i<3&&Hg(R.d,e-Y,p,i))y.precision=e+=10,V=J=F=new y(1),m=0,i++;else return $a(R,y.precision=l,p,ii=!0);else return y.precision=l,R}R=F}}function Mv(T,N){var V,Y,X,J,R,F,e,i,m,t,y,p=1,l=10,d=T,r=d.d,n=d.constructor,u=n.rounding,a=n.precision;if(d.s<0||!r||!r[0]||!d.e&&r[0]==1&&r.length==1)return new n(r&&!r[0]?-1/0:d.s!=1?NaN:r?0:d);if(N==null?(ii=!1,m=a):m=N,n.precision=m+=l,V=Ks(r),Y=V.charAt(0),Math.abs(J=d.e)<15e14){for(;Y<7&&Y!=1||Y==1&&V.charAt(1)>3;)d=d.times(T),V=Ks(d.d),Y=V.charAt(0),p++;J=d.e,Y>1?(d=new n("0."+V),J++):d=new n(Y+"."+V.slice(1))}else return i=n1(n,m+2,a).times(J+""),d=Mv(new n(Y+"."+V.slice(1)),m-l).plus(i),n.precision=a,N==null?$a(d,a,u,ii=!0):d;for(t=d,e=R=d=po(d.minus(1),d.plus(1),m,1),y=$a(d.times(d),m,1),X=3;;){if(R=$a(R.times(y),m,1),i=e.plus(po(R,new n(X),m,1)),Ks(i.d).slice(0,m)===Ks(e.d).slice(0,m))if(e=e.times(2),J!==0&&(e=e.plus(n1(n,m+2,a).times(J+""))),e=po(e,new n(p),m,1),N==null)if(Hg(e.d,m-l,u,F))n.precision=m+=l,i=R=d=po(t.minus(1),t.plus(1),m,1),y=$a(d.times(d),m,1),X=F=1;else return $a(e,n.precision=a,u,ii=!0);else return n.precision=a,e;e=i,X+=2}}function S8(T){return String(T.s*T.s/0)}function db(T,N){var V,Y,X;for((V=N.indexOf("."))>-1&&(N=N.replace(".","")),(Y=N.search(/e/i))>0?(V<0&&(V=Y),V+=+N.slice(Y+1),N=N.substring(0,Y)):V<0&&(V=N.length),Y=0;N.charCodeAt(Y)===48;Y++);for(X=N.length;N.charCodeAt(X-1)===48;--X);if(N=N.slice(Y,X),N){if(X-=Y,T.e=V=V-Y-1,T.d=[],Y=(V+1)%qa,V<0&&(Y+=qa),YT.constructor.maxE?(T.d=null,T.e=NaN):T.e-1){if(N=N.replace(/(\d)_(?=\d)/g,"$1"),w8.test(N))return db(T,N)}else if(N==="Infinity"||N==="NaN")return+N||(T.s=NaN),T.e=NaN,T.d=null,T;if(RF.test(N))V=16,N=N.toLowerCase();else if(NF.test(N))V=2;else if(FF.test(N))V=8;else throw Error(Ov+N);for(J=N.search(/p/i),J>0?(e=+N.slice(J+1),N=N.substring(2,J)):N=N.slice(2),J=N.indexOf("."),R=J>=0,Y=T.constructor,R&&(N=N.replace(".",""),F=N.length,J=F-J,X=T8(Y,new Y(V),J,J*2)),i=Ey(N,V,Zf),m=i.length-1,J=m;i[J]===0;--J)i.pop();return J<0?new Y(T.s*0):(T.e=U1(i,m),T.d=i,ii=!1,R&&(T=po(T,X,F*4)),e&&(T=T.times(Math.abs(e)<54?Ts(2,e):zv.pow(2,e))),ii=!0,T)}function kF(T,N){var V,Y=N.d.length;if(Y<3)return N.isZero()?N:u0(T,2,N,N);V=1.4*Math.sqrt(Y),V=V>16?16:V|0,N=N.times(1/H1(5,V)),N=u0(T,2,N,N);for(var X,J=new T(5),R=new T(16),F=new T(20);V--;)X=N.times(N),N=N.times(J.plus(X.times(R.times(X).minus(F))));return N}function u0(T,N,V,Y,X){var J,R,F,e,i=T.precision,m=Math.ceil(i/qa);for(ii=!1,e=V.times(V),F=new T(Y);;){if(R=po(F.times(e),new T(N++*N++),i,1),F=X?Y.plus(R):Y.minus(R),Y=po(R.times(e),new T(N++*N++),i,1),R=F.plus(Y),R.d[m]!==void 0){for(J=m;R.d[J]===F.d[J]&&J--;);if(J==-1)break}J=F,F=Y,Y=R,R=J}return ii=!0,R.d.length=m+1,R}function H1(T,N){for(var V=T;--N;)V*=T;return V}function E8(T,N){var V,Y=N.s<0,X=Gf(T,T.precision,1),J=X.times(.5);if(N=N.abs(),N.lte(J))return Ah=Y?4:1,N;if(V=N.divToInt(X),V.isZero())Ah=Y?3:2;else{if(N=N.minus(V.times(X)),N.lte(J))return Ah=PT(V)?Y?2:3:Y?4:1,N;Ah=PT(V)?Y?1:4:Y?3:2}return N.minus(X).abs()}function E3(T,N,V,Y){var X,J,R,F,e,i,m,t,y,p=T.constructor,l=V!==void 0;if(l?(lu(V,1,Hv),Y===void 0?Y=p.rounding:lu(Y,0,8)):(V=p.precision,Y=p.rounding),!T.isFinite())m=S8(T);else{for(m=Pc(T),R=m.indexOf("."),l?(X=2,N==16?V=V*4-3:N==8&&(V=V*3-2)):X=N,R>=0&&(m=m.replace(".",""),y=new p(1),y.e=m.length-R,y.d=Ey(Pc(y),10,X),y.e=y.d.length),t=Ey(m,10,X),J=e=t.length;t[--e]==0;)t.pop();if(!t[0])m=l?"0p+0":"0";else{if(R<0?J--:(T=new p(T),T.d=t,T.e=J,T=po(T,y,V,Y,0,X),t=T.d,J=T.e,i=m8),R=t[V],F=X/2,i=i||t[V+1]!==void 0,i=Y<4?(R!==void 0||i)&&(Y===0||Y===(T.s<0?3:2)):R>F||R===F&&(Y===4||i||Y===6&&t[V-1]&1||Y===(T.s<0?8:7)),t.length=V,i)for(;++t[--V]>X-1;)t[V]=0,V||(++J,t.unshift(1));for(e=t.length;!t[e-1];--e);for(R=0,m="";R1)if(N==16||N==8){for(R=N==16?4:3,--e;e%R;e++)m+="0";for(t=Ey(m,X,N),e=t.length;!t[e-1];--e);for(R=1,m="1.";Re)for(J-=e;J--;)m+="0";else JN)return T.length=N,!0}function BF(T){return new this(T).abs()}function UF(T){return new this(T).acos()}function HF(T){return new this(T).acosh()}function VF(T,N){return new this(T).plus(N)}function GF(T){return new this(T).asin()}function WF(T){return new this(T).asinh()}function YF(T){return new this(T).atan()}function ZF(T){return new this(T).atanh()}function XF(T,N){T=new this(T),N=new this(N);var V,Y=this.precision,X=this.rounding,J=Y+4;return!T.s||!N.s?V=new this(NaN):!T.d&&!N.d?(V=Gf(this,J,1).times(N.s>0?.25:.75),V.s=T.s):!N.d||T.isZero()?(V=N.s<0?Gf(this,Y,X):new this(0),V.s=T.s):!T.d||N.isZero()?(V=Gf(this,J,1).times(.5),V.s=T.s):N.s<0?(this.precision=J,this.rounding=1,V=this.atan(po(T,N,J,1)),N=Gf(this,J,1),this.precision=Y,this.rounding=X,V=T.s<0?V.minus(N):V.plus(N)):V=this.atan(po(T,N,J,1)),V}function jF(T){return new this(T).cbrt()}function $F(T){return $a(T=new this(T),T.e+1,2)}function KF(T,N,V){return new this(T).clamp(N,V)}function JF(T){if(!T||typeof T!="object")throw Error(B1+"Object expected");var N,V,Y,X=T.defaults===!0,J=["precision",1,Hv,"rounding",0,8,"toExpNeg",-Vp,0,"toExpPos",0,Vp,"maxE",0,Vp,"minE",-Vp,0,"modulo",0,9];for(N=0;N=J[N+1]&&Y<=J[N+2])this[V]=Y;else throw Error(Ov+V+": "+Y);if(V="crypto",X&&(this[V]=cb[V]),(Y=T[V])!==void 0)if(Y===!0||Y===!1||Y===0||Y===1)if(Y)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[V]=!0;else throw Error(x8);else this[V]=!1;else throw Error(Ov+V+": "+Y);return this}function QF(T){return new this(T).cos()}function qF(T){return new this(T).cosh()}function C8(T){var N,V,Y;function X(J){var R,F,e,i=this;if(!(i instanceof X))return new X(J);if(i.constructor=X,RT(J)){i.s=J.s,ii?!J.d||J.e>X.maxE?(i.e=NaN,i.d=null):J.e=10;F/=10)R++;ii?R>X.maxE?(i.e=NaN,i.d=null):R=429e7?N[J]=crypto.getRandomValues(new Uint32Array(1))[0]:F[J++]=X%1e7;else if(crypto.randomBytes){for(N=crypto.randomBytes(Y*=4);J=214e7?crypto.randomBytes(4).copy(N,J):(F.push(X%1e7),J+=4);J=Y/4}else throw Error(x8);else for(;J=10;X/=10)Y++;Y{var{on:N,config:V}=T,Y=zv.clone({precision:V.precision,modulo:zv.EUCLID});return Y.prototype=Object.create(Y.prototype),Y.prototype.type="BigNumber",Y.prototype.isBigNumber=!0,Y.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},Y.fromJSON=function(X){return new Y(X.value)},N&&N("config",function(X,J){X.precision!==J.precision&&Y.config({precision:X.precision})}),Y},{isClass:!0}),D8={exports:{}};/** + * @license Complex.js v2.1.1 12/05/2020 + * + * Copyright (c) 2020, Robert Eisele (robert@xarg.org) + * Dual licensed under the MIT or GPL Version 2 licenses. + **/(function(T,N){(function(V){var Y=Math.cosh||function(t){return Math.abs(t)<1e-9?1-t:(Math.exp(t)+Math.exp(-t))*.5},X=Math.sinh||function(t){return Math.abs(t)<1e-9?t:(Math.exp(t)-Math.exp(-t))*.5},J=function(t){var y=Math.PI/4;if(-y>t||t>y)return Math.cos(t)-1;var p=t*t;return p*(p*(p*(p*(p*(p*(p*(p/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-1/2)},R=function(t,y){var p=Math.abs(t),l=Math.abs(y);return p<3e3&&l<3e3?Math.sqrt(p*p+l*l):(p0&&F();break;case"number":p.im=0,p.re=t;break;default:F()}return isNaN(p.re)||isNaN(p.im),p};function m(t,y){if(!(this instanceof m))return new m(t,y);var p=i(t,y);this.re=p.re,this.im=p.im}m.prototype={re:0,im:0,sign:function(){var t=this.abs();return new m(this.re/t,this.im/t)},add:function(t,y){var p=new m(t,y);return this.isInfinite()&&p.isInfinite()?m.NAN:this.isInfinite()||p.isInfinite()?m.INFINITY:new m(this.re+p.re,this.im+p.im)},sub:function(t,y){var p=new m(t,y);return this.isInfinite()&&p.isInfinite()?m.NAN:this.isInfinite()||p.isInfinite()?m.INFINITY:new m(this.re-p.re,this.im-p.im)},mul:function(t,y){var p=new m(t,y);return this.isInfinite()&&p.isZero()||this.isZero()&&p.isInfinite()?m.NAN:this.isInfinite()||p.isInfinite()?m.INFINITY:p.im===0&&this.im===0?new m(this.re*p.re,0):new m(this.re*p.re-this.im*p.im,this.re*p.im+this.im*p.re)},div:function(t,y){var p=new m(t,y);if(this.isZero()&&p.isZero()||this.isInfinite()&&p.isInfinite())return m.NAN;if(this.isInfinite()||p.isZero())return m.INFINITY;if(this.isZero()||p.isInfinite())return m.ZERO;t=this.re,y=this.im;var l=p.re,d=p.im,r,n;return d===0?new m(t/l,y/l):Math.abs(l)0)return new m(Math.pow(t,p.re),0);if(t===0)switch((p.re%4+4)%4){case 0:return new m(Math.pow(y,p.re),0);case 1:return new m(0,Math.pow(y,p.re));case 2:return new m(-Math.pow(y,p.re),0);case 3:return new m(0,-Math.pow(y,p.re))}}if(t===0&&y===0&&p.re>0&&p.im>=0)return m.ZERO;var l=Math.atan2(y,t),d=e(t,y);return t=Math.exp(p.re*d-p.im*l),y=p.im*d+p.re*l,new m(t*Math.cos(y),t*Math.sin(y))},sqrt:function(){var t=this.re,y=this.im,p=this.abs(),l,d;if(t>=0){if(y===0)return new m(Math.sqrt(t),0);l=.5*Math.sqrt(2*(p+t))}else l=Math.abs(y)/Math.sqrt(2*(p-t));return t<=0?d=.5*Math.sqrt(2*(p-t)):d=Math.abs(y)/Math.sqrt(2*(p+t)),new m(l,y<0?-d:d)},exp:function(){var t=Math.exp(this.re);return this.im,new m(t*Math.cos(this.im),t*Math.sin(this.im))},expm1:function(){var t=this.re,y=this.im;return new m(Math.expm1(t)*Math.cos(y)+J(y),Math.exp(t)*Math.sin(y))},log:function(){var t=this.re,y=this.im;return new m(e(t,y),Math.atan2(y,t))},abs:function(){return R(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var t=this.re,y=this.im;return new m(Math.sin(t)*Y(y),Math.cos(t)*X(y))},cos:function(){var t=this.re,y=this.im;return new m(Math.cos(t)*Y(y),-Math.sin(t)*X(y))},tan:function(){var t=2*this.re,y=2*this.im,p=Math.cos(t)+Y(y);return new m(Math.sin(t)/p,X(y)/p)},cot:function(){var t=2*this.re,y=2*this.im,p=Math.cos(t)-Y(y);return new m(-Math.sin(t)/p,X(y)/p)},sec:function(){var t=this.re,y=this.im,p=.5*Y(2*y)+.5*Math.cos(2*t);return new m(Math.cos(t)*Y(y)/p,Math.sin(t)*X(y)/p)},csc:function(){var t=this.re,y=this.im,p=.5*Y(2*y)-.5*Math.cos(2*t);return new m(Math.sin(t)*Y(y)/p,-Math.cos(t)*X(y)/p)},asin:function(){var t=this.re,y=this.im,p=new m(y*y-t*t+1,-2*t*y).sqrt(),l=new m(p.re-y,p.im+t).log();return new m(l.im,-l.re)},acos:function(){var t=this.re,y=this.im,p=new m(y*y-t*t+1,-2*t*y).sqrt(),l=new m(p.re-y,p.im+t).log();return new m(Math.PI/2-l.im,l.re)},atan:function(){var t=this.re,y=this.im;if(t===0){if(y===1)return new m(0,1/0);if(y===-1)return new m(0,-1/0)}var p=t*t+(1-y)*(1-y),l=new m((1-y*y-t*t)/p,-2*t/p).log();return new m(-.5*l.im,.5*l.re)},acot:function(){var t=this.re,y=this.im;if(y===0)return new m(Math.atan2(1,t),0);var p=t*t+y*y;return p!==0?new m(t/p,-y/p).atan():new m(t!==0?t/0:0,y!==0?-y/0:0).atan()},asec:function(){var t=this.re,y=this.im;if(t===0&&y===0)return new m(0,1/0);var p=t*t+y*y;return p!==0?new m(t/p,-y/p).acos():new m(t!==0?t/0:0,y!==0?-y/0:0).acos()},acsc:function(){var t=this.re,y=this.im;if(t===0&&y===0)return new m(Math.PI/2,1/0);var p=t*t+y*y;return p!==0?new m(t/p,-y/p).asin():new m(t!==0?t/0:0,y!==0?-y/0:0).asin()},sinh:function(){var t=this.re,y=this.im;return new m(X(t)*Math.cos(y),Y(t)*Math.sin(y))},cosh:function(){var t=this.re,y=this.im;return new m(Y(t)*Math.cos(y),X(t)*Math.sin(y))},tanh:function(){var t=2*this.re,y=2*this.im,p=Y(t)+Math.cos(y);return new m(X(t)/p,Math.sin(y)/p)},coth:function(){var t=2*this.re,y=2*this.im,p=Y(t)-Math.cos(y);return new m(X(t)/p,-Math.sin(y)/p)},csch:function(){var t=this.re,y=this.im,p=Math.cos(2*y)-Y(2*t);return new m(-2*X(t)*Math.cos(y)/p,2*Y(t)*Math.sin(y)/p)},sech:function(){var t=this.re,y=this.im,p=Math.cos(2*y)+Y(2*t);return new m(2*Y(t)*Math.cos(y)/p,-2*X(t)*Math.sin(y)/p)},asinh:function(){var t=this.im;this.im=-this.re,this.re=t;var y=this.asin();return this.re=-this.im,this.im=t,t=y.re,y.re=-y.im,y.im=t,y},acosh:function(){var t=this.acos();if(t.im<=0){var y=t.re;t.re=-t.im,t.im=y}else{var y=t.im;t.im=-t.re,t.re=y}return t},atanh:function(){var t=this.re,y=this.im,p=t>1&&y===0,l=1-t,d=1+t,r=l*l+y*y,n=r!==0?new m((d*l-y*y)/r,(y*l+d*y)/r):new m(t!==-1?t/0:0,y!==0?y/0:0),u=n.re;return n.re=e(n.re,n.im)/2,n.im=Math.atan2(n.im,u)/2,p&&(n.im=-n.im),n},acoth:function(){var t=this.re,y=this.im;if(t===0&&y===0)return new m(0,Math.PI/2);var p=t*t+y*y;return p!==0?new m(t/p,-y/p).atanh():new m(t!==0?t/0:0,y!==0?-y/0:0).atanh()},acsch:function(){var t=this.re,y=this.im;if(y===0)return new m(t!==0?Math.log(t+Math.sqrt(t*t+1)):1/0,0);var p=t*t+y*y;return p!==0?new m(t/p,-y/p).asinh():new m(t!==0?t/0:0,y!==0?-y/0:0).asinh()},asech:function(){var t=this.re,y=this.im;if(this.isZero())return m.INFINITY;var p=t*t+y*y;return p!==0?new m(t/p,-y/p).acosh():new m(t!==0?t/0:0,y!==0?-y/0:0).acosh()},inverse:function(){if(this.isZero())return m.INFINITY;if(this.isInfinite())return m.ZERO;var t=this.re,y=this.im,p=t*t+y*y;return new m(t/p,-y/p)},conjugate:function(){return new m(this.re,-this.im)},neg:function(){return new m(-this.re,-this.im)},ceil:function(t){return t=Math.pow(10,t||0),new m(Math.ceil(this.re*t)/t,Math.ceil(this.im*t)/t)},floor:function(t){return t=Math.pow(10,t||0),new m(Math.floor(this.re*t)/t,Math.floor(this.im*t)/t)},round:function(t){return t=Math.pow(10,t||0),new m(Math.round(this.re*t)/t,Math.round(this.im*t)/t)},equals:function(t,y){var p=new m(t,y);return Math.abs(p.re-this.re)<=m.EPSILON&&Math.abs(p.im-this.im)<=m.EPSILON},clone:function(){return new m(this.re,this.im)},toString:function(){var t=this.re,y=this.im,p="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(t)(Object.defineProperty(Xs,"name",{value:"Complex"}),Xs.prototype.constructor=Xs,Xs.prototype.type="Complex",Xs.prototype.isComplex=!0,Xs.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},Xs.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},Xs.prototype.format=function(T){var N="",V=this.im,Y=this.re,X=Rd(this.re,T),J=Rd(this.im,T),R=Ni(T)?T:T?T.precision:null;if(R!==null){var F=Math.pow(10,-R);Math.abs(Y/V)N.re?1:T.reN.im?1:T.im1&&(d[r]=(d[r]||0)+1):d[l]=(d[l]||0)+1,d}var e=function(l,d){var r=0,n=1,u=1,a=0,o=0,c=0,s=1,b=1,g=0,A=1,v=1,h=1,x=1e7,C;if(l!=null)if(d!==void 0){if(r=l,n=d,u=r*n,r%1!==0||n%1!==0)throw p.NonIntegerParameter}else switch(typeof l){case"object":{if("d"in l&&"n"in l)r=l.n,n=l.d,"s"in l&&(r*=l.s);else if(0 in l)r=l[0],1 in l&&(n=l[1]);else throw p.InvalidParameter;u=r*n;break}case"number":{if(l<0&&(u=l,l=-l),l%1===0)r=l;else if(l>0){for(l>=1&&(b=Math.pow(10,Math.floor(1+Math.log(l)/Math.LN10)),l/=b);A<=x&&h<=x;)if(C=(g+v)/(A+h),l===C){A+h<=x?(r=g+v,n=A+h):h>A?(r=v,n=h):(r=g,n=A);break}else l>C?(g+=v,A+=h):(v+=g,h+=A),A>x?(r=v,n=h):(r=g,n=A);r*=b}else(isNaN(l)||isNaN(d))&&(n=r=NaN);break}case"string":{if(A=l.match(/\d+|./g),A===null)throw p.InvalidParameter;if(A[g]==="-"?(u=-1,g++):A[g]==="+"&&g++,A.length===g+1?o=J(A[g++],u):A[g+1]==="."||A[g]==="."?(A[g]!=="."&&(a=J(A[g++],u)),g++,(g+1===A.length||A[g+1]==="("&&A[g+3]===")"||A[g+1]==="'"&&A[g+3]==="'")&&(o=J(A[g],u),s=Math.pow(10,A[g].length),g++),(A[g]==="("&&A[g+2]===")"||A[g]==="'"&&A[g+2]==="'")&&(c=J(A[g+1],u),b=Math.pow(10,A[g+1].length)-1,g+=3)):A[g+1]==="/"||A[g+1]===":"?(o=J(A[g],u),s=J(A[g+2],1),g+=3):A[g+3]==="/"&&A[g+1]===" "&&(a=J(A[g],u),o=J(A[g+2],u),s=J(A[g+4],1),g+=5),A.length<=g){n=s*b,u=r=c+n*a+b*o;break}}default:throw p.InvalidParameter}if(n===0)throw p.DivisionByZero;X.s=u<0?-1:1,X.n=Math.abs(r),X.d=Math.abs(n)};function i(l,d,r){for(var n=1;d>0;l=l*l%r,d>>=1)d&1&&(n=n*l%r);return n}function m(l,d){for(;d%2===0;d/=2);for(;d%5===0;d/=5);if(d===1)return 0;for(var r=10%d,n=1;r!==1;n++)if(r=r*10%d,n>Y)return 0;return n}function t(l,d,r){for(var n=1,u=i(10,r,d),a=0;a<300;a++){if(n===u)return a;n=n*10%d,u=u*10%d}return 0}function y(l,d){if(!l)return d;if(!d)return l;for(;;){if(l%=d,!l)return d;if(d%=l,!d)return l}}function p(l,d){if(e(l,d),this instanceof p)l=y(X.d,X.n),this.s=X.s,this.n=X.n/l,this.d=X.d/l;else return R(X.s*X.n,X.d)}p.DivisionByZero=new Error("Division by Zero"),p.InvalidParameter=new Error("Invalid argument"),p.NonIntegerParameter=new Error("Parameters must be integer"),p.prototype={s:1,n:0,d:1,abs:function(){return R(this.n,this.d)},neg:function(){return R(-this.s*this.n,this.d)},add:function(l,d){return e(l,d),R(this.s*this.n*X.d+X.s*this.d*X.n,this.d*X.d)},sub:function(l,d){return e(l,d),R(this.s*this.n*X.d-X.s*this.d*X.n,this.d*X.d)},mul:function(l,d){return e(l,d),R(this.s*X.s*this.n*X.n,this.d*X.d)},div:function(l,d){return e(l,d),R(this.s*X.s*this.n*X.d,this.d*X.n)},clone:function(){return R(this.s*this.n,this.d)},mod:function(l,d){if(isNaN(this.n)||isNaN(this.d))return new p(NaN);if(l===void 0)return R(this.s*this.n%this.d,1);if(e(l,d),X.n===0&&this.d===0)throw p.DivisionByZero;return R(this.s*(X.d*this.n)%(X.n*this.d),X.d*this.d)},gcd:function(l,d){return e(l,d),R(y(X.n,this.n)*y(X.d,this.d),X.d*this.d)},lcm:function(l,d){return e(l,d),X.n===0&&this.n===0?R(0,1):R(X.n*this.n,y(X.n,this.n)*y(X.d,this.d))},ceil:function(l){return l=Math.pow(10,l||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):R(Math.ceil(l*this.s*this.n/this.d),l)},floor:function(l){return l=Math.pow(10,l||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):R(Math.floor(l*this.s*this.n/this.d),l)},round:function(l){return l=Math.pow(10,l||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):R(Math.round(l*this.s*this.n/this.d),l)},inverse:function(){return R(this.s*this.d,this.n)},pow:function(l,d){if(e(l,d),X.d===1)return X.s<0?R(Math.pow(this.s*this.d,X.n),Math.pow(this.n,X.n)):R(Math.pow(this.s*this.n,X.n),Math.pow(this.d,X.n));if(this.s<0)return null;var r=F(this.n),n=F(this.d),u=1,a=1;for(var o in r)if(o!=="1"){if(o==="0"){u=0;break}if(r[o]*=X.n,r[o]%X.d===0)r[o]/=X.d;else return null;u*=Math.pow(o,r[o])}for(var o in n)if(o!=="1"){if(n[o]*=X.n,n[o]%X.d===0)n[o]/=X.d;else return null;a*=Math.pow(o,n[o])}return X.s<0?R(a,u):R(u,a)},equals:function(l,d){return e(l,d),this.s*this.n*X.d===X.s*X.n*this.d},compare:function(l,d){e(l,d);var r=this.s*this.n*X.d-X.s*X.n*this.d;return(0=0;a--)u=u.inverse().add(r[a]);if(u.sub(d).abs().valueOf()0&&(r+=d,r+=" ",n%=u),r+=n,r+="/",r+=u),r},toLatex:function(l){var d,r="",n=this.n,u=this.d;return this.s<0&&(r+="-"),u===1?r+=n:(l&&(d=Math.floor(n/u))>0&&(r+=d,n%=u),r+="\\frac{",r+=n,r+="}{",r+=u,r+="}"),r},toContinued:function(){var l,d=this.n,r=this.d,n=[];if(isNaN(d)||isNaN(r))return n;do n.push(Math.floor(d/r)),l=d%r,d=r,r=l;while(d!==1);return n},toString:function(l){var d=this.n,r=this.d;if(isNaN(d)||isNaN(r))return"NaN";l=l||15;var n=m(d,r),u=t(d,r,n),a=this.s<0?"-":"";if(a+=d/r|0,d%=r,d*=10,d&&(a+="."),n){for(var o=u;o--;)a+=d/r|0,d%=r,d*=10;a+="(";for(var o=n;o--;)a+=d/r|0,d%=r,d*=10;a+=")"}else for(var o=l;d&&o--;)a+=d/r|0,d%=r,d*=10;return a}},Object.defineProperty(p,"__esModule",{value:!0}),p.default=p,p.Fraction=p,T.exports=p})()})(L8);const ph=Tb(L8.exports);var PI="Fraction",NI=[],RI=Lr(PI,NI,()=>(Object.defineProperty(ph,"name",{value:"Fraction"}),ph.prototype.constructor=ph,ph.prototype.type="Fraction",ph.prototype.isFraction=!0,ph.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},ph.fromJSON=function(T){return new ph(T)},ph),{isClass:!0}),FI="Range",II=[],_I=Lr(FI,II,()=>{function T(N,V,Y){if(!(this instanceof T))throw new SyntaxError("Constructor must be called with the new operator");var X=N!=null,J=V!=null,R=Y!=null;if(X){if(Ei(N))N=N.toNumber();else if(typeof N!="number")throw new TypeError("Parameter start must be a number")}if(J){if(Ei(V))V=V.toNumber();else if(typeof V!="number")throw new TypeError("Parameter end must be a number")}if(R){if(Ei(Y))Y=Y.toNumber();else if(typeof Y!="number")throw new TypeError("Parameter step must be a number")}this.start=X?parseFloat(N):0,this.end=J?parseFloat(V):0,this.step=R?parseFloat(Y):1}return T.prototype.type="Range",T.prototype.isRange=!0,T.parse=function(N){if(typeof N!="string")return null;var V=N.split(":"),Y=V.map(function(J){return parseFloat(J)}),X=Y.some(function(J){return isNaN(J)});if(X)return null;switch(Y.length){case 2:return new T(Y[0],Y[1]);case 3:return new T(Y[0],Y[2],Y[1]);default:return null}},T.prototype.clone=function(){return new T(this.start,this.end,this.step)},T.prototype.size=function(){var N=0,V=this.start,Y=this.step,X=this.end,J=X-V;return Tv(Y)===Tv(J)?N=Math.ceil(J/Y):J===0&&(N=0),isNaN(N)&&(N=0),[N]},T.prototype.min=function(){var N=this.size()[0];if(N>0)return this.step>0?this.start:this.start+(N-1)*this.step},T.prototype.max=function(){var N=this.size()[0];if(N>0)return this.step>0?this.start+(N-1)*this.step:this.start},T.prototype.forEach=function(N){var V=this.start,Y=this.step,X=this.end,J=0;if(Y>0)for(;VX;)N(V,[J],this),V+=Y,J++},T.prototype.map=function(N){var V=[];return this.forEach(function(Y,X,J){V[X[0]]=N(Y,X,J)}),V},T.prototype.toArray=function(){var N=[];return this.forEach(function(V,Y){N[Y[0]]=V}),N},T.prototype.valueOf=function(){return this.toArray()},T.prototype.format=function(N){var V=Rd(this.start,N);return this.step!==1&&(V+=":"+Rd(this.step,N)),V+=":"+Rd(this.end,N),V},T.prototype.toString=function(){return this.format()},T.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},T.fromJSON=function(N){return new T(N.start,N.end,N.step)},T},{isClass:!0}),OI="Matrix",zI=[],kI=Lr(OI,zI,()=>{function T(){if(!(this instanceof T))throw new SyntaxError("Constructor must be called with the new operator")}return T.prototype.type="Matrix",T.prototype.isMatrix=!0,T.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},T.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},T.prototype.create=function(N,V){throw new Error("Cannot invoke create on a Matrix interface")},T.prototype.subset=function(N,V,Y){throw new Error("Cannot invoke subset on a Matrix interface")},T.prototype.get=function(N){throw new Error("Cannot invoke get on a Matrix interface")},T.prototype.set=function(N,V,Y){throw new Error("Cannot invoke set on a Matrix interface")},T.prototype.resize=function(N,V){throw new Error("Cannot invoke resize on a Matrix interface")},T.prototype.reshape=function(N,V){throw new Error("Cannot invoke reshape on a Matrix interface")},T.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},T.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},T.prototype.map=function(N,V){throw new Error("Cannot invoke map on a Matrix interface")},T.prototype.forEach=function(N){throw new Error("Cannot invoke forEach on a Matrix interface")},T.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},T.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},T.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},T.prototype.format=function(N){throw new Error("Cannot invoke format on a Matrix interface")},T.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},T},{isClass:!0});function BI(T){var N=0,V=1,Y=Object.create(null),X=Object.create(null),J=0,R=function(e){var i=X[e];if(!!i&&(delete Y[i],delete X[e],--N,V===i)){if(!N){J=0,V=1;return}for(;!hasOwnProperty.call(Y,++V););}};return T=Math.abs(T),{hit:function(e){var i=X[e],m=++J;if(Y[m]=e,X[e]=m,!i)return++N,N<=T?void 0:(e=Y[V],R(e),e);if(delete Y[i],V===i)for(;!hasOwnProperty.call(Y,++V););},delete:R,clear:function(){N=J=0,V=1,Y=Object.create(null),X=Object.create(null)}}}function Jg(T){var{hasher:N,limit:V}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return V=V==null?Number.POSITIVE_INFINITY:V,N=N==null?JSON.stringify:N,function Y(){typeof Y.cache!="object"&&(Y.cache={values:new Map,lru:BI(V||Number.POSITIVE_INFINITY)});for(var X=[],J=0;J{var{Matrix:N}=T;function V(m,t){if(!(this instanceof V))throw new SyntaxError("Constructor must be called with the new operator");if(t&&!zl(t))throw new Error("Invalid datatype: "+t);if(Qa(m))m.type==="DenseMatrix"?(this._data=ei(m._data),this._size=ei(m._size),this._datatype=t||m._datatype):(this._data=m.toArray(),this._size=m.size(),this._datatype=t||m._datatype);else if(m&&ro(m.data)&&ro(m.size))this._data=m.data,this._size=m.size,CT(this._data,this._size),this._datatype=t||m.datatype;else if(ro(m))this._data=i(m),this._size=Si(this._data),CT(this._data,this._size),this._datatype=t;else{if(m)throw new TypeError("Unsupported type of data ("+wo(m)+")");this._data=[],this._size=[0],this._datatype=t}}V.prototype=new N,V.prototype.createDenseMatrix=function(m,t){return new V(m,t)},Object.defineProperty(V,"name",{value:"DenseMatrix"}),V.prototype.constructor=V,V.prototype.type="DenseMatrix",V.prototype.isDenseMatrix=!0,V.prototype.getDataType=function(){return Ug(this._data,wo)},V.prototype.storage=function(){return"dense"},V.prototype.datatype=function(){return this._datatype},V.prototype.create=function(m,t){return new V(m,t)},V.prototype.subset=function(m,t,y){switch(arguments.length){case 1:return Y(this,m);case 2:case 3:return J(this,m,t,y);default:throw new SyntaxError("Wrong number of arguments")}},V.prototype.get=function(m){if(!ro(m))throw new TypeError("Array expected");if(m.length!==this._size.length)throw new bi(m.length,this._size.length);for(var t=0;t");var a=t.max().map(function(s){return s+1});e(m,a,p);var o=l.length,c=0;R(m._data,t,y,o,c)}return m}function R(m,t,y,p,l){var d=l===p-1,r=t.dimension(l);d?r.forEach(function(n,u){io(n),m[n]=y[u[0]]}):r.forEach(function(n,u){io(n),R(m[n],t,y[u[0]],p,l+1)})}V.prototype.resize=function(m,t,y){if(!Lc(m))throw new TypeError("Array or Matrix expected");var p=m.valueOf().map(d=>Array.isArray(d)&&d.length===1?d[0]:d),l=y?this.clone():this;return F(l,p,t)};function F(m,t,y){if(t.length===0){for(var p=m._data;ro(p);)p=p[0];return p}return m._size=t.slice(0),m._data=i0(m._data,m._size,y),m}V.prototype.reshape=function(m,t){var y=t?this.clone():this;y._data=u8(y._data,m);var p=y._size.reduce((l,d)=>l*d);return y._size=w3(m,p),y};function e(m,t,y){for(var p=m._size.slice(0),l=!1;p.lengthp[d]&&(p[d]=t[d],l=!0);l&&F(m,p,y)}V.prototype.clone=function(){var m=new V({data:ei(this._data),size:ei(this._size),datatype:this._datatype});return m},V.prototype.size=function(){return this._size.slice(0)},V.prototype.map=function(m){var t=this,y=Vv(m),p=function r(n,u){return ro(n)?n.map(function(a,o){return r(a,u.concat(o))}):y===1?m(n):y===2?m(n,u):m(n,u,t)},l=p(this._data,[]),d=this._datatype!==void 0?Ug(l,wo):void 0;return new V(l,d)},V.prototype.forEach=function(m){var t=this,y=function p(l,d){ro(l)?l.forEach(function(r,n){p(r,d.concat(n))}):m(l,d,t)};y(this._data,[])},V.prototype[Symbol.iterator]=function*(){var m=function*t(y,p){if(ro(y))for(var l=0;l[a[n]]);t.push(new V(u,m._datatype))},d=0;d0?m:0,y=m<0?-m:0,p=this._size[0],l=this._size[1],d=Math.min(p-y,l-t),r=[],n=0;n0?y:0,d=y<0?-y:0,r=m[0],n=m[1],u=Math.min(r-d,n-l),a;if(ro(t)){if(t.length!==u)throw new Error("Invalid value array length");a=function(g){return t[g]}}else if(Qa(t)){var o=t.size();if(o.length!==1||o[0]!==u)throw new Error("Invalid matrix length");a=function(g){return t.get([g])}}else a=function(){return t};p||(p=Ei(a(0))?a(0).mul(0):0);var c=[];if(m.length>0){c=i0(c,m,p);for(var s=0;s{var{typed:N}=T;return N(FT,{any:ei})});function P8(T){var N=T.length,V=T[0].length,Y,X,J=[];for(X=0;X=Y.length)throw new $f(N,Y.length);return Qa(T)?T.create(a1(T.valueOf(),N,V)):a1(T,N,V)}function a1(T,N,V){var Y,X,J,R;if(N<=0)if(Array.isArray(T[0])){for(R=P8(T),X=[],Y=0;Y{var{typed:N}=T;return N(_T,{number:Ya,BigNumber:function(Y){return Y.isInt()},Fraction:function(Y){return Y.d===1&&isFinite(Y.n)},"Array | Matrix":N.referToSelf(V=>Y=>wi(Y,V))})}),Kf="number",Vd="number, number";function N8(T){return Math.abs(T)}N8.signature=Kf;function R8(T,N){return T+N}R8.signature=Vd;function F8(T,N){return T*N}F8.signature=Vd;function I8(T){return-T}I8.signature=Kf;function _8(T){return T}_8.signature=Kf;function cg(T){return JR(T)}cg.signature=Kf;function O8(T){return T*T*T}O8.signature=Kf;function z8(T){return Math.exp(T)}z8.signature=Kf;function k8(T){return QR(T)}k8.signature=Kf;function B8(T,N){if(!Ya(T)||!Ya(N))throw new Error("Parameters in function gcd must be integer numbers");for(var V;N!==0;)V=T%N,T=N,N=V;return T<0?-T:T}B8.signature=Vd;function U8(T,N){if(!Ya(T)||!Ya(N))throw new Error("Parameters in function lcm must be integer numbers");if(T===0||N===0)return 0;for(var V,Y=T*N;N!==0;)V=N,N=T%V,T=V;return Math.abs(Y/T)}U8.signature=Vd;function XI(T,N){return N?Math.log(T)/Math.log(N):Math.log(T)}function H8(T){return $R(T)}H8.signature=Kf;function V8(T){return jR(T)}V8.signature=Kf;function G8(T,N){if(N>0)return T-N*Math.floor(T/N);if(N===0)return T;throw new Error("Cannot calculate mod for a negative divisor")}G8.signature=Vd;function OT(T){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,V=N<0;if(V&&(N=-N),N===0)throw new Error("Root must be non-zero");if(T<0&&Math.abs(N)%2!==1)throw new Error("Root must be odd when a is negative.");if(T===0)return V?1/0:0;if(!isFinite(T))return V?0:T;var Y=Math.pow(Math.abs(T),1/N);return Y=T<0?-Y:Y,V?1/Y:Y}function pb(T){return Tv(T)}pb.signature=Kf;function W8(T){return T*T}W8.signature=Kf;function Y8(T,N){var V,Y,X,J=0,R=1,F=1,e=0;if(!Ya(T)||!Ya(N))throw new Error("Parameters in function xgcd must be integer numbers");for(;N;)Y=Math.floor(T/N),X=T-Y*N,V=J,J=R-Y*J,R=V,V=F,F=e-Y*F,e=V,T=N,N=X;var i;return T<0?i=[-T,-R,-e]:i=[T,T?R:0,e],i}Y8.signature=Vd;function Z8(T,N){return T*T<1&&N===1/0||T*T>1&&N===-1/0?0:Math.pow(T,N)}Z8.signature=Vd;function zT(T){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!Ya(N)||N<0||N>15)throw new Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat(i8(T,N))}var jI="number",m0="number, number";function X8(T,N){if(!Ya(T)||!Ya(N))throw new Error("Integers expected in function bitAnd");return T&N}X8.signature=m0;function j8(T){if(!Ya(T))throw new Error("Integer expected in function bitNot");return~T}j8.signature=jI;function $8(T,N){if(!Ya(T)||!Ya(N))throw new Error("Integers expected in function bitOr");return T|N}$8.signature=m0;function K8(T,N){if(!Ya(T)||!Ya(N))throw new Error("Integers expected in function bitXor");return T^N}K8.signature=m0;function J8(T,N){if(!Ya(T)||!Ya(N))throw new Error("Integers expected in function leftShift");return T<>N}Q8.signature=m0;function q8(T,N){if(!Ya(T)||!Ya(N))throw new Error("Integers expected in function rightLogShift");return T>>>N}q8.signature=m0;function Th(T,N){if(N>1;return Th(T,V)*Th(V+1,N)}function eC(T,N){if(!Ya(T)||T<0)throw new TypeError("Positive integer value expected in function combinations");if(!Ya(N)||N<0)throw new TypeError("Positive integer value expected in function combinations");if(N>T)throw new TypeError("k must be less than or equal to n");for(var V=T-N,Y=1,X=N171?1/0:Th(1,T-1);if(T<.5)return Math.PI/(Math.sin(Math.PI*T)*i1(1-T));if(T>=171.35)return 1/0;if(T>85){var V=T*T,Y=V*T,X=Y*T,J=X*T;return Math.sqrt(2*Math.PI/T)*Math.pow(T/Math.E,T)*(1+1/(12*T)+1/(288*V)-139/(51840*Y)-571/(2488320*X)+163879/(209018880*J)+5246819/(75246796800*J*T))}--T,N=Jp[0];for(var R=1;R=1;Y--)V+=kT[Y]/(T+Y);return oC+(T+.5)*Math.log(N)-N+Math.log(V)}o1.signature="number";var bl="number";function sC(T){return nF(T)}sC.signature=bl;function lC(T){return Math.atan(1/T)}lC.signature=bl;function uC(T){return isFinite(T)?(Math.log((T+1)/T)+Math.log(T/(T-1)))/2:0}uC.signature=bl;function fC(T){return Math.asin(1/T)}fC.signature=bl;function cC(T){var N=1/T;return Math.log(N+Math.sqrt(N*N+1))}cC.signature=bl;function hC(T){return Math.acos(1/T)}hC.signature=bl;function vC(T){var N=1/T,V=Math.sqrt(N*N-1);return Math.log(V+N)}vC.signature=bl;function dC(T){return aF(T)}dC.signature=bl;function pC(T){return iF(T)}pC.signature=bl;function gC(T){return 1/Math.tan(T)}gC.signature=bl;function mC(T){var N=Math.exp(2*T);return(N+1)/(N-1)}mC.signature=bl;function yC(T){return 1/Math.sin(T)}yC.signature=bl;function xC(T){return T===0?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(T)-Math.exp(-T)))*Tv(T)}xC.signature=bl;function bC(T){return 1/Math.cos(T)}bC.signature=bl;function wC(T){return 2/(Math.exp(T)+Math.exp(-T))}wC.signature=bl;function AC(T){return sF(T)}AC.signature=bl;var G1="number";function TC(T){return T<0}TC.signature=G1;function MC(T){return T>0}MC.signature=G1;function SC(T){return T===0}SC.signature=G1;function EC(T){return Number.isNaN(T)}EC.signature=G1;var BT="isNegative",r_=["typed"],n_=Lr(BT,r_,T=>{var{typed:N}=T;return N(BT,{number:TC,BigNumber:function(Y){return Y.isNeg()&&!Y.isZero()&&!Y.isNaN()},Fraction:function(Y){return Y.s<0},Unit:N.referToSelf(V=>Y=>N.find(V,Y.valueType())(Y.value)),"Array | Matrix":N.referToSelf(V=>Y=>wi(Y,V))})}),UT="isNumeric",a_=["typed"],i_=Lr(UT,a_,T=>{var{typed:N}=T;return N(UT,{"number | BigNumber | Fraction | boolean":()=>!0,"Complex | Unit | string | null | undefined | Node":()=>!1,"Array | Matrix":N.referToSelf(V=>Y=>wi(Y,V))})}),HT="hasNumericValue",o_=["typed","isNumeric"],s_=Lr(HT,o_,T=>{var{typed:N,isNumeric:V}=T;return N(HT,{boolean:()=>!0,string:function(X){return X.trim().length>0&&!isNaN(Number(X))},any:function(X){return V(X)}})}),VT="isPositive",l_=["typed"],u_=Lr(VT,l_,T=>{var{typed:N}=T;return N(VT,{number:MC,BigNumber:function(Y){return!Y.isNeg()&&!Y.isZero()&&!Y.isNaN()},Fraction:function(Y){return Y.s>0&&Y.n>0},Unit:N.referToSelf(V=>Y=>N.find(V,Y.valueType())(Y.value)),"Array | Matrix":N.referToSelf(V=>Y=>wi(Y,V))})}),GT="isZero",f_=["typed"],c_=Lr(GT,f_,T=>{var{typed:N}=T;return N(GT,{number:SC,BigNumber:function(Y){return Y.isZero()},Complex:function(Y){return Y.re===0&&Y.im===0},Fraction:function(Y){return Y.d===1&&Y.n===0},Unit:N.referToSelf(V=>Y=>N.find(V,Y.valueType())(Y.value)),"Array | Matrix":N.referToSelf(V=>Y=>wi(Y,V))})}),WT="isNaN",h_=["typed"],v_=Lr(WT,h_,T=>{var{typed:N}=T;return N(WT,{number:EC,BigNumber:function(Y){return Y.isNaN()},Fraction:function(Y){return!1},Complex:function(Y){return Y.isNaN()},Unit:function(Y){return Number.isNaN(Y.value)},"Array | Matrix":function(Y){return wi(Y,Number.isNaN)}})}),YT="typeOf",d_=["typed"],p_=Lr(YT,d_,T=>{var{typed:N}=T;return N(YT,{any:wo})});function Nc(T,N,V){if(V==null)return T.eq(N);if(T.eq(N))return!0;if(T.isNaN()||N.isNaN())return!1;if(T.isFinite()&&N.isFinite()){var Y=T.minus(N).abs();if(Y.isZero())return!0;var X=T.constructor.max(T.abs(),N.abs());return Y.lte(X.times(V))}return!1}function g_(T,N,V){return Du(T.re,N.re,V)&&Du(T.im,N.im,V)}var y0=Lr("compareUnits",["typed"],T=>{var{typed:N}=T;return{"Unit, Unit":N.referToSelf(V=>(Y,X)=>{if(!Y.equalBase(X))throw new Error("Cannot compare units with different base");return N.find(V,[Y.valueType(),X.valueType()])(Y.value,X.value)})}}),s1="equalScalar",m_=["typed","config"],y_=Lr(s1,m_,T=>{var{typed:N,config:V}=T,Y=y0({typed:N});return N(s1,{"boolean, boolean":function(J,R){return J===R},"number, number":function(J,R){return Du(J,R,V.epsilon)},"BigNumber, BigNumber":function(J,R){return J.eq(R)||Nc(J,R,V.epsilon)},"Fraction, Fraction":function(J,R){return J.equals(R)},"Complex, Complex":function(J,R){return g_(J,R,V.epsilon)}},Y)});Lr(s1,["typed","config"],T=>{var{typed:N,config:V}=T;return N(s1,{"number, number":function(X,J){return Du(X,J,V.epsilon)}})});var x_="SparseMatrix",b_=["typed","equalScalar","Matrix"],w_=Lr(x_,b_,T=>{var{typed:N,equalScalar:V,Matrix:Y}=T;function X(d,r){if(!(this instanceof X))throw new SyntaxError("Constructor must be called with the new operator");if(r&&!zl(r))throw new Error("Invalid datatype: "+r);if(Qa(d))J(this,d,r);else if(d&&ro(d.index)&&ro(d.ptr)&&ro(d.size))this._values=d.values,this._index=d.index,this._ptr=d.ptr,this._size=d.size,this._datatype=r||d.datatype;else if(ro(d))R(this,d,r);else{if(d)throw new TypeError("Unsupported type of data ("+wo(d)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=r}}function J(d,r,n){r.type==="SparseMatrix"?(d._values=r._values?ei(r._values):void 0,d._index=ei(r._index),d._ptr=ei(r._ptr),d._size=ei(r._size),d._datatype=n||r._datatype):R(d,r.valueOf(),n||r._datatype)}function R(d,r,n){d._values=[],d._index=[],d._ptr=[],d._datatype=n;var u=r.length,a=0,o=V,c=0;if(zl(n)&&(o=N.find(V,[n,n])||V,c=N.convert(0,n)),u>0){var s=0;do{d._ptr.push(d._index.length);for(var b=0;b");if(a.length===1){var g=r.dimension(0);g.forEach(function(h,x){io(h),d.set([h,0],n[x[0]],u)})}else{var A=r.dimension(0),v=r.dimension(1);A.forEach(function(h,x){io(h),v.forEach(function(C,D){io(C),d.set([h,C],n[x[0]][D[0]],u)})})}}return d}X.prototype.get=function(d){if(!ro(d))throw new TypeError("Array expected");if(d.length!==this._size.length)throw new bi(d.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var r=d[0],n=d[1];io(r,this._size[0]),io(n,this._size[1]);var u=i(r,this._ptr[n],this._ptr[n+1],this._index);return uo-1||a>c-1)&&(y(this,Math.max(u+1,o),Math.max(a+1,c),n),o=this._size[0],c=this._size[1]),io(u,o),io(a,c);var g=i(u,this._ptr[a],this._ptr[a+1],this._index);return gArray.isArray(o)&&o.length===1?o[0]:o);if(u.length!==2)throw new Error("Only two dimensions matrix are supported");u.forEach(function(o){if(!Ni(o)||!Ya(o)||o<0)throw new TypeError("Invalid size, must contain positive integers (size: "+vi(u)+")")});var a=n?this.clone():this;return y(a,u[0],u[1],r)};function y(d,r,n,u){var a=u||0,o=V,c=0;zl(d._datatype)&&(o=N.find(V,[d._datatype,d._datatype])||V,c=N.convert(0,d._datatype),a=N.convert(a,d._datatype));var s=!o(a,c),b=d._size[0],g=d._size[1],A,v,h;if(n>g){for(v=g;vb){if(s){var x=0;for(v=0;vr-1&&(d._values.splice(h,1),d._index.splice(h,1),D++)}d._ptr[v]=d._values.length}return d._size[0]=r,d._size[1]=n,d}X.prototype.reshape=function(d,r){if(!ro(d))throw new TypeError("Array expected");if(d.length!==2)throw new Error("Sparse matrices can only be reshaped in two dimensions");d.forEach(function(f){if(!Ni(f)||!Ya(f)||f<=-2||f===0)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+vi(d)+")")});var n=this._size[0]*this._size[1];d=w3(d,n);var u=d[0]*d[1];if(n!==u)throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var a=r?this.clone():this;if(this._size[0]===d[0]&&this._size[1]===d[1])return a;for(var o=[],c=0;c=r&&w<=n&&h(d._values[L],w-r,x-u)}else{for(var M={},S=C;S "+(this._values?vi(this._values[b],d):"X")}return a},X.prototype.toString=function(){return vi(this.toArray())},X.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},X.prototype.diagonal=function(d){if(d){if(Ei(d)&&(d=d.toNumber()),!Ni(d)||!Ya(d))throw new TypeError("The parameter k must be an integer number")}else d=0;var r=d>0?d:0,n=d<0?-d:0,u=this._size[0],a=this._size[1],o=Math.min(u-n,a-r),c=[],s=[],b=[];b[0]=0;for(var g=r;g0?n:0,b=n<0?-n:0,g=d[0],A=d[1],v=Math.min(g-b,A-s),h;if(ro(r)){if(r.length!==v)throw new Error("Invalid value array length");h=function(P){return r[P]}}else if(Qa(r)){var x=r.size();if(x.length!==1||x[0]!==v)throw new Error("Invalid matrix length");h=function(P){return r.get([P])}}else h=function(){return r};for(var C=[],D=[],L=[],w=0;w=0&&M=b||a[A]!==r)){var h=u?u[g]:void 0;a.splice(A,0,r),u&&u.splice(A,0,h),a.splice(A<=g?g+1:g,1),u&&u.splice(A<=g?g+1:g,1);continue}if(A=b||a[g]!==d)){var x=u?u[A]:void 0;a.splice(g,0,d),u&&u.splice(g,0,x),a.splice(g<=A?A+1:A,1),u&&u.splice(g<=A?A+1:A,1)}}},X},{isClass:!0}),A_="number",T_=["typed"];function M_(T){var N=T.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(N){var V={"0b":2,"0o":8,"0x":16}[N[1]],Y=N[2],X=N[3];return{input:T,radix:V,integerPart:Y,fractionalPart:X}}else return null}function S_(T){for(var N=parseInt(T.integerPart,T.radix),V=0,Y=0;Y{var{typed:N}=T,V=N("number",{"":function(){return 0},number:function(X){return X},string:function(X){if(X==="NaN")return NaN;var J=M_(X);if(J)return S_(J);var R=0,F=X.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);F&&(R=Number(F[2]),X=F[1]);var e=Number(X);if(isNaN(e))throw new SyntaxError('String "'+X+'" is no valid number');if(F){if(e>2**R-1)throw new SyntaxError('String "'.concat(X,'" is out of range'));e>=2**(R-1)&&(e=e-2**R)}return e},BigNumber:function(X){return X.toNumber()},Fraction:function(X){return X.valueOf()},Unit:function(X){throw new Error("Second argument with valueless unit expected")},null:function(X){return 0},"Unit, string | Unit":function(X,J){return X.toNumber(J)},"Array | Matrix":N.referToSelf(Y=>X=>wi(X,Y))});return V.fromJSON=function(Y){return parseFloat(Y.value)},V}),ZT="string",C_=["typed"],D_=Lr(ZT,C_,T=>{var{typed:N}=T;return N(ZT,{"":function(){return""},number:Rd,null:function(Y){return"null"},boolean:function(Y){return Y+""},string:function(Y){return Y},"Array | Matrix":N.referToSelf(V=>Y=>wi(Y,V)),any:function(Y){return String(Y)}})}),XT="boolean",L_=["typed"],P_=Lr(XT,L_,T=>{var{typed:N}=T;return N(XT,{"":function(){return!1},boolean:function(Y){return Y},number:function(Y){return!!Y},null:function(Y){return!1},BigNumber:function(Y){return!Y.isZero()},string:function(Y){var X=Y.toLowerCase();if(X==="true")return!0;if(X==="false")return!1;var J=Number(Y);if(Y!==""&&!isNaN(J))return!!J;throw new Error('Cannot convert "'+Y+'" to a boolean')},"Array | Matrix":N.referToSelf(V=>Y=>wi(Y,V))})}),N_="bignumber",R_=["typed","BigNumber"],F_=Lr(N_,R_,T=>{var{typed:N,BigNumber:V}=T;return N("bignumber",{"":function(){return new V(0)},number:function(X){return new V(X+"")},string:function(X){var J=X.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(J){var R=J[2],F=V(J[1]),e=new V(2).pow(Number(R));if(F.gt(e.sub(1)))throw new SyntaxError('String "'.concat(X,'" is out of range'));var i=new V(2).pow(Number(R)-1);return F.gte(i)?F.sub(e):F}return new V(X)},BigNumber:function(X){return X},Fraction:function(X){return new V(X.n).div(X.d).times(X.s)},null:function(X){return new V(0)},"Array | Matrix":N.referToSelf(Y=>X=>wi(X,Y))})}),I_="complex",__=["typed","Complex"],O_=Lr(I_,__,T=>{var{typed:N,Complex:V}=T;return N("complex",{"":function(){return V.ZERO},number:function(X){return new V(X,0)},"number, number":function(X,J){return new V(X,J)},"BigNumber, BigNumber":function(X,J){return new V(X.toNumber(),J.toNumber())},Fraction:function(X){return new V(X.valueOf(),0)},Complex:function(X){return X.clone()},string:function(X){return V(X)},null:function(X){return V(0)},Object:function(X){if("re"in X&&"im"in X)return new V(X.re,X.im);if("r"in X&&"phi"in X||"abs"in X&&"arg"in X)return new V(X);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":N.referToSelf(Y=>X=>wi(X,Y))})}),z_="fraction",k_=["typed","Fraction"],B_=Lr(z_,k_,T=>{var{typed:N,Fraction:V}=T;return N("fraction",{number:function(X){if(!isFinite(X)||isNaN(X))throw new Error(X+" cannot be represented as a fraction");return new V(X)},string:function(X){return new V(X)},"number, number":function(X,J){return new V(X,J)},null:function(X){return new V(0)},BigNumber:function(X){return new V(X.toString())},Fraction:function(X){return X},Object:function(X){return new V(X)},"Array | Matrix":N.referToSelf(Y=>X=>wi(X,Y))})}),jT="matrix",U_=["typed","Matrix","DenseMatrix","SparseMatrix"],H_=Lr(jT,U_,T=>{var{typed:N,Matrix:V,DenseMatrix:Y,SparseMatrix:X}=T;return N(jT,{"":function(){return J([])},string:function(F){return J([],F)},"string, string":function(F,e){return J([],F,e)},Array:function(F){return J(F)},Matrix:function(F){return J(F,F.storage())},"Array | Matrix, string":J,"Array | Matrix, string, string":J});function J(R,F,e){if(F==="dense"||F==="default"||F===void 0)return new Y(R,e);if(F==="sparse")return new X(R,e);throw new TypeError("Unknown matrix type "+JSON.stringify(F)+".")}}),$T="matrixFromFunction",V_=["typed","matrix","isZero"],G_=Lr($T,V_,T=>{var{typed:N,matrix:V,isZero:Y}=T;return N($T,{"Array | Matrix, function, string, string":function(R,F,e,i){return X(R,F,e,i)},"Array | Matrix, function, string":function(R,F,e){return X(R,F,e)},"Matrix, function":function(R,F){return X(R,F,"dense")},"Array, function":function(R,F){return X(R,F,"dense").toArray()},"Array | Matrix, string, function":function(R,F,e){return X(R,e,F)},"Array | Matrix, string, string, function":function(R,F,e,i){return X(R,i,F,e)}});function X(J,R,F,e){var i;return e!==void 0?i=V(F,e):i=V(F),i.resize(J),i.forEach(function(m,t){var y=R(t);Y(y)||i.set(t,y)}),i}}),KT="matrixFromRows",W_=["typed","matrix","flatten","size"],Y_=Lr(KT,W_,T=>{var{typed:N,matrix:V,flatten:Y,size:X}=T;return N(KT,{"...Array":function(e){return J(e)},"...Matrix":function(e){return V(J(e.map(i=>i.toArray())))}});function J(F){if(F.length===0)throw new TypeError("At least one row is needed to construct a matrix.");var e=R(F[0]),i=[];for(var m of F){var t=R(m);if(t!==e)throw new TypeError("The vectors had different length: "+(e|0)+" \u2260 "+(t|0));i.push(Y(m))}return i}function R(F){var e=X(F);if(e.length===1)return e[0];if(e.length===2){if(e[0]===1)return e[1];if(e[1]===1)return e[0];throw new TypeError("At least one of the arguments is not a vector.")}else throw new TypeError("Only one- or two-dimensional vectors are supported.")}}),JT="matrixFromColumns",Z_=["typed","matrix","flatten","size"],X_=Lr(JT,Z_,T=>{var{typed:N,matrix:V,flatten:Y,size:X}=T;return N(JT,{"...Array":function(e){return J(e)},"...Matrix":function(e){return V(J(e.map(i=>i.toArray())))}});function J(F){if(F.length===0)throw new TypeError("At least one column is needed to construct a matrix.");for(var e=R(F[0]),i=[],m=0;m{var{typed:N}=T;return N(QT,{"Unit, Array":function(Y,X){return Y.splitUnit(X)}})}),qT="unaryMinus",K_=["typed"],J_=Lr(qT,K_,T=>{var{typed:N}=T;return N(qT,{number:I8,"Complex | BigNumber | Fraction":V=>V.neg(),Unit:N.referToSelf(V=>Y=>{var X=Y.clone();return X.value=N.find(V,X.valueType())(Y.value),X}),"Array | Matrix":N.referToSelf(V=>Y=>wi(Y,V))})}),e5="unaryPlus",Q_=["typed","config","BigNumber"],q_=Lr(e5,Q_,T=>{var{typed:N,config:V,BigNumber:Y}=T;return N(e5,{number:_8,Complex:function(J){return J},BigNumber:function(J){return J},Fraction:function(J){return J},Unit:function(J){return J.clone()},"Array | Matrix":N.referToSelf(X=>J=>wi(J,X)),"boolean | string":function(J){return V.number==="BigNumber"?new Y(+J):+J}})}),t5="abs",eO=["typed"],tO=Lr(t5,eO,T=>{var{typed:N}=T;return N(t5,{number:N8,"Complex | BigNumber | Fraction | Unit":V=>V.abs(),"Array | Matrix":N.referToSelf(V=>Y=>wi(Y,V))})}),r5="apply",rO=["typed","isInteger"],CC=Lr(r5,rO,T=>{var{typed:N,isInteger:V}=T;return N(r5,{"Array | Matrix, number | BigNumber, function":function(X,J,R){if(!V(J))throw new TypeError("Integer number expected for dimension");var F=Array.isArray(X)?Si(X):X.size();if(J<0||J>=F.length)throw new $f(J,F.length);return Qa(X)?X.create(l1(X.valueOf(),J,R)):l1(X,J,R)}})});function l1(T,N,V){var Y,X,J;if(N<=0)if(Array.isArray(T[0])){for(J=nO(T),X=[],Y=0;Y{var{typed:N}=T;return N(n5,{"number, number":R8,"Complex, Complex":function(Y,X){return Y.add(X)},"BigNumber, BigNumber":function(Y,X){return Y.plus(X)},"Fraction, Fraction":function(Y,X){return Y.add(X)},"Unit, Unit":N.referToSelf(V=>(Y,X)=>{if(Y.value===null||Y.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(X.value===null||X.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!Y.equalBase(X))throw new Error("Units do not match");var J=Y.clone();return J.value=N.find(V,[J.valueType(),X.valueType()])(J.value,X.value),J.fixPrefix=!1,J})})}),a5="cbrt",oO=["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],sO=Lr(a5,oO,T=>{var{config:N,typed:V,isNegative:Y,unaryMinus:X,matrix:J,Complex:R,BigNumber:F,Fraction:e}=T;return V(a5,{number:cg,Complex:i,"Complex, boolean":i,BigNumber:function(y){return y.cbrt()},Unit:m});function i(t,y){var p=t.arg()/3,l=t.abs(),d=new R(cg(l),0).mul(new R(0,p).exp());if(y){var r=[d,new R(cg(l),0).mul(new R(0,p+Math.PI*2/3).exp()),new R(cg(l),0).mul(new R(0,p-Math.PI*2/3).exp())];return N.matrix==="Array"?r:J(r)}else return d}function m(t){if(t.value&&Sh(t.value)){var y=t.clone();return y.value=1,y=y.pow(1/3),y.value=i(t.value),y}else{var p=Y(t.value);p&&(t.value=X(t.value));var l;Ei(t.value)?l=new F(1).div(3):$g(t.value)?l=new e(1,3):l=1/3;var d=t.pow(l);return p&&(d.value=X(d.value)),d}}}),lO="matAlgo11xS0s",uO=["typed","equalScalar"],qs=Lr(lO,uO,T=>{var{typed:N,equalScalar:V}=T;return function(X,J,R,F){var e=X._values,i=X._index,m=X._ptr,t=X._size,y=X._datatype;if(!e)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var p=t[0],l=t[1],d,r=V,n=0,u=R;typeof y=="string"&&(d=y,r=N.find(V,[d,d]),n=N.convert(0,d),J=N.convert(J,d),u=N.find(R,[d,d]));for(var a=[],o=[],c=[],s=0;s{var{typed:N,DenseMatrix:V}=T;return function(X,J,R,F){var e=X._values,i=X._index,m=X._ptr,t=X._size,y=X._datatype;if(!e)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var p=t[0],l=t[1],d,r=R;typeof y=="string"&&(d=y,J=N.convert(J,d),r=N.find(R,[d,d]));for(var n=[],u=[],a=[],o=0;o{var{typed:N}=T;return function(X,J,R,F){var e=X._data,i=X._size,m=X._datatype,t,y=R;typeof m=="string"&&(t=m,J=N.convert(J,t),y=N.find(R,[t,t]));var p=i.length>0?V(y,0,i,i[0],e,J,F):[];return X.createDenseMatrix({data:p,size:ei(i),datatype:t})};function V(Y,X,J,R,F,e,i){var m=[];if(X===J.length-1)for(var t=0;t{var{typed:N,config:V,round:Y}=T;return N(gb,{number:function(J){return Du(J,Y(J),V.epsilon)?Y(J):Math.ceil(J)},"number, number":function(J,R){if(Du(J,Y(J,R),V.epsilon))return Y(J,R);var[F,e]="".concat(J,"e").split("e"),i=Math.ceil(Number("".concat(F,"e").concat(Number(e)+R)));return[F,e]="".concat(i,"e").split("e"),Number("".concat(F,"e").concat(Number(e)-R))}})}),gO=Lr(gb,dO,T=>{var{typed:N,config:V,round:Y,matrix:X,equalScalar:J,zeros:R,DenseMatrix:F}=T,e=qs({typed:N,equalScalar:J}),i=Ss({typed:N,DenseMatrix:F}),m=Jf({typed:N}),t=pO({typed:N,config:V,round:Y});return N("ceil",{number:t.signatures.number,"number,number":t.signatures["number,number"],Complex:function(p){return p.ceil()},"Complex, number":function(p,l){return p.ceil(l)},"Complex, BigNumber":function(p,l){return p.ceil(l.toNumber())},BigNumber:function(p){return Nc(p,Y(p),V.epsilon)?Y(p):p.ceil()},"BigNumber, BigNumber":function(p,l){return Nc(p,Y(p,l),V.epsilon)?Y(p,l):p.toDecimalPlaces(l.toNumber(),zv.ROUND_CEIL)},Fraction:function(p){return p.ceil()},"Fraction, number":function(p,l){return p.ceil(l)},"Fraction, BigNumber":function(p,l){return p.ceil(l.toNumber())},"Array | Matrix":N.referToSelf(y=>p=>wi(p,y)),"Array, number | BigNumber":N.referToSelf(y=>(p,l)=>wi(p,d=>y(d,l))),"SparseMatrix, number | BigNumber":N.referToSelf(y=>(p,l)=>e(p,l,y,!1)),"DenseMatrix, number | BigNumber":N.referToSelf(y=>(p,l)=>m(p,l,y,!1)),"number | Complex | Fraction | BigNumber, Array":N.referToSelf(y=>(p,l)=>m(X(l),p,y,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":N.referToSelf(y=>(p,l)=>J(p,0)?R(l.size(),l.storage()):l.storage()==="dense"?m(l,p,y,!0):i(l,p,y,!0))})}),i5="cube",mO=["typed"],yO=Lr(i5,mO,T=>{var{typed:N}=T;return N(i5,{number:O8,Complex:function(Y){return Y.mul(Y).mul(Y)},BigNumber:function(Y){return Y.times(Y).times(Y)},Fraction:function(Y){return Y.pow(3)},Unit:function(Y){return Y.pow(3)}})}),o5="exp",xO=["typed"],bO=Lr(o5,xO,T=>{var{typed:N}=T;return N(o5,{number:z8,Complex:function(Y){return Y.exp()},BigNumber:function(Y){return Y.exp()}})}),s5="expm1",wO=["typed","Complex"],AO=Lr(s5,wO,T=>{var{typed:N,Complex:V}=T;return N(s5,{number:k8,Complex:function(X){var J=Math.exp(X.re);return new V(J*Math.cos(X.im)-1,J*Math.sin(X.im))},BigNumber:function(X){return X.exp().minus(1)}})}),mb="fix",TO=["typed","Complex","matrix","ceil","floor","equalScalar","zeros","DenseMatrix"],MO=Lr(mb,["typed","ceil","floor"],T=>{var{typed:N,ceil:V,floor:Y}=T;return N(mb,{number:function(J){return J>0?Y(J):V(J)},"number, number":function(J,R){return J>0?Y(J,R):V(J,R)}})}),SO=Lr(mb,TO,T=>{var{typed:N,Complex:V,matrix:Y,ceil:X,floor:J,equalScalar:R,zeros:F,DenseMatrix:e}=T,i=Ss({typed:N,DenseMatrix:e}),m=Jf({typed:N}),t=MO({typed:N,ceil:X,floor:J});return N("fix",{number:t.signatures.number,"number, number | BigNumber":t.signatures["number,number"],Complex:function(p){return new V(p.re>0?Math.floor(p.re):Math.ceil(p.re),p.im>0?Math.floor(p.im):Math.ceil(p.im))},"Complex, number":function(p,l){return new V(p.re>0?J(p.re,l):X(p.re,l),p.im>0?J(p.im,l):X(p.im,l))},"Complex, BigNumber":function(p,l){var d=l.toNumber();return new V(p.re>0?J(p.re,d):X(p.re,d),p.im>0?J(p.im,d):X(p.im,d))},BigNumber:function(p){return p.isNegative()?X(p):J(p)},"BigNumber, number | BigNumber":function(p,l){return p.isNegative()?X(p,l):J(p,l)},Fraction:function(p){return p.s<0?p.ceil():p.floor()},"Fraction, number | BigNumber":function(p,l){return p.s<0?X(p,l):J(p,l)},"Array | Matrix":N.referToSelf(y=>p=>wi(p,y)),"Array | Matrix, number | BigNumber":N.referToSelf(y=>(p,l)=>wi(p,d=>y(d,l))),"number | Complex | Fraction | BigNumber, Array":N.referToSelf(y=>(p,l)=>m(Y(l),p,y,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":N.referToSelf(y=>(p,l)=>R(p,0)?F(l.size(),l.storage()):l.storage()==="dense"?m(l,p,y,!0):i(l,p,y,!0))})}),yb="floor",EO=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],CO=Lr(yb,["typed","config","round"],T=>{var{typed:N,config:V,round:Y}=T;return N(yb,{number:function(J){return Du(J,Y(J),V.epsilon)?Y(J):Math.floor(J)},"number, number":function(J,R){if(Du(J,Y(J,R),V.epsilon))return Y(J,R);var[F,e]="".concat(J,"e").split("e"),i=Math.floor(Number("".concat(F,"e").concat(Number(e)+R)));return[F,e]="".concat(i,"e").split("e"),Number("".concat(F,"e").concat(Number(e)-R))}})}),DO=Lr(yb,EO,T=>{var{typed:N,config:V,round:Y,matrix:X,equalScalar:J,zeros:R,DenseMatrix:F}=T,e=qs({typed:N,equalScalar:J}),i=Ss({typed:N,DenseMatrix:F}),m=Jf({typed:N}),t=CO({typed:N,config:V,round:Y});return N("floor",{number:t.signatures.number,"number,number":t.signatures["number,number"],Complex:function(p){return p.floor()},"Complex, number":function(p,l){return p.floor(l)},"Complex, BigNumber":function(p,l){return p.floor(l.toNumber())},BigNumber:function(p){return Nc(p,Y(p),V.epsilon)?Y(p):p.floor()},"BigNumber, BigNumber":function(p,l){return Nc(p,Y(p,l),V.epsilon)?Y(p,l):p.toDecimalPlaces(l.toNumber(),zv.ROUND_FLOOR)},Fraction:function(p){return p.floor()},"Fraction, number":function(p,l){return p.floor(l)},"Fraction, BigNumber":function(p,l){return p.floor(l.toNumber())},"Array | Matrix":N.referToSelf(y=>p=>wi(p,y)),"Array, number | BigNumber":N.referToSelf(y=>(p,l)=>wi(p,d=>y(d,l))),"SparseMatrix, number | BigNumber":N.referToSelf(y=>(p,l)=>e(p,l,y,!1)),"DenseMatrix, number | BigNumber":N.referToSelf(y=>(p,l)=>m(p,l,y,!1)),"number | Complex | Fraction | BigNumber, Array":N.referToSelf(y=>(p,l)=>m(X(l),p,y,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":N.referToSelf(y=>(p,l)=>J(p,0)?R(l.size(),l.storage()):l.storage()==="dense"?m(l,p,y,!0):i(l,p,y,!0))})}),LO="matAlgo01xDSid",PO=["typed"],Gv=Lr(LO,PO,T=>{var{typed:N}=T;return function(Y,X,J,R){var F=Y._data,e=Y._size,i=Y._datatype,m=X._values,t=X._index,y=X._ptr,p=X._size,l=X._datatype;if(e.length!==p.length)throw new bi(e.length,p.length);if(e[0]!==p[0]||e[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+e+") must match Matrix B ("+p+")");if(!m)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var d=e[0],r=e[1],n=typeof i=="string"&&i===l?i:void 0,u=n?N.find(J,[n,n]):J,a,o,c=[];for(a=0;a{var{typed:N,equalScalar:V}=T;return function(X,J,R){var F=X._values,e=X._index,i=X._ptr,m=X._size,t=X._datatype,y=J._values,p=J._index,l=J._ptr,d=J._size,r=J._datatype;if(m.length!==d.length)throw new bi(m.length,d.length);if(m[0]!==d[0]||m[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+m+") must match Matrix B ("+d+")");var n=m[0],u=m[1],a,o=V,c=0,s=R;typeof t=="string"&&t===r&&(a=t,o=N.find(V,[a,a]),c=N.convert(0,a),s=N.find(R,[a,a]));var b=F&&y?[]:void 0,g=[],A=[],v=F&&y?[]:void 0,h=F&&y?[]:void 0,x=[],C=[],D,L,w,M,S;for(L=0;L{var{typed:N,DenseMatrix:V}=T;return function(X,J,R,F){var e=X._values,i=X._index,m=X._ptr,t=X._size,y=X._datatype;if(!e)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var p=t[0],l=t[1],d,r=R;typeof y=="string"&&(d=y,J=N.convert(J,d),r=N.find(R,[d,d]));for(var n=[],u=[],a=[],o=0;o{var{typed:N}=T;return function(X,J,R){var F=X._data,e=X._size,i=X._datatype,m=J._data,t=J._size,y=J._datatype,p=[];if(e.length!==t.length)throw new bi(e.length,t.length);for(var l=0;l0?V(r,0,p,p[0],F,m):[];return X.createDenseMatrix({data:n,size:p,datatype:d})};function V(Y,X,J,R,F,e){var i=[];if(X===J.length-1)for(var m=0;m{var{concat:N}=T;return function(J,R){var F=Math.max(J._size.length,R._size.length);if(J._size.length===R._size.length&&J._size.every((r,n)=>r===R._size[n]))return[J,R];for(var e=V(J._size,F,0),i=V(R._size,F,0),m=[],t=0;t1)throw new Error("shape missmatch: missmatch is found in arg with shape (".concat(J,") not possible to broadcast dimension ").concat(F," with size ").concat(J[F]," to size ").concat(R[F]))}}),HO="matrixAlgorithmSuite",VO=["typed","matrix","concat"],fo=Lr(HO,VO,T=>{var{typed:N,matrix:V,concat:Y}=T,X=zO({typed:N}),J=Jf({typed:N}),R=UO({concat:Y});return function(e){var i=e.elop,m=e.SD||e.DS,t;i?(t={"DenseMatrix, DenseMatrix":(d,r)=>X(...R(d,r),i),"Array, Array":(d,r)=>X(...R(V(d),V(r)),i).valueOf(),"Array, DenseMatrix":(d,r)=>X(...R(V(d),r),i),"DenseMatrix, Array":(d,r)=>X(...R(d,V(r)),i)},e.SS&&(t["SparseMatrix, SparseMatrix"]=(d,r)=>e.SS(...R(d,r),i,!1)),e.DS&&(t["DenseMatrix, SparseMatrix"]=(d,r)=>e.DS(...R(d,r),i,!1),t["Array, SparseMatrix"]=(d,r)=>e.DS(...R(V(d),r),i,!1)),m&&(t["SparseMatrix, DenseMatrix"]=(d,r)=>m(...R(r,d),i,!0),t["SparseMatrix, Array"]=(d,r)=>m(...R(V(r),d),i,!0))):(t={"DenseMatrix, DenseMatrix":N.referToSelf(d=>(r,n)=>X(...R(r,n),d)),"Array, Array":N.referToSelf(d=>(r,n)=>X(...R(V(r),V(n)),d).valueOf()),"Array, DenseMatrix":N.referToSelf(d=>(r,n)=>X(...R(V(r),n),d)),"DenseMatrix, Array":N.referToSelf(d=>(r,n)=>X(...R(r,V(n)),d))},e.SS&&(t["SparseMatrix, SparseMatrix"]=N.referToSelf(d=>(r,n)=>e.SS(...R(r,n),d,!1))),e.DS&&(t["DenseMatrix, SparseMatrix"]=N.referToSelf(d=>(r,n)=>e.DS(...R(r,n),d,!1)),t["Array, SparseMatrix"]=N.referToSelf(d=>(r,n)=>e.DS(...R(V(r),n),d,!1))),m&&(t["SparseMatrix, DenseMatrix"]=N.referToSelf(d=>(r,n)=>m(...R(n,r),d,!0)),t["SparseMatrix, Array"]=N.referToSelf(d=>(r,n)=>m(...R(V(n),r),d,!0))));var y=e.scalar||"any",p=e.Ds||e.Ss;p&&(i?(t["DenseMatrix,"+y]=(d,r)=>J(d,r,i,!1),t[y+", DenseMatrix"]=(d,r)=>J(r,d,i,!0),t["Array,"+y]=(d,r)=>J(V(d),r,i,!1).valueOf(),t[y+", Array"]=(d,r)=>J(V(r),d,i,!0).valueOf()):(t["DenseMatrix,"+y]=N.referToSelf(d=>(r,n)=>J(r,n,d,!1)),t[y+", DenseMatrix"]=N.referToSelf(d=>(r,n)=>J(n,r,d,!0)),t["Array,"+y]=N.referToSelf(d=>(r,n)=>J(V(r),n,d,!1).valueOf()),t[y+", Array"]=N.referToSelf(d=>(r,n)=>J(V(n),r,d,!0).valueOf())));var l=e.sS!==void 0?e.sS:e.Ss;return i?(e.Ss&&(t["SparseMatrix,"+y]=(d,r)=>e.Ss(d,r,i,!1)),l&&(t[y+", SparseMatrix"]=(d,r)=>l(r,d,i,!0))):(e.Ss&&(t["SparseMatrix,"+y]=N.referToSelf(d=>(r,n)=>e.Ss(r,n,d,!1))),l&&(t[y+", SparseMatrix"]=N.referToSelf(d=>(r,n)=>l(n,r,d,!0)))),i&&i.signatures&&n8(t,i.signatures),t}});function Wd(T,N,V,Y){if(!(this instanceof Wd))throw new SyntaxError("Constructor must be called with the new operator");this.fn=T,this.count=N,this.min=V,this.max=Y,this.message="Wrong number of arguments in function "+T+" ("+N+" provided, "+V+(Y!=null?"-"+Y:"")+" expected)",this.stack=new Error().stack}Wd.prototype=new Error;Wd.prototype.constructor=Error;Wd.prototype.name="ArgumentsError";Wd.prototype.isArgumentsError=!0;var l5="gcd",GO=["typed","matrix","equalScalar","BigNumber","DenseMatrix","concat"],u2="number | BigNumber | Fraction | Matrix | Array",WO="".concat(u2,", ").concat(u2,", ...").concat(u2);function u5(T){return!T.some(N=>Array.isArray(N))}var YO=Lr(l5,GO,T=>{var{typed:N,matrix:V,equalScalar:Y,BigNumber:X,DenseMatrix:J,concat:R}=T,F=Gv({typed:N}),e=D3({typed:N,equalScalar:Y}),i=Gd({typed:N,DenseMatrix:J}),m=fo({typed:N,matrix:V,concat:R});return N(l5,{"number, number":B8,"BigNumber, BigNumber":t,"Fraction, Fraction":(y,p)=>y.gcd(p)},m({SS:e,DS:F,Ss:i}),{[WO]:N.referToSelf(y=>(p,l,d)=>{for(var r=y(p,l),n=0;np=>{if(p.length===1&&Array.isArray(p[0])&&u5(p[0]))return y(...p[0]);if(u5(p))return y(...p);throw new Wd("gcd() supports only 1d matrices!")}),Matrix:N.referToSelf(y=>p=>y(p.toArray()))});function t(y,p){if(!y.isInt()||!p.isInt())throw new Error("Parameters in function gcd must be integer numbers");for(var l=new X(0);!p.isZero();){var d=y.mod(p);y=p,p=d}return y.lt(l)?y.neg():y}}),ZO="matAlgo02xDS0",XO=["typed","equalScalar"],Qf=Lr(ZO,XO,T=>{var{typed:N,equalScalar:V}=T;return function(X,J,R,F){var e=X._data,i=X._size,m=X._datatype,t=J._values,y=J._index,p=J._ptr,l=J._size,d=J._datatype;if(i.length!==l.length)throw new bi(i.length,l.length);if(i[0]!==l[0]||i[1]!==l[1])throw new RangeError("Dimension mismatch. Matrix A ("+i+") must match Matrix B ("+l+")");if(!t)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var r=i[0],n=i[1],u,a=V,o=0,c=R;typeof m=="string"&&m===d&&(u=m,a=N.find(V,[u,u]),o=N.convert(0,u),c=N.find(R,[u,u]));for(var s=[],b=[],g=[],A=0;A{var{typed:N,equalScalar:V}=T;return function(X,J,R){var F=X._values,e=X._size,i=X._datatype,m=J._values,t=J._size,y=J._datatype;if(e.length!==t.length)throw new bi(e.length,t.length);if(e[0]!==t[0]||e[1]!==t[1])throw new RangeError("Dimension mismatch. Matrix A ("+e+") must match Matrix B ("+t+")");var p=e[0],l=e[1],d,r=V,n=0,u=R;typeof i=="string"&&i===y&&(d=i,r=N.find(V,[d,d]),n=N.convert(0,d),u=N.find(R,[d,d]));for(var a=F&&m?[]:void 0,o=[],c=[],s=a?[]:void 0,b=[],g=[],A=0;A{var{typed:N,matrix:V,equalScalar:Y,concat:X}=T,J=Qf({typed:N,equalScalar:Y}),R=W1({typed:N,equalScalar:Y}),F=qs({typed:N,equalScalar:Y}),e=fo({typed:N,matrix:V,concat:X}),i="number | BigNumber | Fraction | Matrix | Array",m={};return m["".concat(i,", ").concat(i,", ...").concat(i)]=N.referToSelf(y=>(p,l,d)=>{for(var r=y(p,l),n=0;ny.lcm(p)},e({SS:R,DS:J,Ss:F}),m);function t(y,p){if(!y.isInt()||!p.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(y.isZero())return y;if(p.isZero())return p;for(var l=y.times(p);!p.isZero();){var d=p;p=y.mod(d),y=d}return l.div(y).abs()}}),c5="log10",QO=["typed","config","Complex"],qO=Lr(c5,QO,T=>{var{typed:N,config:V,Complex:Y}=T;return N(c5,{number:function(J){return J>=0||V.predictable?H8(J):new Y(J,0).log().div(Math.LN10)},Complex:function(J){return new Y(J).log().div(Math.LN10)},BigNumber:function(J){return!J.isNegative()||V.predictable?J.log():new Y(J.toNumber(),0).log().div(Math.LN10)},"Array | Matrix":N.referToSelf(X=>J=>wi(J,X))})}),h5="log2",ez=["typed","config","Complex"],tz=Lr(h5,ez,T=>{var{typed:N,config:V,Complex:Y}=T;return N(h5,{number:function(R){return R>=0||V.predictable?V8(R):X(new Y(R,0))},Complex:X,BigNumber:function(R){return!R.isNegative()||V.predictable?R.log(2):X(new Y(R.toNumber(),0))},"Array | Matrix":N.referToSelf(J=>R=>wi(R,J))});function X(J){var R=Math.sqrt(J.re*J.re+J.im*J.im);return new Y(Math.log2?Math.log2(R):Math.log(R)/Math.LN2,Math.atan2(J.im,J.re)/Math.LN2)}}),rz="matAlgo03xDSf",nz=["typed"],Vl=Lr(rz,nz,T=>{var{typed:N}=T;return function(Y,X,J,R){var F=Y._data,e=Y._size,i=Y._datatype,m=X._values,t=X._index,y=X._ptr,p=X._size,l=X._datatype;if(e.length!==p.length)throw new bi(e.length,p.length);if(e[0]!==p[0]||e[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+e+") must match Matrix B ("+p+")");if(!m)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var d=e[0],r=e[1],n,u=0,a=J;typeof i=="string"&&i===l&&(n=i,u=N.convert(0,n),a=N.find(J,[n,n]));for(var o=[],c=0;c{var{typed:N,equalScalar:V}=T;return function(X,J,R){var F=X._values,e=X._index,i=X._ptr,m=X._size,t=X._datatype,y=J._values,p=J._index,l=J._ptr,d=J._size,r=J._datatype;if(m.length!==d.length)throw new bi(m.length,d.length);if(m[0]!==d[0]||m[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+m+") must match Matrix B ("+d+")");var n=m[0],u=m[1],a,o=V,c=0,s=R;typeof t=="string"&&t===r&&(a=t,o=N.find(V,[a,a]),c=N.convert(0,a),s=N.find(R,[a,a]));var b=F&&y?[]:void 0,g=[],A=[],v=b?[]:void 0,h=b?[]:void 0,x=[],C=[],D,L,w,M;for(L=0;L{var{typed:N,matrix:V,equalScalar:Y,DenseMatrix:X,concat:J}=T,R=Qf({typed:N,equalScalar:Y}),F=Vl({typed:N}),e=Y1({typed:N,equalScalar:Y}),i=qs({typed:N,equalScalar:Y}),m=Ss({typed:N,DenseMatrix:X}),t=fo({typed:N,matrix:V,concat:J});return N(v5,{"number, number":G8,"BigNumber, BigNumber":function(p,l){if(l.isNeg())throw new Error("Cannot calculate mod for a negative divisor");return l.isZero()?p:p.mod(l)},"Fraction, Fraction":function(p,l){if(l.compare(0)<0)throw new Error("Cannot calculate mod for a negative divisor");return p.compare(0)>=0?p.mod(l):p.mod(l).add(l).mod(l)}},t({SS:e,DS:F,SD:R,Ss:i,sS:m}))}),lz="multiplyScalar",uz=["typed"],fz=Lr(lz,uz,T=>{var{typed:N}=T;return N("multiplyScalar",{"number, number":F8,"Complex, Complex":function(Y,X){return Y.mul(X)},"BigNumber, BigNumber":function(Y,X){return Y.times(X)},"Fraction, Fraction":function(Y,X){return Y.mul(X)},"number | Fraction | BigNumber | Complex, Unit":(V,Y)=>Y.multiply(V),"Unit, number | Fraction | BigNumber | Complex | Unit":(V,Y)=>V.multiply(Y)})}),d5="multiply",cz=["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],hz=Lr(d5,cz,T=>{var{typed:N,matrix:V,addScalar:Y,multiplyScalar:X,equalScalar:J,dot:R}=T,F=qs({typed:N,equalScalar:J}),e=Jf({typed:N});function i(c,s){switch(c.length){case 1:switch(s.length){case 1:if(c[0]!==s[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(c[0]!==s[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+c[0]+") must match Matrix rows ("+s[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+s.length+" dimensions)")}break;case 2:switch(s.length){case 1:if(c[1]!==s[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+c[1]+") must match Vector length ("+s[0]+")");break;case 2:if(c[1]!==s[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+c[1]+") must match Matrix B rows ("+s[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+s.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+c.length+" dimensions)")}}function m(c,s,b){if(b===0)throw new Error("Cannot multiply two empty vectors");return R(c,s)}function t(c,s){if(s.storage()!=="dense")throw new Error("Support for SparseMatrix not implemented");return y(c,s)}function y(c,s){var b=c._data,g=c._size,A=c._datatype,v=s._data,h=s._size,x=s._datatype,C=g[0],D=h[1],L,w=Y,M=X;A&&x&&A===x&&typeof A=="string"&&(L=A,w=N.find(Y,[L,L]),M=N.find(X,[L,L]));for(var S=[],f=0;fH)for(var W=0,q=0;q(s,b)=>{i(Si(s),Si(b));var g=c(V(s),V(b));return Qa(g)?g.valueOf():g}),"Matrix, Matrix":function(s,b){var g=s.size(),A=b.size();return i(g,A),g.length===1?A.length===1?m(s,b,g[0]):t(s,b):A.length===1?p(s,b):l(s,b)},"Matrix, Array":N.referTo("Matrix,Matrix",c=>(s,b)=>c(s,V(b))),"Array, Matrix":N.referToSelf(c=>(s,b)=>c(V(s,b.storage()),b)),"SparseMatrix, any":function(s,b){return F(s,b,X,!1)},"DenseMatrix, any":function(s,b){return e(s,b,X,!1)},"any, SparseMatrix":function(s,b){return F(b,s,X,!0)},"any, DenseMatrix":function(s,b){return e(b,s,X,!0)},"Array, any":function(s,b){return e(V(s),b,X,!1).valueOf()},"any, Array":function(s,b){return e(V(b),s,X,!0).valueOf()},"any, any":X,"any, any, ...any":N.referToSelf(c=>(s,b,g)=>{for(var A=c(s,b),v=0;v{var{typed:N,matrix:V,equalScalar:Y,BigNumber:X,concat:J}=T,R=Gv({typed:N}),F=Qf({typed:N,equalScalar:Y}),e=W1({typed:N,equalScalar:Y}),i=qs({typed:N,equalScalar:Y}),m=fo({typed:N,matrix:V,concat:J});function t(){throw new Error("Complex number not supported in function nthRoot. Use nthRoots instead.")}return N(p5,{number:OT,"number, number":OT,BigNumber:p=>y(p,new X(2)),"BigNumber, BigNumber":y,Complex:t,"Complex, number":t,Array:N.referTo("DenseMatrix,number",p=>l=>p(V(l),2).valueOf()),DenseMatrix:N.referTo("DenseMatrix,number",p=>l=>p(l,2)),SparseMatrix:N.referTo("SparseMatrix,number",p=>l=>p(l,2)),"SparseMatrix, SparseMatrix":N.referToSelf(p=>(l,d)=>{if(d.density()===1)return e(l,d,p);throw new Error("Root must be non-zero")}),"DenseMatrix, SparseMatrix":N.referToSelf(p=>(l,d)=>{if(d.density()===1)return R(l,d,p,!1);throw new Error("Root must be non-zero")}),"Array, SparseMatrix":N.referTo("DenseMatrix,SparseMatrix",p=>(l,d)=>p(V(l),d)),"number | BigNumber, SparseMatrix":N.referToSelf(p=>(l,d)=>{if(d.density()===1)return i(d,l,p,!0);throw new Error("Root must be non-zero")})},m({scalar:"number | BigNumber",SD:F,Ss:i,sS:!1}));function y(p,l){var d=X.precision,r=X.clone({precision:d+2}),n=new X(0),u=new r(1),a=l.isNegative();if(a&&(l=l.neg()),l.isZero())throw new Error("Root must be non-zero");if(p.isNegative()&&!l.abs().mod(2).equals(1))throw new Error("Root must be odd when a is negative.");if(p.isZero())return a?new r(1/0):0;if(!p.isFinite())return a?n:p;var o=p.abs().pow(u.div(l));return o=p.isNeg()?o.neg():o,new X((a?u.div(o):o).toPrecision(d))}}),g5="sign",pz=["typed","BigNumber","Fraction","complex"],gz=Lr(g5,pz,T=>{var{typed:N,BigNumber:V,complex:Y,Fraction:X}=T;return N(g5,{number:pb,Complex:function(R){return R.im===0?Y(pb(R.re)):R.sign()},BigNumber:function(R){return new V(R.cmp(0))},Fraction:function(R){return new X(R.s,1)},"Array | Matrix":N.referToSelf(J=>R=>wi(R,J)),Unit:N.referToSelf(J=>R=>{if(!R._isDerived()&&R.units[0].unit.offset!==0)throw new TypeError("sign is ambiguous for units with offset");return N.find(J,R.valueType())(R.value)})})}),mz="sqrt",yz=["config","typed","Complex"],xz=Lr(mz,yz,T=>{var{config:N,typed:V,Complex:Y}=T;return V("sqrt",{number:X,Complex:function(R){return R.sqrt()},BigNumber:function(R){return!R.isNegative()||N.predictable?R.sqrt():X(R.toNumber())},Unit:function(R){return R.pow(.5)}});function X(J){return isNaN(J)?NaN:J>=0||N.predictable?Math.sqrt(J):new Y(J,0).sqrt()}}),m5="square",bz=["typed"],wz=Lr(m5,bz,T=>{var{typed:N}=T;return N(m5,{number:W8,Complex:function(Y){return Y.mul(Y)},BigNumber:function(Y){return Y.times(Y)},Fraction:function(Y){return Y.mul(Y)},Unit:function(Y){return Y.pow(2)}})}),y5="subtract",Az=["typed","matrix","equalScalar","addScalar","unaryMinus","DenseMatrix","concat"],Tz=Lr(y5,Az,T=>{var{typed:N,matrix:V,equalScalar:Y,addScalar:X,unaryMinus:J,DenseMatrix:R,concat:F}=T,e=Gv({typed:N}),i=Vl({typed:N}),m=Y1({typed:N,equalScalar:Y}),t=Gd({typed:N,DenseMatrix:R}),y=Ss({typed:N,DenseMatrix:R}),p=fo({typed:N,matrix:V,concat:F});return N(y5,{"number, number":(l,d)=>l-d,"Complex, Complex":(l,d)=>l.sub(d),"BigNumber, BigNumber":(l,d)=>l.minus(d),"Fraction, Fraction":(l,d)=>l.sub(d),"Unit, Unit":N.referToSelf(l=>(d,r)=>{if(d.value===null)throw new Error("Parameter x contains a unit with undefined value");if(r.value===null)throw new Error("Parameter y contains a unit with undefined value");if(!d.equalBase(r))throw new Error("Units do not match");var n=d.clone();return n.value=N.find(l,[n.valueType(),r.valueType()])(n.value,r.value),n.fixPrefix=!1,n})},p({SS:m,DS:e,SD:i,Ss:y,sS:t}))}),x5="xgcd",Mz=["typed","config","matrix","BigNumber"],Sz=Lr(x5,Mz,T=>{var{typed:N,config:V,matrix:Y,BigNumber:X}=T;return N(x5,{"number, number":function(F,e){var i=Y8(F,e);return V.matrix==="Array"?i:Y(i)},"BigNumber, BigNumber":J});function J(R,F){var e,i,m,t=new X(0),y=new X(1),p=t,l=y,d=y,r=t;if(!R.isInt()||!F.isInt())throw new Error("Parameters in function xgcd must be integer numbers");for(;!F.isZero();)i=R.div(F).floor(),m=R.mod(F),e=p,p=l.minus(i.times(p)),l=e,e=d,d=r.minus(i.times(d)),r=e,R=F,F=m;var n;return R.lt(t)?n=[R.neg(),l.neg(),r.neg()]:n=[R,R.isZero()?0:l,r],V.matrix==="Array"?n:Y(n)}}),b5="invmod",Ez=["typed","config","BigNumber","xgcd","equal","smaller","mod","add","isInteger"],Cz=Lr(b5,Ez,T=>{var{typed:N,config:V,BigNumber:Y,xgcd:X,equal:J,smaller:R,mod:F,add:e,isInteger:i}=T;return N(b5,{"number, number":m,"BigNumber, BigNumber":m});function m(t,y){if(!i(t)||!i(y))throw new Error("Parameters in function invmod must be integer numbers");if(t=F(t,y),J(y,0))throw new Error("Divisor must be non zero");var p=X(t,y);p=p.valueOf();var[l,d]=p;return J(l,Y(1))?(d=F(d,y),R(d,Y(0))&&(d=e(d,y)),d):NaN}}),Dz="matAlgo09xS0Sf",Lz=["typed","equalScalar"],DC=Lr(Dz,Lz,T=>{var{typed:N,equalScalar:V}=T;return function(X,J,R){var F=X._values,e=X._index,i=X._ptr,m=X._size,t=X._datatype,y=J._values,p=J._index,l=J._ptr,d=J._size,r=J._datatype;if(m.length!==d.length)throw new bi(m.length,d.length);if(m[0]!==d[0]||m[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+m+") must match Matrix B ("+d+")");var n=m[0],u=m[1],a,o=V,c=0,s=R;typeof t=="string"&&t===r&&(a=t,o=N.find(V,[a,a]),c=N.convert(0,a),s=N.find(R,[a,a]));var b=F&&y?[]:void 0,g=[],A=[],v=b?[]:void 0,h=[],x,C,D,L,w;for(C=0;C{var{typed:N,matrix:V,equalScalar:Y,multiplyScalar:X,concat:J}=T,R=Qf({typed:N,equalScalar:Y}),F=DC({typed:N,equalScalar:Y}),e=qs({typed:N,equalScalar:Y}),i=fo({typed:N,matrix:V,concat:J});return N(w5,i({elop:X,SS:F,DS:R,Ss:e}))});function Rz(T,N){if(T.isFinite()&&!T.isInteger()||N.isFinite()&&!N.isInteger())throw new Error("Integers expected in function bitAnd");var V=T.constructor;if(T.isNaN()||N.isNaN())return new V(NaN);if(T.isZero()||N.eq(-1)||T.eq(N))return T;if(N.isZero()||T.eq(-1))return N;if(!T.isFinite()||!N.isFinite()){if(!T.isFinite()&&!N.isFinite())return T.isNegative()===N.isNegative()?T:new V(0);if(!T.isFinite())return N.isNegative()?T:T.isNegative()?new V(0):N;if(!N.isFinite())return T.isNegative()?N:N.isNegative()?new V(0):T}return L3(T,N,function(Y,X){return Y&X})}function Vg(T){if(T.isFinite()&&!T.isInteger())throw new Error("Integer expected in function bitNot");var N=T.constructor,V=N.precision;N.config({precision:1e9});var Y=T.plus(new N(1));return Y.s=-Y.s||null,N.config({precision:V}),Y}function Fz(T,N){if(T.isFinite()&&!T.isInteger()||N.isFinite()&&!N.isInteger())throw new Error("Integers expected in function bitOr");var V=T.constructor;if(T.isNaN()||N.isNaN())return new V(NaN);var Y=new V(-1);return T.isZero()||N.eq(Y)||T.eq(N)?N:N.isZero()||T.eq(Y)?T:!T.isFinite()||!N.isFinite()?!T.isFinite()&&!T.isNegative()&&N.isNegative()||T.isNegative()&&!N.isNegative()&&!N.isFinite()?Y:T.isNegative()&&N.isNegative()?T.isFinite()?T:N:T.isFinite()?N:T:L3(T,N,function(X,J){return X|J})}function L3(T,N,V){var Y=T.constructor,X,J,R=+(T.s<0),F=+(N.s<0);if(R){X=Jm(Vg(T));for(var e=0;e0;)V(m[--p],t[--l])===d&&(r=r.plus(n)),n=n.times(u);for(;l>0;)V(y,t[--l])===d&&(r=r.plus(n)),n=n.times(u);return Y.config({precision:a}),d===0&&(r.s=-r.s),r}function Jm(T){for(var N=T.d,V=N[0]+"",Y=1;Y0)if(++F>i)for(F-=i;F--;)e+="0";else F1&&((m[p+1]===null||m[p+1]===void 0)&&(m[p+1]=0),m[p+1]+=m[p]>>1,m[p]&=1)}return m.reverse()}function Iz(T,N){if(T.isFinite()&&!T.isInteger()||N.isFinite()&&!N.isInteger())throw new Error("Integers expected in function bitXor");var V=T.constructor;if(T.isNaN()||N.isNaN())return new V(NaN);if(T.isZero())return N;if(N.isZero())return T;if(T.eq(N))return new V(0);var Y=new V(-1);return T.eq(Y)?Vg(N):N.eq(Y)?Vg(T):!T.isFinite()||!N.isFinite()?!T.isFinite()&&!N.isFinite()?Y:new V(T.isNegative()===N.isNegative()?1/0:-1/0):L3(T,N,function(X,J){return X^J})}function _z(T,N){if(T.isFinite()&&!T.isInteger()||N.isFinite()&&!N.isInteger())throw new Error("Integers expected in function leftShift");var V=T.constructor;return T.isNaN()||N.isNaN()||N.isNegative()&&!N.isZero()?new V(NaN):T.isZero()||N.isZero()?T:!T.isFinite()&&!N.isFinite()?new V(NaN):N.lt(55)?T.times(Math.pow(2,N.toNumber())+""):T.times(new V(2).pow(N))}function Oz(T,N){if(T.isFinite()&&!T.isInteger()||N.isFinite()&&!N.isInteger())throw new Error("Integers expected in function rightArithShift");var V=T.constructor;return T.isNaN()||N.isNaN()||N.isNegative()&&!N.isZero()?new V(NaN):T.isZero()||N.isZero()?T:N.isFinite()?N.lt(55)?T.div(Math.pow(2,N.toNumber())+"").floor():T.div(new V(2).pow(N)).floor():T.isNegative()?new V(-1):T.isFinite()?new V(0):new V(NaN)}var A5="bitAnd",zz=["typed","matrix","equalScalar","concat"],kz=Lr(A5,zz,T=>{var{typed:N,matrix:V,equalScalar:Y,concat:X}=T,J=Qf({typed:N,equalScalar:Y}),R=W1({typed:N,equalScalar:Y}),F=qs({typed:N,equalScalar:Y}),e=fo({typed:N,matrix:V,concat:X});return N(A5,{"number, number":X8,"BigNumber, BigNumber":Rz},e({SS:R,DS:J,Ss:F}))}),T5="bitNot",Bz=["typed"],Uz=Lr(T5,Bz,T=>{var{typed:N}=T;return N(T5,{number:j8,BigNumber:Vg,"Array | Matrix":N.referToSelf(V=>Y=>wi(Y,V))})}),M5="bitOr",Hz=["typed","matrix","equalScalar","DenseMatrix","concat"],Vz=Lr(M5,Hz,T=>{var{typed:N,matrix:V,equalScalar:Y,DenseMatrix:X,concat:J}=T,R=Gv({typed:N}),F=D3({typed:N,equalScalar:Y}),e=Gd({typed:N,DenseMatrix:X}),i=fo({typed:N,matrix:V,concat:J});return N(M5,{"number, number":$8,"BigNumber, BigNumber":Fz},i({SS:F,DS:R,Ss:e}))}),Gz="matAlgo07xSSf",Wz=["typed","DenseMatrix"],Fc=Lr(Gz,Wz,T=>{var{typed:N,DenseMatrix:V}=T;return function(J,R,F){var e=J._size,i=J._datatype,m=R._size,t=R._datatype;if(e.length!==m.length)throw new bi(e.length,m.length);if(e[0]!==m[0]||e[1]!==m[1])throw new RangeError("Dimension mismatch. Matrix A ("+e+") must match Matrix B ("+m+")");var y=e[0],p=e[1],l,d=0,r=F;typeof i=="string"&&i===t&&(l=i,d=N.convert(0,l),r=N.find(F,[l,l]));var n,u,a=[];for(n=0;n{var{typed:N,matrix:V,DenseMatrix:Y,concat:X}=T,J=Vl({typed:N}),R=Fc({typed:N,DenseMatrix:Y}),F=Ss({typed:N,DenseMatrix:Y}),e=fo({typed:N,matrix:V,concat:X});return N(S5,{"number, number":K8,"BigNumber, BigNumber":Iz},e({SS:R,DS:J,Ss:F}))}),E5="arg",Xz=["typed"],jz=Lr(E5,Xz,T=>{var{typed:N}=T;return N(E5,{number:function(Y){return Math.atan2(0,Y)},BigNumber:function(Y){return Y.constructor.atan2(0,Y)},Complex:function(Y){return Y.arg()},"Array | Matrix":N.referToSelf(V=>Y=>wi(Y,V))})}),C5="conj",$z=["typed"],Kz=Lr(C5,$z,T=>{var{typed:N}=T;return N(C5,{"number | BigNumber | Fraction":V=>V,Complex:V=>V.conjugate(),"Array | Matrix":N.referToSelf(V=>Y=>wi(Y,V))})}),D5="im",Jz=["typed"],Qz=Lr(D5,Jz,T=>{var{typed:N}=T;return N(D5,{number:()=>0,"BigNumber | Fraction":V=>V.mul(0),Complex:V=>V.im,"Array | Matrix":N.referToSelf(V=>Y=>wi(Y,V))})}),L5="re",qz=["typed"],ek=Lr(L5,qz,T=>{var{typed:N}=T;return N(L5,{"number | BigNumber | Fraction":V=>V,Complex:V=>V.re,"Array | Matrix":N.referToSelf(V=>Y=>wi(Y,V))})}),P5="not",tk=["typed"],rk=Lr(P5,tk,T=>{var{typed:N}=T;return N(P5,{"null | undefined":()=>!0,number:tC,Complex:function(Y){return Y.re===0&&Y.im===0},BigNumber:function(Y){return Y.isZero()||Y.isNaN()},Unit:N.referToSelf(V=>Y=>N.find(V,Y.valueType())(Y.value)),"Array | Matrix":N.referToSelf(V=>Y=>wi(Y,V))})}),N5="or",nk=["typed","matrix","equalScalar","DenseMatrix","concat"],ak=Lr(N5,nk,T=>{var{typed:N,matrix:V,equalScalar:Y,DenseMatrix:X,concat:J}=T,R=Vl({typed:N}),F=Y1({typed:N,equalScalar:Y}),e=Ss({typed:N,DenseMatrix:X}),i=fo({typed:N,matrix:V,concat:J});return N(N5,{"number, number":rC,"Complex, Complex":function(t,y){return t.re!==0||t.im!==0||y.re!==0||y.im!==0},"BigNumber, BigNumber":function(t,y){return!t.isZero()&&!t.isNaN()||!y.isZero()&&!y.isNaN()},"Unit, Unit":N.referToSelf(m=>(t,y)=>m(t.value||0,y.value||0))},i({SS:F,DS:R,Ss:e}))}),R5="xor",ik=["typed","matrix","DenseMatrix","concat"],ok=Lr(R5,ik,T=>{var{typed:N,matrix:V,DenseMatrix:Y,concat:X}=T,J=Vl({typed:N}),R=Fc({typed:N,DenseMatrix:Y}),F=Ss({typed:N,DenseMatrix:Y}),e=fo({typed:N,matrix:V,concat:X});return N(R5,{"number, number":nC,"Complex, Complex":function(m,t){return(m.re!==0||m.im!==0)!=(t.re!==0||t.im!==0)},"BigNumber, BigNumber":function(m,t){return(!m.isZero()&&!m.isNaN())!=(!t.isZero()&&!t.isNaN())},"Unit, Unit":N.referToSelf(i=>(m,t)=>i(m.value||0,t.value||0))},e({SS:R,DS:J,Ss:F}))}),F5="concat",sk=["typed","matrix","isInteger"],LC=Lr(F5,sk,T=>{var{typed:N,matrix:V,isInteger:Y}=T;return N(F5,{"...Array | Matrix | number | BigNumber":function(J){var R,F=J.length,e=-1,i,m=!1,t=[];for(R=0;R0&&e>i)throw new $f(e,i+1)}else{var p=ei(y).valueOf(),l=Si(p);if(t[R]=p,i=e,e=l.length-1,R>0&&e!==i)throw new bi(i+1,e+1)}}if(t.length===0)throw new SyntaxError("At least one matrix expected");for(var d=t.shift();t.length;)d=PC(d,t.shift(),e,0);return m?V(d):d},"...string":function(J){return J.join("")}})});function PC(T,N,V,Y){if(Y{var{typed:N,Index:V,matrix:Y,range:X}=T;return N(I5,{"Matrix, number":J,"Array, number":function(F,e){return J(Y(ei(F)),e).valueOf()}});function J(R,F){if(R.size().length!==2)throw new Error("Only two dimensional matrix is supported");io(F,R.size()[1]);var e=X(0,R.size()[0]),i=new V(e,F),m=R.subset(i);return Qa(m)?m:Y([[m]])}}),_5="count",uk=["typed","size","prod"],fk=Lr(_5,uk,T=>{var{typed:N,size:V,prod:Y}=T;return N(_5,{string:function(J){return J.length},"Matrix | Array":function(J){return Y(V(J))}})}),O5="cross",ck=["typed","matrix","subtract","multiply"],hk=Lr(O5,ck,T=>{var{typed:N,matrix:V,subtract:Y,multiply:X}=T;return N(O5,{"Matrix, Matrix":function(F,e){return V(J(F.toArray(),e.toArray()))},"Matrix, Array":function(F,e){return V(J(F.toArray(),e))},"Array, Matrix":function(F,e){return V(J(F,e.toArray()))},"Array, Array":J});function J(R,F){var e=Math.max(Si(R).length,Si(F).length);R=Qy(R),F=Qy(F);var i=Si(R),m=Si(F);if(i.length!==1||m.length!==1||i[0]!==3||m[0]!==3)throw new RangeError("Vectors with length 3 expected (Size A = ["+i.join(", ")+"], B = ["+m.join(", ")+"])");var t=[Y(X(R[1],F[2]),X(R[2],F[1])),Y(X(R[2],F[0]),X(R[0],F[2])),Y(X(R[0],F[1]),X(R[1],F[0]))];return e>1?[t]:t}}),z5="diag",vk=["typed","matrix","DenseMatrix","SparseMatrix"],dk=Lr(z5,vk,T=>{var{typed:N,matrix:V,DenseMatrix:Y,SparseMatrix:X}=T;return N(z5,{Array:function(i){return J(i,0,Si(i),null)},"Array, number":function(i,m){return J(i,m,Si(i),null)},"Array, BigNumber":function(i,m){return J(i,m.toNumber(),Si(i),null)},"Array, string":function(i,m){return J(i,0,Si(i),m)},"Array, number, string":function(i,m,t){return J(i,m,Si(i),t)},"Array, BigNumber, string":function(i,m,t){return J(i,m.toNumber(),Si(i),t)},Matrix:function(i){return J(i,0,i.size(),i.storage())},"Matrix, number":function(i,m){return J(i,m,i.size(),i.storage())},"Matrix, BigNumber":function(i,m){return J(i,m.toNumber(),i.size(),i.storage())},"Matrix, string":function(i,m){return J(i,0,i.size(),m)},"Matrix, number, string":function(i,m,t){return J(i,m,i.size(),t)},"Matrix, BigNumber, string":function(i,m,t){return J(i,m.toNumber(),i.size(),t)}});function J(e,i,m,t){if(!Ya(i))throw new TypeError("Second parameter in function diag must be an integer");var y=i>0?i:0,p=i<0?-i:0;switch(m.length){case 1:return R(e,i,t,m[0],p,y);case 2:return F(e,i,t,m,p,y)}throw new RangeError("Matrix for function diag must be 2 dimensional")}function R(e,i,m,t,y,p){var l=[t+y,t+p];if(m&&m!=="sparse"&&m!=="dense")throw new TypeError("Unknown matrix type ".concat(m,'"'));var d=m==="sparse"?X.diagonal(l,e,i):Y.diagonal(l,e,i);return m!==null?d:d.valueOf()}function F(e,i,m,t,y,p){if(Qa(e)){var l=e.diagonal(i);return m!==null?m!==l.storage()?V(l,m):l:l.valueOf()}for(var d=Math.min(t[0]-y,t[1]-p),r=[],n=0;n{var{typed:N}=T;return N("filter",{"Array, function":k5,"Matrix, function":function(Y,X){return Y.create(k5(Y.toArray(),X))},"Array, RegExp":qy,"Matrix, RegExp":function(Y,X){return Y.create(qy(Y.toArray(),X))}})});function k5(T,N){var V=Vv(N);return d8(T,function(Y,X,J){return V===1?N(Y):V===2?N(Y,[X]):N(Y,[X],J)})}var B5="flatten",yk=["typed","matrix"],xk=Lr(B5,yk,T=>{var{typed:N,matrix:V}=T;return N(B5,{Array:function(X){return Ui(X)},Matrix:function(X){var J=Ui(X.toArray());return V(J)}})}),U5="forEach",bk=["typed"],wk=Lr(U5,bk,T=>{var{typed:N}=T;return N(U5,{"Array, function":Ak,"Matrix, function":function(Y,X){Y.forEach(X)}})});function Ak(T,N){var V=Vv(N),Y=function X(J,R){Array.isArray(J)?k1(J,function(F,e){X(F,R.concat(e))}):V===1?N(J):V===2?N(J,R):N(J,R,T)};Y(T,[])}var H5="getMatrixDataType",Tk=["typed"],Mk=Lr(H5,Tk,T=>{var{typed:N}=T;return N(H5,{Array:function(Y){return Ug(Y,wo)},Matrix:function(Y){return Y.getDataType()}})}),V5="identity",Sk=["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],Ek=Lr(V5,Sk,T=>{var{typed:N,config:V,matrix:Y,BigNumber:X,DenseMatrix:J,SparseMatrix:R}=T;return N(V5,{"":function(){return V.matrix==="Matrix"?Y([]):[]},string:function(m){return Y(m)},"number | BigNumber":function(m){return e(m,m,V.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, string":function(m,t){return e(m,m,t)},"number | BigNumber, number | BigNumber":function(m,t){return e(m,t,V.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, number | BigNumber, string":function(m,t,y){return e(m,t,y)},Array:function(m){return F(m)},"Array, string":function(m,t){return F(m,t)},Matrix:function(m){return F(m.valueOf(),m.storage())},"Matrix, string":function(m,t){return F(m.valueOf(),t)}});function F(i,m){switch(i.length){case 0:return m?Y(m):[];case 1:return e(i[0],i[0],m);case 2:return e(i[0],i[1],m);default:throw new Error("Vector containing two values expected")}}function e(i,m,t){var y=Ei(i)||Ei(m)?X:null;if(Ei(i)&&(i=i.toNumber()),Ei(m)&&(m=m.toNumber()),!Ya(i)||i<1)throw new Error("Parameters in function identity must be positive integers");if(!Ya(m)||m<1)throw new Error("Parameters in function identity must be positive integers");var p=y?new X(1):1,l=y?new y(0):0,d=[i,m];if(t){if(t==="sparse")return R.diagonal(d,p,0,l);if(t==="dense")return J.diagonal(d,p,0,l);throw new TypeError('Unknown matrix type "'.concat(t,'"'))}for(var r=i0([],d,l),n=i{var{typed:N,matrix:V,multiplyScalar:Y}=T;return N(G5,{"Matrix, Matrix":function(R,F){return V(X(R.toArray(),F.toArray()))},"Matrix, Array":function(R,F){return V(X(R.toArray(),F))},"Array, Matrix":function(R,F){return V(X(R,F.toArray()))},"Array, Array":X});function X(J,R){if(Si(J).length===1&&(J=[J]),Si(R).length===1&&(R=[R]),Si(J).length>2||Si(R).length>2)throw new RangeError("Vectors with dimensions greater then 2 are not supported expected (Size x = "+JSON.stringify(J.length)+", y = "+JSON.stringify(R.length)+")");var F=[],e=[];return J.map(function(i){return R.map(function(m){return e=[],F.push(e),i.map(function(t){return m.map(function(y){return e.push(Y(t,y))})})})})&&F}}),W5="map",Lk=["typed"],Pk=Lr(W5,Lk,T=>{var{typed:N}=T;return N(W5,{"Array, function":Nk,"Matrix, function":function(Y,X){return Y.map(X)}})});function Nk(T,N){var V=Vv(N),Y=function X(J,R){if(Array.isArray(J))return J.map(function(i,m){return X(i,R.concat(m))});try{return V===1?N(J):V===2?N(J,R):N(J,R,T)}catch(i){if(i instanceof TypeError&&"data"in i&&i.data.category==="wrongType"){var F="map attempted to call '".concat(i.data.fn,"(").concat(J),e=JSON.stringify(R);throw V===2?F+=","+e:V!==1&&(F+=",".concat(e,",").concat(T)),F+=")' but argument ".concat(i.data.index+1," of type "),F+="".concat(i.data.actual," does not match expected type "),F+=i.data.expected.join(" or "),new TypeError(F)}throw i}};return Y(T,[])}var Y5="diff",Rk=["typed","matrix","subtract","number"],RC=Lr(Y5,Rk,T=>{var{typed:N,matrix:V,subtract:Y,number:X}=T;return N(Y5,{"Array | Matrix":function(m){return Qa(m)?V(R(m.toArray())):R(m)},"Array | Matrix, number":function(m,t){if(!Ya(t))throw new RangeError("Dimension must be a whole number");return Qa(m)?V(J(m.toArray(),t)):J(m,t)},"Array, BigNumber":N.referTo("Array,number",i=>(m,t)=>i(m,X(t))),"Matrix, BigNumber":N.referTo("Matrix,number",i=>(m,t)=>i(m,X(t)))});function J(i,m){if(Qa(i)&&(i=i.toArray()),!Array.isArray(i))throw RangeError("Array/Matrix does not have that many dimensions");if(m>0){var t=[];return i.forEach(y=>{t.push(J(y,m-1))}),t}else{if(m===0)return R(i);throw RangeError("Cannot have negative dimension")}}function R(i){for(var m=[],t=i.length,y=1;y{var{typed:N,config:V,matrix:Y,BigNumber:X}=T;return N("ones",{"":function(){return V.matrix==="Array"?J([]):J([],"default")},"...number | BigNumber | string":function(i){var m=i[i.length-1];if(typeof m=="string"){var t=i.pop();return J(i,t)}else return V.matrix==="Array"?J(i):J(i,"default")},Array:J,Matrix:function(i){var m=i.storage();return J(i.valueOf(),m)},"Array | Matrix, string":function(i,m){return J(i.valueOf(),m)}});function J(e,i){var m=R(e),t=m?new X(1):1;if(F(e),i){var y=Y(i);return e.length>0?y.resize(e,t):y}else{var p=[];return e.length>0?i0(p,e,t):p}}function R(e){var i=!1;return e.forEach(function(m,t,y){Ei(m)&&(i=!0,y[t]=m.toNumber())}),i}function F(e){e.forEach(function(i){if(typeof i!="number"||!Ya(i)||i<0)throw new Error("Parameters in function ones must be positive integers")})}});function P3(){throw new Error('No "bignumber" implementation available')}function FC(){throw new Error('No "fraction" implementation available')}function IC(){throw new Error('No "matrix" implementation available')}var Z5="range",Ok=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq"],_C=Lr(Z5,Ok,T=>{var{typed:N,config:V,matrix:Y,bignumber:X,smaller:J,smallerEq:R,larger:F,largerEq:e}=T;return N(Z5,{string:m,"string, boolean":m,"number, number":function(n,u){return i(t(n,u,1))},"number, number, number":function(n,u,a){return i(t(n,u,a))},"number, number, boolean":function(n,u,a){return i(a?y(n,u,1):t(n,u,1))},"number, number, number, boolean":function(n,u,a,o){return i(o?y(n,u,a):t(n,u,a))},"BigNumber, BigNumber":function(n,u){var a=n.constructor;return i(p(n,u,new a(1)))},"BigNumber, BigNumber, BigNumber":function(n,u,a){return i(p(n,u,a))},"BigNumber, BigNumber, boolean":function(n,u,a){var o=n.constructor;return i(a?l(n,u,new o(1)):p(n,u,new o(1)))},"BigNumber, BigNumber, BigNumber, boolean":function(n,u,a,o){return i(o?l(n,u,a):p(n,u,a))}});function i(r){return V.matrix==="Matrix"?Y?Y(r):IC():r}function m(r,n){var u=d(r);if(!u)throw new SyntaxError('String "'+r+'" is no valid range');var a;return V.number==="BigNumber"?(X===void 0&&P3(),a=n?l:p,i(a(X(u.start),X(u.end),X(u.step)))):(a=n?y:t,i(a(u.start,u.end,u.step)))}function t(r,n,u){var a=[],o=r;if(u>0)for(;J(o,n);)a.push(o),o+=u;else if(u<0)for(;F(o,n);)a.push(o),o+=u;return a}function y(r,n,u){var a=[],o=r;if(u>0)for(;R(o,n);)a.push(o),o+=u;else if(u<0)for(;e(o,n);)a.push(o),o+=u;return a}function p(r,n,u){var a=X(0),o=[],c=r;if(u.gt(a))for(;J(c,n);)o.push(c),c=c.plus(u);else if(u.lt(a))for(;F(c,n);)o.push(c),c=c.plus(u);return o}function l(r,n,u){var a=X(0),o=[],c=r;if(u.gt(a))for(;R(c,n);)o.push(c),c=c.plus(u);else if(u.lt(a))for(;e(c,n);)o.push(c),c=c.plus(u);return o}function d(r){var n=r.split(":"),u=n.map(function(o){return Number(o)}),a=u.some(function(o){return isNaN(o)});if(a)return null;switch(u.length){case 2:return{start:u[0],end:u[1],step:1};case 3:return{start:u[0],end:u[2],step:u[1]};default:return null}}}),X5="reshape",zk=["typed","isInteger","matrix"],kk=Lr(X5,zk,T=>{var{typed:N,isInteger:V}=T;return N(X5,{"Matrix, Array":function(X,J){return X.reshape(J,!0)},"Array, Array":function(X,J){return J.forEach(function(R){if(!V(R))throw new TypeError("Invalid size for dimension: "+R)}),u8(X,J)}})}),Bk="resize",Uk=["config","matrix"],Hk=Lr(Bk,Uk,T=>{var{config:N,matrix:V}=T;return function(J,R,F){if(arguments.length!==2&&arguments.length!==3)throw new Wd("resize",arguments.length,2,3);if(Qa(R)&&(R=R.valueOf()),Ei(R[0])&&(R=R.map(function(m){return Ei(m)?m.toNumber():m})),Qa(J))return J.resize(R,F,!0);if(typeof J=="string")return Y(J,R,F);var e=Array.isArray(J)?!1:N.matrix!=="Array";if(R.length===0){for(;Array.isArray(J);)J=J[0];return ei(J)}else{Array.isArray(J)||(J=[J]),J=ei(J);var i=i0(J,R,F);return e?V(i):i}};function Y(X,J,R){if(R!==void 0){if(typeof R!="string"||R.length!==1)throw new TypeError("Single character expected as defaultValue")}else R=" ";if(J.length!==1)throw new bi(J.length,1);var F=J[0];if(typeof F!="number"||!Ya(F))throw new TypeError("Invalid size, must contain positive integers (size: "+vi(J)+")");if(X.length>F)return X.substring(0,F);if(X.length{var{typed:N,multiply:V,rotationMatrix:Y}=T;return N(j5,{"Array , number | BigNumber | Complex | Unit":function(R,F){X(R,2);var e=V(Y(F),R);return e.toArray()},"Matrix , number | BigNumber | Complex | Unit":function(R,F){return X(R,2),V(Y(F),R)},"Array, number | BigNumber | Complex | Unit, Array | Matrix":function(R,F,e){X(R,3);var i=V(Y(F,e),R);return i},"Matrix, number | BigNumber | Complex | Unit, Array | Matrix":function(R,F,e){return X(R,3),V(Y(F,e),R)}});function X(J,R){var F=Array.isArray(J)?Si(J):J.size();if(F.length>2)throw new RangeError("Vector must be of dimensions 1x".concat(R));if(F.length===2&&F[1]!==1)throw new RangeError("Vector must be of dimensions 1x".concat(R));if(F[0]!==R)throw new RangeError("Vector must be of dimensions 1x".concat(R))}}),$5="rotationMatrix",Wk=["typed","config","multiplyScalar","addScalar","unaryMinus","norm","matrix","BigNumber","DenseMatrix","SparseMatrix","cos","sin"],Yk=Lr($5,Wk,T=>{var{typed:N,config:V,multiplyScalar:Y,addScalar:X,unaryMinus:J,norm:R,BigNumber:F,matrix:e,DenseMatrix:i,SparseMatrix:m,cos:t,sin:y}=T;return N($5,{"":function(){return V.matrix==="Matrix"?e([]):[]},string:function(a){return e(a)},"number | BigNumber | Complex | Unit":function(a){return p(a,V.matrix==="Matrix"?"dense":void 0)},"number | BigNumber | Complex | Unit, string":function(a,o){return p(a,o)},"number | BigNumber | Complex | Unit, Array":function(a,o){var c=e(o);return l(c),n(a,c,void 0)},"number | BigNumber | Complex | Unit, Matrix":function(a,o){l(o);var c=o.storage()||(V.matrix==="Matrix"?"dense":void 0);return n(a,o,c)},"number | BigNumber | Complex | Unit, Array, string":function(a,o,c){var s=e(o);return l(s),n(a,s,c)},"number | BigNumber | Complex | Unit, Matrix, string":function(a,o,c){return l(o),n(a,o,c)}});function p(u,a){var o=Ei(u),c=o?new F(-1):-1,s=t(u),b=y(u),g=[[s,Y(c,b)],[b,s]];return r(g,a)}function l(u){var a=u.size();if(a.length<1||a[0]!==3)throw new RangeError("Vector must be of dimensions 1x3")}function d(u){return u.reduce((a,o)=>Y(a,o))}function r(u,a){if(a){if(a==="sparse")return new m(u);if(a==="dense")return new i(u);throw new TypeError('Unknown matrix type "'.concat(a,'"'))}return u}function n(u,a,o){var c=R(a);if(c===0)throw new RangeError("Rotation around zero vector");var s=Ei(u)?F:null,b=s?new s(1):1,g=s?new s(-1):-1,A=s?new s(a.get([0])/c):a.get([0])/c,v=s?new s(a.get([1])/c):a.get([1])/c,h=s?new s(a.get([2])/c):a.get([2])/c,x=t(u),C=X(b,J(x)),D=y(u),L=X(x,d([A,A,C])),w=X(d([A,v,C]),d([g,h,D])),M=X(d([A,h,C]),d([v,D])),S=X(d([A,v,C]),d([h,D])),f=X(x,d([v,v,C])),P=X(d([v,h,C]),d([g,A,D])),E=X(d([A,h,C]),d([g,v,D])),k=X(d([v,h,C]),d([A,D])),O=X(x,d([h,h,C])),G=[[L,w,M],[S,f,P],[E,k,O]];return r(G,o)}}),K5="row",Zk=["typed","Index","matrix","range"],OC=Lr(K5,Zk,T=>{var{typed:N,Index:V,matrix:Y,range:X}=T;return N(K5,{"Matrix, number":J,"Array, number":function(F,e){return J(Y(ei(F)),e).valueOf()}});function J(R,F){if(R.size().length!==2)throw new Error("Only two dimensional matrix is supported");io(F,R.size()[0]);var e=X(0,R.size()[1]),i=new V(F,e),m=R.subset(i);return Qa(m)?m:Y([[m]])}}),J5="size",Xk=["typed","config","?matrix"],jk=Lr(J5,Xk,T=>{var{typed:N,config:V,matrix:Y}=T;return N(J5,{Matrix:function(J){return J.create(J.size())},Array:Si,string:function(J){return V.matrix==="Array"?[J.length]:Y([J.length])},"number | Complex | BigNumber | Unit | boolean | null":function(J){return V.matrix==="Array"?[]:Y?Y([]):IC()}})}),Q5="squeeze",$k=["typed","matrix"],Kk=Lr(Q5,$k,T=>{var{typed:N,matrix:V}=T;return N(Q5,{Array:function(X){return Qy(ei(X))},Matrix:function(X){var J=Qy(X.toArray());return Array.isArray(J)?V(J):J},any:function(X){return ei(X)}})}),q5="subset",Jk=["typed","matrix"],zC=Lr(q5,Jk,T=>{var{typed:N,matrix:V}=T;return N(q5,{"Array, Index":function(X,J){var R=V(X),F=R.subset(J);return J.isScalar()?F:F.valueOf()},"Matrix, Index":function(X,J){return X.subset(J)},"Object, Index":qk,"string, Index":Qk,"Array, Index, any":function(X,J,R){return V(ei(X)).subset(J,R,void 0).valueOf()},"Array, Index, any, any":function(X,J,R,F){return V(ei(X)).subset(J,R,F).valueOf()},"Matrix, Index, any":function(X,J,R){return X.clone().subset(J,R)},"Matrix, Index, any, any":function(X,J,R,F){return X.clone().subset(J,R,F)},"string, Index, string":e4,"string, Index, string, string":e4,"Object, Index, any":eB})});function Qk(T,N){if(!I1(N))throw new TypeError("Index expected");if(N.size().length!==1)throw new bi(N.size().length,1);var V=T.length;io(N.min()[0],V),io(N.max()[0],V);var Y=N.dimension(0),X="";return Y.forEach(function(J){X+=T.charAt(J)}),X}function e4(T,N,V,Y){if(!N||N.isIndex!==!0)throw new TypeError("Index expected");if(N.size().length!==1)throw new bi(N.size().length,1);if(Y!==void 0){if(typeof Y!="string"||Y.length!==1)throw new TypeError("Single character expected as defaultValue")}else Y=" ";var X=N.dimension(0),J=X.size()[0];if(J!==V.length)throw new bi(X.size()[0],V.length);var R=T.length;io(N.min()[0]),io(N.max()[0]);for(var F=[],e=0;eR)for(var i=R-1,m=F.length;i{var{typed:N,matrix:V}=T;return N(t4,{Array:R=>Y(V(R)).valueOf(),Matrix:Y,any:ei});function Y(R){var F=R.size(),e;switch(F.length){case 1:e=R.clone();break;case 2:{var i=F[0],m=F[1];if(m===0)throw new RangeError("Cannot transpose a 2D matrix with no columns (size: "+vi(F)+")");switch(R.storage()){case"dense":e=X(R,i,m);break;case"sparse":e=J(R,i,m);break}}break;default:throw new RangeError("Matrix must be a vector or two dimensional (size: "+vi(F)+")")}return e}function X(R,F,e){for(var i=R._data,m=[],t,y=0;y{var{typed:N,transpose:V,conj:Y}=T;return N(r4,{any:function(J){return Y(V(J))}})}),n4="zeros",iB=["typed","config","matrix","BigNumber"],oB=Lr(n4,iB,T=>{var{typed:N,config:V,matrix:Y,BigNumber:X}=T;return N(n4,{"":function(){return V.matrix==="Array"?J([]):J([],"default")},"...number | BigNumber | string":function(i){var m=i[i.length-1];if(typeof m=="string"){var t=i.pop();return J(i,t)}else return V.matrix==="Array"?J(i):J(i,"default")},Array:J,Matrix:function(i){var m=i.storage();return J(i.valueOf(),m)},"Array | Matrix, string":function(i,m){return J(i.valueOf(),m)}});function J(e,i){var m=R(e),t=m?new X(0):0;if(F(e),i){var y=Y(i);return e.length>0?y.resize(e,t):y}else{var p=[];return e.length>0?i0(p,e,t):p}}function R(e){var i=!1;return e.forEach(function(m,t,y){Ei(m)&&(i=!0,y[t]=m.toNumber())}),i}function F(e){e.forEach(function(i){if(typeof i!="number"||!Ya(i)||i<0)throw new Error("Parameters in function zeros must be positive integers")})}}),a4="fft",sB=["typed","matrix","addScalar","multiplyScalar","divideScalar","exp","tau","i","dotDivide","conj","pow","ceil","log2"],lB=Lr(a4,sB,T=>{var{typed:N,matrix:V,addScalar:Y,multiplyScalar:X,divideScalar:J,exp:R,tau:F,i:e,dotDivide:i,conj:m,pow:t,ceil:y,log2:p}=T;return N(a4,{Array:l,Matrix:function(a){return a.create(l(a.toArray()))}});function l(u){var a=Si(u);return a.length===1?n(u,a[0]):d(u.map(o=>l(o,a.slice(1))),0)}function d(u,a){var o=Si(u);if(a!==0)return new Array(o[0]).fill(0).map((s,b)=>d(u[b],a-1));if(o.length===1)return n(u);function c(s){var b=Si(s);return new Array(b[1]).fill(0).map((g,A)=>new Array(b[0]).fill(0).map((v,h)=>s[h][A]))}return c(d(c(u),1))}function r(u){for(var a=u.length,o=R(J(X(-1,X(e,F)),a)),c=[],s=1-a;sX(u[M],c[a-1+M])),...new Array(b-a).fill(0)],A=[...new Array(a+a-1).fill(0).map((w,M)=>J(1,c[M])),...new Array(b-(a+a-1)).fill(0)],v=n(g),h=n(A),x=new Array(b).fill(0).map((w,M)=>X(v[M],h[M])),C=i(m(l(m(x))),b),D=[],L=a-1;LA%2===0)),...n(u.filter((g,A)=>A%2===1))],c=0;c{var{typed:N,fft:V,dotDivide:Y,conj:X}=T;return N(i4,{"Array | Matrix":function(R){var F=Qa(R)?R.size():Si(R);return Y(X(V(X(R))),F.reduce((e,i)=>e*i,1))}})}),cB="erf",hB=["typed"],vB=Lr(cB,hB,T=>{var{typed:N}=T;return N("name",{number:function(R){var F=Math.abs(R);return F>=gB?Tv(R):F<=dB?Tv(R)*V(F):F<=4?Tv(R)*(1-Y(F)):Tv(R)*(1-X(F))},"Array | Matrix":N.referToSelf(J=>R=>wi(R,J))});function V(J){var R=J*J,F=gh[0][4]*R,e=R,i;for(i=0;i<3;i+=1)F=(F+gh[0][i])*R,e=(e+Ep[0][i])*R;return J*(F+gh[0][3])/(e+Ep[0][3])}function Y(J){var R=gh[1][8]*J,F=J,e;for(e=0;e<7;e+=1)R=(R+gh[1][e])*J,F=(F+Ep[1][e])*J;var i=(R+gh[1][7])/(F+Ep[1][7]),m=parseInt(J*16)/16,t=(J-m)*(J+m);return Math.exp(-m*m)*Math.exp(-t)*i}function X(J){var R=1/(J*J),F=gh[2][5]*R,e=R,i;for(i=0;i<4;i+=1)F=(F+gh[2][i])*R,e=(e+Ep[2][i])*R;var m=R*(F+gh[2][4])/(e+Ep[2][4]);m=(pB-m)/J,R=parseInt(J*16)/16;var t=(J-R)*(J+R);return Math.exp(-R*R)*Math.exp(-t)*m}}),dB=.46875,pB=.5641895835477563,gh=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,21531153547440383e-24],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],Ep=[[23.601290952344122,244.02463793444417,1282.6165260773723,2844.236833439171],[15.744926110709835,117.6939508913125,537.1811018620099,1621.3895745666903,3290.7992357334597,4362.619090143247,3439.3676741437216,1230.3393548037495],[2.568520192289822,1.8729528499234604,.5279051029514285,.06051834131244132,.0023352049762686918]],gB=Math.pow(2,53),o4="mode",mB=["typed","isNaN","isNumeric"],yB=Lr(o4,mB,T=>{var{typed:N,isNaN:V,isNumeric:Y}=T;return N(o4,{"Array | Matrix":X,"...":function(R){return X(R)}});function X(J){J=Ui(J.valueOf());var R=J.length;if(R===0)throw new Error("Cannot calculate mode of an empty array");for(var F={},e=[],i=0,m=0;mi&&(i=F[t],e=[t])}return e}});function Bl(T,N,V){var Y;return String(T).indexOf("Unexpected type")!==-1?(Y=arguments.length>2?" (type: "+wo(V)+", value: "+JSON.stringify(V)+")":" (type: "+T.data.actual+")",new TypeError("Cannot calculate "+N+", unexpected type of argument"+Y)):String(T).indexOf("complex numbers")!==-1?(Y=arguments.length>2?" (type: "+wo(V)+", value: "+JSON.stringify(V)+")":"",new TypeError("Cannot calculate "+N+", no ordering relation is defined for complex numbers"+Y)):T}var s4="prod",xB=["typed","config","multiplyScalar","numeric"],bB=Lr(s4,xB,T=>{var{typed:N,config:V,multiplyScalar:Y,numeric:X}=T;return N(s4,{"Array | Matrix":J,"Array | Matrix, number | BigNumber":function(F,e){throw new Error("prod(A, dim) is not yet supported")},"...":function(F){return J(F)}});function J(R){var F;if(Rh(R,function(e){try{F=F===void 0?e:Y(F,e)}catch(i){throw Bl(i,"prod",e)}}),typeof F=="string"&&(F=X(F,V.number)),F===void 0)throw new Error("Cannot calculate prod of an empty array");return F}}),l4="format",wB=["typed"],AB=Lr(l4,wB,T=>{var{typed:N}=T;return N(l4,{any:vi,"any, Object | function | number":vi})}),u4="bin",TB=["typed","format"],MB=Lr(u4,TB,T=>{var{typed:N,format:V}=T;return N(u4,{"number | BigNumber":function(X){return V(X,{notation:"bin"})},"number | BigNumber, number":function(X,J){return V(X,{notation:"bin",wordSize:J})}})}),f4="oct",SB=["typed","format"],EB=Lr(f4,SB,T=>{var{typed:N,format:V}=T;return N(f4,{"number | BigNumber":function(X){return V(X,{notation:"oct"})},"number | BigNumber, number":function(X,J){return V(X,{notation:"oct",wordSize:J})}})}),c4="hex",CB=["typed","format"],DB=Lr(c4,CB,T=>{var{typed:N,format:V}=T;return N(c4,{"number | BigNumber":function(X){return V(X,{notation:"hex"})},"number | BigNumber, number":function(X,J){return V(X,{notation:"hex",wordSize:J})}})}),h4="print",LB=["typed"],PB=Lr(h4,LB,T=>{var{typed:N}=T;return N(h4,{"string, Object | Array":v4,"string, Object | Array, number | Object":v4})});function v4(T,N,V){return T.replace(/\$([\w.]+)/g,function(Y,X){for(var J=X.split("."),R=N[J.shift()];J.length&&R!==void 0;){var F=J.shift();R=F?R[F]:R+"."}return R!==void 0?zl(R)?R:vi(R,V):Y})}var d4="to",NB=["typed","matrix","concat"],RB=Lr(d4,NB,T=>{var{typed:N,matrix:V,concat:Y}=T,X=fo({typed:N,matrix:V,concat:Y});return N(d4,{"Unit, Unit | string":(J,R)=>J.to(R)},X({Ds:!0}))}),p4="isPrime",FB=["typed"],IB=Lr(p4,FB,T=>{var{typed:N}=T;return N(p4,{number:function(Y){if(Y*0!==0)return!1;if(Y<=3)return Y>1;if(Y%2===0||Y%3===0)return!1;for(var X=5;X*X<=Y;X+=6)if(Y%X===0||Y%(X+2)===0)return!1;return!0},BigNumber:function(Y){if(Y.toNumber()*0!==0)return!1;if(Y.lte(3))return Y.gt(1);if(Y.mod(2).eq(0)||Y.mod(3).eq(0))return!1;if(Y.lt(Math.pow(2,32))){for(var X=Y.toNumber(),J=5;J*J<=X;J+=6)if(X%J===0||X%(J+2)===0)return!1;return!0}function R(u,a,o){for(var c=1;!a.eq(0);)a.mod(2).eq(0)?(a=a.div(2),u=u.mul(u).mod(o)):(a=a.sub(1),c=u.mul(c).mod(o));return c}var F=Y.constructor.clone({precision:Y.toFixed(0).length*2});Y=new F(Y);for(var e=0,i=Y.sub(1);i.mod(2).eq(0);)i=i.div(2),e+=1;var m=null;if(Y.lt("3317044064679887385961981"))m=[2,3,5,7,11,13,17,19,23,29,31,37,41].filter(u=>uY=>wi(Y,V))})}),_B="numeric",OB=["number","?bignumber","?fraction"],zB=Lr(_B,OB,T=>{var{number:N,bignumber:V,fraction:Y}=T,X={string:!0,number:!0,BigNumber:!0,Fraction:!0},J={number:R=>N(R),BigNumber:V?R=>V(R):P3,Fraction:Y?R=>Y(R):FC};return function(F){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"number",i=arguments.length>2?arguments[2]:void 0;if(i!==void 0)throw new SyntaxError("numeric() takes one or two arguments");var m=wo(F);if(!(m in X))throw new TypeError("Cannot convert "+F+' of type "'+m+'"; valid input types are '+Object.keys(X).join(", "));if(!(e in J))throw new TypeError("Cannot convert "+F+' to type "'+e+'"; valid output types are '+Object.keys(J).join(", "));return e===m?F:J[e](F)}}),g4="divideScalar",kB=["typed","numeric"],BB=Lr(g4,kB,T=>{var{typed:N,numeric:V}=T;return N(g4,{"number, number":function(X,J){return X/J},"Complex, Complex":function(X,J){return X.div(J)},"BigNumber, BigNumber":function(X,J){return X.div(J)},"Fraction, Fraction":function(X,J){return X.div(J)},"Unit, number | Complex | Fraction | BigNumber | Unit":(Y,X)=>Y.divide(X),"number | Fraction | Complex | BigNumber, Unit":(Y,X)=>X.divideInto(Y)})}),m4="pow",UB=["typed","config","identity","multiply","matrix","inv","fraction","number","Complex"],HB=Lr(m4,UB,T=>{var{typed:N,config:V,identity:Y,multiply:X,matrix:J,inv:R,number:F,fraction:e,Complex:i}=T;return N(m4,{"number, number":m,"Complex, Complex":function(l,d){return l.pow(d)},"BigNumber, BigNumber":function(l,d){return d.isInteger()||l>=0||V.predictable?l.pow(d):new i(l.toNumber(),0).pow(d.toNumber(),0)},"Fraction, Fraction":function(l,d){var r=l.pow(d);if(r!=null)return r;if(V.predictable)throw new Error("Result of pow is non-rational and cannot be expressed as a fraction");return m(l.valueOf(),d.valueOf())},"Array, number":t,"Array, BigNumber":function(l,d){return t(l,d.toNumber())},"Matrix, number":y,"Matrix, BigNumber":function(l,d){return y(l,d.toNumber())},"Unit, number | BigNumber":function(l,d){return l.pow(d)}});function m(p,l){if(V.predictable&&!Ya(l)&&p<0)try{var d=e(l),r=F(d);if((l===r||Math.abs((l-r)/l)<1e-14)&&d.d%2===1)return(d.n%2===0?1:-1)*Math.pow(-p,l)}catch{}return V.predictable&&(p<-1&&l===1/0||p>-1&&p<0&&l===-1/0)?NaN:Ya(l)||p>=0||V.predictable?Z8(p,l):p*p<1&&l===1/0||p*p>1&&l===-1/0?0:new i(p,0).pow(l,0)}function t(p,l){if(!Ya(l))throw new TypeError("For A^b, b must be an integer (value is "+l+")");var d=Si(p);if(d.length!==2)throw new Error("For A^b, A must be 2 dimensional (A has "+d.length+" dimensions)");if(d[0]!==d[1])throw new Error("For A^b, A must be square (size is "+d[0]+"x"+d[1]+")");if(l<0)try{return t(R(p),-l)}catch(u){throw u.message==="Cannot calculate inverse, determinant is zero"?new TypeError("For A^b, when A is not invertible, b must be a positive integer (value is "+l+")"):u}for(var r=Y(d[0]).valueOf(),n=p;l>=1;)(l&1)===1&&(r=X(n,r)),l>>=1,n=X(n,n);return r}function y(p,l){return J(t(p.valueOf(),l))}}),Cp="Number of decimals in function round must be an integer",y4="round",VB=["typed","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],GB=Lr(y4,VB,T=>{var{typed:N,matrix:V,equalScalar:Y,zeros:X,BigNumber:J,DenseMatrix:R}=T,F=qs({typed:N,equalScalar:Y}),e=Ss({typed:N,DenseMatrix:R}),i=Jf({typed:N});return N(y4,{number:zT,"number, number":zT,"number, BigNumber":function(t,y){if(!y.isInteger())throw new TypeError(Cp);return new J(t).toDecimalPlaces(y.toNumber())},Complex:function(t){return t.round()},"Complex, number":function(t,y){if(y%1)throw new TypeError(Cp);return t.round(y)},"Complex, BigNumber":function(t,y){if(!y.isInteger())throw new TypeError(Cp);var p=y.toNumber();return t.round(p)},BigNumber:function(t){return t.toDecimalPlaces(0)},"BigNumber, BigNumber":function(t,y){if(!y.isInteger())throw new TypeError(Cp);return t.toDecimalPlaces(y.toNumber())},Fraction:function(t){return t.round()},"Fraction, number":function(t,y){if(y%1)throw new TypeError(Cp);return t.round(y)},"Fraction, BigNumber":function(t,y){if(!y.isInteger())throw new TypeError(Cp);return t.round(y.toNumber())},"Array | Matrix":N.referToSelf(m=>t=>wi(t,m)),"SparseMatrix, number | BigNumber":N.referToSelf(m=>(t,y)=>F(t,y,m,!1)),"DenseMatrix, number | BigNumber":N.referToSelf(m=>(t,y)=>i(t,y,m,!1)),"Array, number | BigNumber":N.referToSelf(m=>(t,y)=>i(V(t),y,m,!1).valueOf()),"number | Complex | BigNumber | Fraction, SparseMatrix":N.referToSelf(m=>(t,y)=>Y(t,0)?X(y.size(),y.storage()):e(y,t,m,!0)),"number | Complex | BigNumber | Fraction, DenseMatrix":N.referToSelf(m=>(t,y)=>Y(t,0)?X(y.size(),y.storage()):i(y,t,m,!0)),"number | Complex | BigNumber | Fraction, Array":N.referToSelf(m=>(t,y)=>i(V(y),t,m,!0).valueOf())})}),x4="log",WB=["config","typed","divideScalar","Complex"],YB=Lr(x4,WB,T=>{var{typed:N,config:V,divideScalar:Y,Complex:X}=T;return N(x4,{number:function(R){return R>=0||V.predictable?XI(R):new X(R,0).log()},Complex:function(R){return R.log()},BigNumber:function(R){return!R.isNegative()||V.predictable?R.ln():new X(R.toNumber(),0).log()},"any, any":N.referToSelf(J=>(R,F)=>Y(J(R),J(F)))})}),b4="log1p",ZB=["typed","config","divideScalar","log","Complex"],XB=Lr(b4,ZB,T=>{var{typed:N,config:V,divideScalar:Y,log:X,Complex:J}=T;return N(b4,{number:function(e){return e>=-1||V.predictable?KR(e):R(new J(e,0))},Complex:R,BigNumber:function(e){var i=e.plus(1);return!i.isNegative()||V.predictable?i.ln():R(new J(e.toNumber(),0))},"Array | Matrix":N.referToSelf(F=>e=>wi(e,F)),"any, any":N.referToSelf(F=>(e,i)=>Y(F(e),X(i)))});function R(F){var e=F.re+1;return new J(Math.log(Math.sqrt(e*e+F.im*F.im)),Math.atan2(F.im,e))}}),w4="nthRoots",jB=["config","typed","divideScalar","Complex"],$B=Lr(w4,jB,T=>{var{typed:N,config:V,divideScalar:Y,Complex:X}=T,J=[function(e){return new X(e,0)},function(e){return new X(0,e)},function(e){return new X(-e,0)},function(e){return new X(0,-e)}];function R(F,e){if(e<0)throw new Error("Root must be greater than zero");if(e===0)throw new Error("Root must be non-zero");if(e%1!==0)throw new Error("Root must be an integer");if(F===0||F.abs()===0)return[new X(0,0)];var i=typeof F=="number",m;(i||F.re===0||F.im===0)&&(i?m=2*+(F<0):F.im===0?m=2*+(F.re<0):m=2*+(F.im<0)+1);for(var t=F.arg(),y=F.abs(),p=[],l=Math.pow(y,1/e),d=0;d{var{typed:N,equalScalar:V,matrix:Y,pow:X,DenseMatrix:J,concat:R}=T,F=Vl({typed:N}),e=Fc({typed:N,DenseMatrix:J}),i=qs({typed:N,equalScalar:V}),m=Ss({typed:N,DenseMatrix:J}),t=fo({typed:N,matrix:Y,concat:R}),y={};for(var p in X.signatures)Object.prototype.hasOwnProperty.call(X.signatures,p)&&!p.includes("Matrix")&&!p.includes("Array")&&(y[p]=X.signatures[p]);var l=N(y);return N(A4,t({elop:l,SS:e,DS:F,Ss:i,sS:m}))}),T4="dotDivide",QB=["typed","matrix","equalScalar","divideScalar","DenseMatrix","concat"],qB=Lr(T4,QB,T=>{var{typed:N,matrix:V,equalScalar:Y,divideScalar:X,DenseMatrix:J,concat:R}=T,F=Qf({typed:N,equalScalar:Y}),e=Vl({typed:N}),i=Fc({typed:N,DenseMatrix:J}),m=qs({typed:N,equalScalar:Y}),t=Ss({typed:N,DenseMatrix:J}),y=fo({typed:N,matrix:V,concat:R});return N(T4,y({elop:X,SS:i,DS:e,SD:F,Ss:m,sS:t}))});function Qg(T){var{DenseMatrix:N}=T;return function(Y,X,J){var R=Y.size();if(R.length!==2)throw new RangeError("Matrix must be two dimensional (size: "+vi(R)+")");var F=R[0],e=R[1];if(F!==e)throw new RangeError("Matrix must be square (size: "+vi(R)+")");var i=[];if(Qa(X)){var m=X.size(),t=X._data;if(m.length===1){if(m[0]!==F)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var y=0;y{var{typed:N,matrix:V,divideScalar:Y,multiplyScalar:X,subtract:J,equalScalar:R,DenseMatrix:F}=T,e=Qg({DenseMatrix:F});return N(M4,{"SparseMatrix, Array | Matrix":function(y,p){return m(y,p)},"DenseMatrix, Array | Matrix":function(y,p){return i(y,p)},"Array, Array | Matrix":function(y,p){var l=V(y),d=i(l,p);return d.valueOf()}});function i(t,y){y=e(t,y,!0);for(var p=y._data,l=t._size[0],d=t._size[1],r=[],n=t._data,u=0;uo&&(b.push(r[h]),g.push(x))}if(R(s,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var C=Y(c,s),D=0,L=g.length;D{var{typed:N,matrix:V,divideScalar:Y,multiplyScalar:X,subtract:J,equalScalar:R,DenseMatrix:F}=T,e=Qg({DenseMatrix:F});return N(S4,{"SparseMatrix, Array | Matrix":function(y,p){return m(y,p)},"DenseMatrix, Array | Matrix":function(y,p){return i(y,p)},"Array, Array | Matrix":function(y,p){var l=V(y),d=i(l,p);return d.valueOf()}});function i(t,y){y=e(t,y,!0);for(var p=y._data,l=t._size[0],d=t._size[1],r=[],n=t._data,u=d-1;u>=0;u--){var a=p[u][0]||0,o=void 0;if(R(a,0))o=0;else{var c=n[u][u];if(R(c,0))throw new Error("Linear system cannot be solved since matrix is singular");o=Y(a,c);for(var s=u-1;s>=0;s--)p[s]=[J(p[s][0]||0,X(o,n[s][u]))]}r[u]=[o]}return new F({data:r,size:[l,1]})}function m(t,y){y=e(t,y,!0);for(var p=y._data,l=t._size[0],d=t._size[1],r=t._values,n=t._index,u=t._ptr,a=[],o=d-1;o>=0;o--){var c=p[o][0]||0;if(R(c,0))a[o]=[0];else{for(var s=0,b=[],g=[],A=u[o],v=u[o+1],h=v-1;h>=A;h--){var x=n[h];x===o?s=r[h]:x{var{typed:N,matrix:V,divideScalar:Y,multiplyScalar:X,subtract:J,equalScalar:R,DenseMatrix:F}=T,e=Qg({DenseMatrix:F});return N(E4,{"SparseMatrix, Array | Matrix":function(y,p){return m(y,p)},"DenseMatrix, Array | Matrix":function(y,p){return i(y,p)},"Array, Array | Matrix":function(y,p){var l=V(y),d=i(l,p);return d.map(r=>r.valueOf())}});function i(t,y){for(var p=[e(t,y,!0)._data.map(g=>g[0])],l=t._data,d=t._size[0],r=t._size[1],n=0;nnew F({data:g.map(A=>[A]),size:[d,1]}))}function m(t,y){for(var p=[e(t,y,!0)._data.map(E=>E[0])],l=t._size[0],d=t._size[1],r=t._values,n=t._index,u=t._ptr,a=0;aa&&(b.push(r[x]),g.push(C))}if(R(h,0))if(R(s[a],0)){if(c===0){var M=[...s];M[a]=1;for(var S=0,f=g.length;Snew F({data:E.map(k=>[k]),size:[l,1]}))}}),C4="usolveAll",oU=["typed","matrix","divideScalar","multiplyScalar","subtract","equalScalar","DenseMatrix"],sU=Lr(C4,oU,T=>{var{typed:N,matrix:V,divideScalar:Y,multiplyScalar:X,subtract:J,equalScalar:R,DenseMatrix:F}=T,e=Qg({DenseMatrix:F});return N(C4,{"SparseMatrix, Array | Matrix":function(y,p){return m(y,p)},"DenseMatrix, Array | Matrix":function(y,p){return i(y,p)},"Array, Array | Matrix":function(y,p){var l=V(y),d=i(l,p);return d.map(r=>r.valueOf())}});function i(t,y){for(var p=[e(t,y,!0)._data.map(g=>g[0])],l=t._data,d=t._size[0],r=t._size[1],n=r-1;n>=0;n--)for(var u=p.length,a=0;a=0;b--)s[b]=J(s[b],l[b][n]);p.push(s)}}else{if(a===0)return[];p.splice(a,1),a-=1,u-=1}else{o[n]=Y(o[n],l[n][n]);for(var c=n-1;c>=0;c--)o[c]=J(o[c],X(o[n],l[c][n]))}}return p.map(g=>new F({data:g.map(A=>[A]),size:[d,1]}))}function m(t,y){for(var p=[e(t,y,!0)._data.map(E=>E[0])],l=t._size[0],d=t._size[1],r=t._values,n=t._index,u=t._ptr,a=d-1;a>=0;a--)for(var o=p.length,c=0;c=A;x--){var C=n[x];C===a?h=r[x]:Cnew F({data:E.map(k=>[k]),size:[l,1]}))}}),lU="matAlgo08xS0Sid",uU=["typed","equalScalar"],N3=Lr(lU,uU,T=>{var{typed:N,equalScalar:V}=T;return function(X,J,R){var F=X._values,e=X._index,i=X._ptr,m=X._size,t=X._datatype,y=J._values,p=J._index,l=J._ptr,d=J._size,r=J._datatype;if(m.length!==d.length)throw new bi(m.length,d.length);if(m[0]!==d[0]||m[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+m+") must match Matrix B ("+d+")");if(!F||!y)throw new Error("Cannot perform operation on Pattern Sparse Matrices");var n=m[0],u=m[1],a,o=V,c=0,s=R;typeof t=="string"&&t===r&&(a=t,o=N.find(V,[a,a]),c=N.convert(0,a),s=N.find(R,[a,a]));for(var b=[],g=[],A=[],v=[],h=[],x,C,D,L,w=0;w{var{typed:N,matrix:V}=T;return{"Array, number":N.referTo("DenseMatrix, number",Y=>(X,J)=>Y(V(X),J).valueOf()),"Array, BigNumber":N.referTo("DenseMatrix, BigNumber",Y=>(X,J)=>Y(V(X),J).valueOf()),"number, Array":N.referTo("number, DenseMatrix",Y=>(X,J)=>Y(X,V(J)).valueOf()),"BigNumber, Array":N.referTo("BigNumber, DenseMatrix",Y=>(X,J)=>Y(X,V(J)).valueOf())}}),D4="leftShift",fU=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],cU=Lr(D4,fU,T=>{var{typed:N,matrix:V,equalScalar:Y,zeros:X,DenseMatrix:J,concat:R}=T,F=Gv({typed:N}),e=Qf({typed:N,equalScalar:Y}),i=N3({typed:N,equalScalar:Y}),m=Gd({typed:N,DenseMatrix:J}),t=qs({typed:N,equalScalar:Y}),y=Jf({typed:N}),p=fo({typed:N,matrix:V,concat:R}),l=R3({typed:N,matrix:V});return N(D4,{"number, number":J8,"BigNumber, BigNumber":_z,"SparseMatrix, number | BigNumber":N.referToSelf(d=>(r,n)=>Y(n,0)?r.clone():t(r,n,d,!1)),"DenseMatrix, number | BigNumber":N.referToSelf(d=>(r,n)=>Y(n,0)?r.clone():y(r,n,d,!1)),"number | BigNumber, SparseMatrix":N.referToSelf(d=>(r,n)=>Y(r,0)?X(n.size(),n.storage()):m(n,r,d,!0)),"number | BigNumber, DenseMatrix":N.referToSelf(d=>(r,n)=>Y(r,0)?X(n.size(),n.storage()):y(n,r,d,!0))},l,p({SS:i,DS:F,SD:e}))}),L4="rightArithShift",hU=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],vU=Lr(L4,hU,T=>{var{typed:N,matrix:V,equalScalar:Y,zeros:X,DenseMatrix:J,concat:R}=T,F=Gv({typed:N}),e=Qf({typed:N,equalScalar:Y}),i=N3({typed:N,equalScalar:Y}),m=Gd({typed:N,DenseMatrix:J}),t=qs({typed:N,equalScalar:Y}),y=Jf({typed:N}),p=fo({typed:N,matrix:V,concat:R}),l=R3({typed:N,matrix:V});return N(L4,{"number, number":Q8,"BigNumber, BigNumber":Oz,"SparseMatrix, number | BigNumber":N.referToSelf(d=>(r,n)=>Y(n,0)?r.clone():t(r,n,d,!1)),"DenseMatrix, number | BigNumber":N.referToSelf(d=>(r,n)=>Y(n,0)?r.clone():y(r,n,d,!1)),"number | BigNumber, SparseMatrix":N.referToSelf(d=>(r,n)=>Y(r,0)?X(n.size(),n.storage()):m(n,r,d,!0)),"number | BigNumber, DenseMatrix":N.referToSelf(d=>(r,n)=>Y(r,0)?X(n.size(),n.storage()):y(n,r,d,!0))},l,p({SS:i,DS:F,SD:e}))}),P4="rightLogShift",dU=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],pU=Lr(P4,dU,T=>{var{typed:N,matrix:V,equalScalar:Y,zeros:X,DenseMatrix:J,concat:R}=T,F=Gv({typed:N}),e=Qf({typed:N,equalScalar:Y}),i=N3({typed:N,equalScalar:Y}),m=Gd({typed:N,DenseMatrix:J}),t=qs({typed:N,equalScalar:Y}),y=Jf({typed:N}),p=fo({typed:N,matrix:V,concat:R}),l=R3({typed:N,matrix:V});return N(P4,{"number, number":q8,"SparseMatrix, number | BigNumber":N.referToSelf(d=>(r,n)=>Y(n,0)?r.clone():t(r,n,d,!1)),"DenseMatrix, number | BigNumber":N.referToSelf(d=>(r,n)=>Y(n,0)?r.clone():y(r,n,d,!1)),"number | BigNumber, SparseMatrix":N.referToSelf(d=>(r,n)=>Y(r,0)?X(n.size(),n.storage()):m(n,r,d,!0)),"number | BigNumber, DenseMatrix":N.referToSelf(d=>(r,n)=>Y(r,0)?X(n.size(),n.storage()):y(n,r,d,!0))},l,p({SS:i,DS:F,SD:e}))}),N4="and",gU=["typed","matrix","equalScalar","zeros","not","concat"],mU=Lr(N4,gU,T=>{var{typed:N,matrix:V,equalScalar:Y,zeros:X,not:J,concat:R}=T,F=Qf({typed:N,equalScalar:Y}),e=W1({typed:N,equalScalar:Y}),i=qs({typed:N,equalScalar:Y}),m=Jf({typed:N}),t=fo({typed:N,matrix:V,concat:R});return N(N4,{"number, number":aC,"Complex, Complex":function(p,l){return(p.re!==0||p.im!==0)&&(l.re!==0||l.im!==0)},"BigNumber, BigNumber":function(p,l){return!p.isZero()&&!l.isZero()&&!p.isNaN()&&!l.isNaN()},"Unit, Unit":N.referToSelf(y=>(p,l)=>y(p.value||0,l.value||0)),"SparseMatrix, any":N.referToSelf(y=>(p,l)=>J(l)?X(p.size(),p.storage()):i(p,l,y,!1)),"DenseMatrix, any":N.referToSelf(y=>(p,l)=>J(l)?X(p.size(),p.storage()):m(p,l,y,!1)),"any, SparseMatrix":N.referToSelf(y=>(p,l)=>J(p)?X(p.size(),p.storage()):i(l,p,y,!0)),"any, DenseMatrix":N.referToSelf(y=>(p,l)=>J(p)?X(p.size(),p.storage()):m(l,p,y,!0)),"Array, any":N.referToSelf(y=>(p,l)=>y(V(p),l).valueOf()),"any, Array":N.referToSelf(y=>(p,l)=>y(p,V(l)).valueOf())},t({SS:e,DS:F}))}),u1="compare",yU=["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix","concat"],xU=Lr(u1,yU,T=>{var{typed:N,config:V,equalScalar:Y,matrix:X,BigNumber:J,Fraction:R,DenseMatrix:F,concat:e}=T,i=Vl({typed:N}),m=Y1({typed:N,equalScalar:Y}),t=Ss({typed:N,DenseMatrix:F}),y=fo({typed:N,matrix:X,concat:e}),p=y0({typed:N});return N(u1,bU({typed:N,config:V}),{"boolean, boolean":function(d,r){return d===r?0:d>r?1:-1},"BigNumber, BigNumber":function(d,r){return Nc(d,r,V.epsilon)?new J(0):new J(d.cmp(r))},"Fraction, Fraction":function(d,r){return new R(d.compare(r))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},p,y({SS:m,DS:i,Ss:t}))}),bU=Lr(u1,["typed","config"],T=>{var{typed:N,config:V}=T;return N(u1,{"number, number":function(X,J){return Du(X,J,V.epsilon)?0:X>J?1:-1}})}),Dp=function T(N,V){var Y=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,X=/(^[ ]*|[ ]*$)/g,J=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,R=/^0x[0-9a-f]+$/i,F=/^0/,e=function(a){return T.insensitive&&(""+a).toLowerCase()||""+a},i=e(N).replace(X,"")||"",m=e(V).replace(X,"")||"",t=i.replace(Y,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),y=m.replace(Y,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),p=parseInt(i.match(R),16)||t.length!==1&&i.match(J)&&Date.parse(i),l=parseInt(m.match(R),16)||p&&m.match(J)&&Date.parse(m)||null,d,r;if(l){if(pl)return 1}for(var n=0,u=Math.max(t.length,y.length);nr)return 1}return 0},R4="compareNatural",wU=["typed","compare"],AU=Lr(R4,wU,T=>{var{typed:N,compare:V}=T,Y=V.signatures["boolean,boolean"];return N(R4,{"any, any":X});function X(e,i){var m=wo(e),t=wo(i),y;if((m==="number"||m==="BigNumber"||m==="Fraction")&&(t==="number"||t==="BigNumber"||t==="Fraction"))return y=V(e,i),y.toString()!=="0"?y>0?1:-1:Dp(m,t);var p=["Array","DenseMatrix","SparseMatrix"];if(p.includes(m)||p.includes(t))return y=J(X,e,i),y!==0?y:Dp(m,t);if(m!==t)return Dp(m,t);if(m==="Complex")return TU(e,i);if(m==="Unit")return e.equalBase(i)?X(e.value,i.value):R(X,e.formatUnits(),i.formatUnits());if(m==="boolean")return Y(e,i);if(m==="string")return Dp(e,i);if(m==="Object")return F(X,e,i);if(m==="null"||m==="undefined")return 0;throw new TypeError('Unsupported type of value "'+m+'"')}function J(e,i,m){return Ld(i)&&Ld(m)?R(e,i.toJSON().values,m.toJSON().values):Ld(i)?J(e,i.toArray(),m):Ld(m)?J(e,i,m.toArray()):Jy(i)?J(e,i.toJSON().data,m):Jy(m)?J(e,i,m.toJSON().data):Array.isArray(i)?Array.isArray(m)?R(e,i,m):J(e,i,[m]):J(e,[i],m)}function R(e,i,m){for(var t=0,y=Math.min(i.length,m.length);tm.length?1:i.lengthN.re?1:T.reN.im?1:T.im{var{typed:N,matrix:V,concat:Y}=T,X=fo({typed:N,matrix:V,concat:Y});return N(F4,lb,X({elop:lb,Ds:!0}))}),f1="equal",EU=["typed","matrix","equalScalar","DenseMatrix","concat"],CU=Lr(f1,EU,T=>{var{typed:N,matrix:V,equalScalar:Y,DenseMatrix:X,concat:J}=T,R=Vl({typed:N}),F=Fc({typed:N,DenseMatrix:X}),e=Ss({typed:N,DenseMatrix:X}),i=fo({typed:N,matrix:V,concat:J});return N(f1,DU({typed:N,equalScalar:Y}),i({elop:Y,SS:F,DS:R,Ss:e}))}),DU=Lr(f1,["typed","equalScalar"],T=>{var{typed:N,equalScalar:V}=T;return N(f1,{"any, any":function(X,J){return X===null?J===null:J===null?X===null:X===void 0?J===void 0:J===void 0?X===void 0:V(X,J)}})}),I4="equalText",LU=["typed","compareText","isZero"],PU=Lr(I4,LU,T=>{var{typed:N,compareText:V,isZero:Y}=T;return N(I4,{"any, any":function(J,R){return Y(V(J,R))}})}),c1="smaller",NU=["typed","config","matrix","DenseMatrix","concat"],RU=Lr(c1,NU,T=>{var{typed:N,config:V,matrix:Y,DenseMatrix:X,concat:J}=T,R=Vl({typed:N}),F=Fc({typed:N,DenseMatrix:X}),e=Ss({typed:N,DenseMatrix:X}),i=fo({typed:N,matrix:Y,concat:J}),m=y0({typed:N});return N(c1,FU({typed:N,config:V}),{"boolean, boolean":(t,y)=>tt.compare(y)===-1,"Complex, Complex":function(y,p){throw new TypeError("No ordering relation is defined for complex numbers")}},m,i({SS:F,DS:R,Ss:e}))}),FU=Lr(c1,["typed","config"],T=>{var{typed:N,config:V}=T;return N(c1,{"number, number":function(X,J){return X{var{typed:N,config:V,matrix:Y,DenseMatrix:X,concat:J}=T,R=Vl({typed:N}),F=Fc({typed:N,DenseMatrix:X}),e=Ss({typed:N,DenseMatrix:X}),i=fo({typed:N,matrix:Y,concat:J}),m=y0({typed:N});return N(h1,OU({typed:N,config:V}),{"boolean, boolean":(t,y)=>t<=y,"BigNumber, BigNumber":function(y,p){return y.lte(p)||Nc(y,p,V.epsilon)},"Fraction, Fraction":(t,y)=>t.compare(y)!==1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},m,i({SS:F,DS:R,Ss:e}))}),OU=Lr(h1,["typed","config"],T=>{var{typed:N,config:V}=T;return N(h1,{"number, number":function(X,J){return X<=J||Du(X,J,V.epsilon)}})}),v1="larger",zU=["typed","config","matrix","DenseMatrix","concat"],kU=Lr(v1,zU,T=>{var{typed:N,config:V,matrix:Y,DenseMatrix:X,concat:J}=T,R=Vl({typed:N}),F=Fc({typed:N,DenseMatrix:X}),e=Ss({typed:N,DenseMatrix:X}),i=fo({typed:N,matrix:Y,concat:J}),m=y0({typed:N});return N(v1,BU({typed:N,config:V}),{"boolean, boolean":(t,y)=>t>y,"BigNumber, BigNumber":function(y,p){return y.gt(p)&&!Nc(y,p,V.epsilon)},"Fraction, Fraction":(t,y)=>t.compare(y)===1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},m,i({SS:F,DS:R,Ss:e}))}),BU=Lr(v1,["typed","config"],T=>{var{typed:N,config:V}=T;return N(v1,{"number, number":function(X,J){return X>J&&!Du(X,J,V.epsilon)}})}),d1="largerEq",UU=["typed","config","matrix","DenseMatrix","concat"],HU=Lr(d1,UU,T=>{var{typed:N,config:V,matrix:Y,DenseMatrix:X,concat:J}=T,R=Vl({typed:N}),F=Fc({typed:N,DenseMatrix:X}),e=Ss({typed:N,DenseMatrix:X}),i=fo({typed:N,matrix:Y,concat:J}),m=y0({typed:N});return N(d1,VU({typed:N,config:V}),{"boolean, boolean":(t,y)=>t>=y,"BigNumber, BigNumber":function(y,p){return y.gte(p)||Nc(y,p,V.epsilon)},"Fraction, Fraction":(t,y)=>t.compare(y)!==-1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},m,i({SS:F,DS:R,Ss:e}))}),VU=Lr(d1,["typed","config"],T=>{var{typed:N,config:V}=T;return N(d1,{"number, number":function(X,J){return X>=J||Du(X,J,V.epsilon)}})}),_4="deepEqual",GU=["typed","equal"],WU=Lr(_4,GU,T=>{var{typed:N,equal:V}=T;return N(_4,{"any, any":function(J,R){return Y(J.valueOf(),R.valueOf())}});function Y(X,J){if(Array.isArray(X))if(Array.isArray(J)){var R=X.length;if(R!==J.length)return!1;for(var F=0;F{var{typed:N,config:V,equalScalar:Y,matrix:X,DenseMatrix:J,concat:R}=T,F=Vl({typed:N}),e=Fc({typed:N,DenseMatrix:J}),i=Ss({typed:N,DenseMatrix:J}),m=fo({typed:N,matrix:X,concat:R});return N(p1,XU({typed:N,equalScalar:Y}),m({elop:t,SS:e,DS:F,Ss:i}));function t(y,p){return!Y(y,p)}}),XU=Lr(p1,["typed","equalScalar"],T=>{var{typed:N,equalScalar:V}=T;return N(p1,{"any, any":function(X,J){return X===null?J!==null:J===null?X!==null:X===void 0?J!==void 0:J===void 0?X!==void 0:!V(X,J)}})}),O4="partitionSelect",jU=["typed","isNumeric","isNaN","compare"],$U=Lr(O4,jU,T=>{var{typed:N,isNumeric:V,isNaN:Y,compare:X}=T,J=X,R=(i,m)=>-X(i,m);return N(O4,{"Array | Matrix, number":function(m,t){return F(m,t,J)},"Array | Matrix, number, string":function(m,t,y){if(y==="asc")return F(m,t,J);if(y==="desc")return F(m,t,R);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":F});function F(i,m,t){if(!Ya(m)||m<0)throw new Error("k must be a non-negative integer");if(Qa(i)){var y=i.size();if(y.length>1)throw new Error("Only one dimensional matrices supported");return e(i.valueOf(),m,t)}if(Array.isArray(i))return e(i,m,t)}function e(i,m,t){if(m>=i.length)throw new Error("k out of bounds");for(var y=0;y=0){var u=i[r];i[r]=i[d],i[d]=u,--r}else++d;t(i[d],n)>0&&--d,m<=d?l=d:p=d+1}return i[m]}}),z4="sort",KU=["typed","matrix","compare","compareNatural"],JU=Lr(z4,KU,T=>{var{typed:N,matrix:V,compare:Y,compareNatural:X}=T,J=Y,R=(m,t)=>-Y(m,t);return N(z4,{Array:function(t){return e(t),t.sort(J)},Matrix:function(t){return i(t),V(t.toArray().sort(J),t.storage())},"Array, function":function(t,y){return e(t),t.sort(y)},"Matrix, function":function(t,y){return i(t),V(t.toArray().sort(y),t.storage())},"Array, string":function(t,y){return e(t),t.sort(F(y))},"Matrix, string":function(t,y){return i(t),V(t.toArray().sort(F(y)),t.storage())}});function F(m){if(m==="asc")return J;if(m==="desc")return R;if(m==="natural")return X;throw new Error('String "asc", "desc", or "natural" expected')}function e(m){if(Si(m).length!==1)throw new Error("One dimensional array expected")}function i(m){if(m.size().length!==1)throw new Error("One dimensional matrix expected")}}),k4="max",QU=["typed","config","numeric","larger"],kC=Lr(k4,QU,T=>{var{typed:N,config:V,numeric:Y,larger:X}=T;return N(k4,{"Array | Matrix":R,"Array | Matrix, number | BigNumber":function(e,i){return V1(e,i.valueOf(),J)},"...":function(e){if(g0(e))throw new TypeError("Scalar values expected in function max");return R(e)}});function J(F,e){try{return X(F,e)?F:e}catch(i){throw Bl(i,"max",e)}}function R(F){var e;if(Rh(F,function(i){try{isNaN(i)&&typeof i=="number"?e=NaN:(e===void 0||X(i,e))&&(e=i)}catch(m){throw Bl(m,"max",i)}}),e===void 0)throw new Error("Cannot calculate max of an empty array");return typeof e=="string"&&(e=Y(e,V.number)),e}}),B4="min",qU=["typed","config","numeric","smaller"],BC=Lr(B4,qU,T=>{var{typed:N,config:V,numeric:Y,smaller:X}=T;return N(B4,{"Array | Matrix":R,"Array | Matrix, number | BigNumber":function(e,i){return V1(e,i.valueOf(),J)},"...":function(e){if(g0(e))throw new TypeError("Scalar values expected in function min");return R(e)}});function J(F,e){try{return X(F,e)?F:e}catch(i){throw Bl(i,"min",e)}}function R(F){var e;if(Rh(F,function(i){try{isNaN(i)&&typeof i=="number"?e=NaN:(e===void 0||X(i,e))&&(e=i)}catch(m){throw Bl(m,"min",i)}}),e===void 0)throw new Error("Cannot calculate min of an empty array");return typeof e=="string"&&(e=Y(e,V.number)),e}}),eH="ImmutableDenseMatrix",tH=["smaller","DenseMatrix"],rH=Lr(eH,tH,T=>{var{smaller:N,DenseMatrix:V}=T;function Y(X,J){if(!(this instanceof Y))throw new SyntaxError("Constructor must be called with the new operator");if(J&&!zl(J))throw new Error("Invalid datatype: "+J);if(Qa(X)||ro(X)){var R=new V(X,J);this._data=R._data,this._size=R._size,this._datatype=R._datatype,this._min=null,this._max=null}else if(X&&ro(X.data)&&ro(X.size))this._data=X.data,this._size=X.size,this._datatype=X.datatype,this._min=typeof X.min<"u"?X.min:null,this._max=typeof X.max<"u"?X.max:null;else{if(X)throw new TypeError("Unsupported type of data ("+wo(X)+")");this._data=[],this._size=[0],this._datatype=J,this._min=null,this._max=null}}return Y.prototype=new V,Y.prototype.type="ImmutableDenseMatrix",Y.prototype.isImmutableDenseMatrix=!0,Y.prototype.subset=function(X){switch(arguments.length){case 1:{var J=V.prototype.subset.call(this,X);return Qa(J)?new Y({data:J._data,size:J._size,datatype:J._datatype}):J}case 2:case 3:throw new Error("Cannot invoke set subset on an Immutable Matrix instance");default:throw new SyntaxError("Wrong number of arguments")}},Y.prototype.set=function(){throw new Error("Cannot invoke set on an Immutable Matrix instance")},Y.prototype.resize=function(){throw new Error("Cannot invoke resize on an Immutable Matrix instance")},Y.prototype.reshape=function(){throw new Error("Cannot invoke reshape on an Immutable Matrix instance")},Y.prototype.clone=function(){return new Y({data:ei(this._data),size:ei(this._size),datatype:this._datatype})},Y.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},Y.fromJSON=function(X){return new Y(X)},Y.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},Y.prototype.min=function(){if(this._min===null){var X=null;this.forEach(function(J){(X===null||N(J,X))&&(X=J)}),this._min=X!==null?X:void 0}return this._min},Y.prototype.max=function(){if(this._max===null){var X=null;this.forEach(function(J){(X===null||N(X,J))&&(X=J)}),this._max=X!==null?X:void 0}return this._max},Y},{isClass:!0}),nH="Index",aH=["ImmutableDenseMatrix"],iH=Lr(nH,aH,T=>{var{ImmutableDenseMatrix:N}=T;function V(X){if(!(this instanceof V))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._isScalar=!0;for(var J=0,R=arguments.length;J{var{smaller:N,larger:V}=T,Y=1/Math.log((1+Math.sqrt(5))/2);function X(){if(!(this instanceof X))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}X.prototype.type="FibonacciHeap",X.prototype.isFibonacciHeap=!0,X.prototype.insert=function(m,t){var y={key:m,value:t,degree:0};if(this._minimum){var p=this._minimum;y.left=p,y.right=p.right,p.right=y,y.right.left=y,N(m,p.key)&&(this._minimum=y)}else y.left=y,y.right=y,this._minimum=y;return this._size++,y},X.prototype.size=function(){return this._size},X.prototype.clear=function(){this._minimum=null,this._size=0},X.prototype.isEmpty=function(){return this._size===0},X.prototype.extractMinimum=function(){var m=this._minimum;if(m===null)return m;for(var t=this._minimum,y=m.degree,p=m.child;y>0;){var l=p.right;p.left.right=p.right,p.right.left=p.left,p.left=t,p.right=t.right,t.right=p,p.right.left=p,p.parent=null,p=l,y--}return m.left.right=m.right,m.right.left=m.left,m===m.right?t=null:(t=m.right,t=i(t,this._size)),this._size--,this._minimum=t,m},X.prototype.remove=function(m){this._minimum=J(this._minimum,m,-1),this.extractMinimum()};function J(m,t,y){t.key=y;var p=t.parent;return p&&N(t.key,p.key)&&(R(m,t,p),F(m,p)),N(t.key,m.key)&&(m=t),m}function R(m,t,y){t.left.right=t.right,t.right.left=t.left,y.degree--,y.child===t&&(y.child=t.right),y.degree===0&&(y.child=null),t.left=m,t.right=m.right,m.right=t,t.right.left=t,t.parent=null,t.mark=!1}function F(m,t){var y=t.parent;!y||(t.mark?(R(m,t,y),F(y)):t.mark=!0)}var e=function(t,y){t.left.right=t.right,t.right.left=t.left,t.parent=y,y.child?(t.left=y.child,t.right=y.child.right,y.child.right=t,t.right.left=t):(y.child=t,t.right=t,t.left=t),y.degree++,t.mark=!1};function i(m,t){var y=Math.floor(Math.log(t)*Y)+1,p=new Array(y),l=0,d=m;if(d)for(l++,d=d.right;d!==m;)l++,d=d.right;for(var r;l>0;){for(var n=d.degree,u=d.right;r=p[n],!!r;){if(V(d.key,r.key)){var a=r;r=d,d=a}e(r,d),p[n]=null,n++}p[n]=d,d=u,l--}m=null;for(var o=0;o{var{addScalar:N,equalScalar:V,FibonacciHeap:Y}=T;function X(){if(!(this instanceof X))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new Y}return X.prototype.type="Spa",X.prototype.isSpa=!0,X.prototype.set=function(J,R){if(this._values[J])this._values[J].value=R;else{var F=this._heap.insert(J,R);this._values[J]=F}},X.prototype.get=function(J){var R=this._values[J];return R?R.value:0},X.prototype.accumulate=function(J,R){var F=this._values[J];F?F.value=N(F.value,R):(F=this._heap.insert(J,R),this._values[J]=F)},X.prototype.forEach=function(J,R,F){var e=this._heap,i=this._values,m=[],t=e.extractMinimum();for(t&&m.push(t);t&&t.key<=R;)t.key>=J&&(V(t.value,0)||F(t.key,t.value,this)),t=e.extractMinimum(),t&&m.push(t);for(var y=0;y{var{on:N,config:V,addScalar:Y,subtract:X,multiplyScalar:J,divideScalar:R,pow:F,abs:e,fix:i,round:m,equal:t,isNumeric:y,format:p,number:l,Complex:d,BigNumber:r,Fraction:n}=T,u=l;function a($,Z){if(!(this instanceof a))throw new Error("Constructor must be called with the new operator");if(!($==null||y($)||Sh($)))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(this.fixPrefix=!1,this.skipAutomaticSimplification=!0,Z===void 0)this.units=[],this.dimensions=S.map(Q=>0);else if(typeof Z=="string"){var K=a.parse(Z);this.units=K.units,this.dimensions=K.dimensions}else if(xh(Z)&&Z.value===null)this.fixPrefix=Z.fixPrefix,this.skipAutomaticSimplification=Z.skipAutomaticSimplification,this.dimensions=Z.dimensions.slice(0),this.units=Z.units.map(Q=>$s({},Q));else throw new TypeError("Second parameter in Unit constructor must be a string or valueless Unit");this.value=this._normalize($)}Object.defineProperty(a,"name",{value:"Unit"}),a.prototype.constructor=a,a.prototype.type="Unit",a.prototype.isUnit=!0;var o,c,s;function b(){for(;s===" "||s===" ";)v()}function g($){return $>="0"&&$<="9"||$==="."}function A($){return $>="0"&&$<="9"}function v(){c++,s=o.charAt(c)}function h($){c=$,s=o.charAt(c)}function x(){var $="",Z=c;if(s==="+"?v():s==="-"&&($+=s,v()),!g(s))return h(Z),null;if(s==="."){if($+=s,v(),!A(s))return h(Z),null}else{for(;A(s);)$+=s,v();s==="."&&($+=s,v())}for(;A(s);)$+=s,v();if(s==="E"||s==="e"){var K="",Q=c;if(K+=s,v(),(s==="+"||s==="-")&&(K+=s,v()),!A(s))return h(Q),$;for($=$+K;A(s);)$+=s,v()}return $}function C(){for(var $="";A(s)||a.isValidAlpha(s);)$+=s,v();var Z=$.charAt(0);return a.isValidAlpha(Z)?$:null}function D($){return s===$?(v(),$):null}a.parse=function($,Z){if(Z=Z||{},o=$,c=-1,s="",typeof o!="string")throw new TypeError("Invalid argument in Unit.parse, string expected");var K=new a;K.units=[];var Q=1,ae=!1;v(),b();var fe=x(),te=null;if(fe){if(V.number==="BigNumber")te=new r(fe);else if(V.number==="Fraction")try{te=new n(fe)}catch{te=parseFloat(fe)}else te=parseFloat(fe);b(),D("*")?(Q=1,ae=!0):D("/")&&(Q=-1,ae=!0)}for(var ne=[],ce=1;;){for(b();s==="(";)ne.push(Q),ce*=Q,Q=1,v(),b();var oe=void 0;if(s){var de=s;if(oe=C(),oe===null)throw new SyntaxError('Unexpected "'+de+'" in "'+o+'" at index '+c.toString())}else break;var we=L(oe);if(we===null)throw new SyntaxError('Unit "'+oe+'" not found.');var Se=Q*ce;if(b(),D("^")){b();var Te=x();if(Te===null)throw new SyntaxError('In "'+$+'", "^" must be followed by a floating-point number');Se*=Te}K.units.push({unit:we.unit,prefix:we.prefix,power:Se});for(var Fe=0;Fe1||Math.abs(this.units[0].power-1)>1e-15},a.prototype._normalize=function($){if($==null||this.units.length===0)return $;for(var Z=$,K=a._getNumberConverter(wo($)),Q=0;Q{if(ka(O,$)){var Z=O[$],K=Z.prefixes[""];return{unit:Z,prefix:K}}for(var Q in O)if(ka(O,Q)&&vF($,Q)){var ae=O[Q],fe=$.length-Q.length,te=$.substring(0,fe),ne=ka(ae.prefixes,te)?ae.prefixes[te]:void 0;if(ne!==void 0)return{unit:ae,prefix:ne}}return null},{hasher:$=>$[0],limit:100});a.isValuelessUnit=function($){return L($)!==null},a.prototype.hasBase=function($){if(typeof $=="string"&&($=f[$]),!$)return!1;for(var Z=0;Z1e-12)return!1;return!0},a.prototype.equalBase=function($){for(var Z=0;Z1e-12)return!1;return!0},a.prototype.equals=function($){return this.equalBase($)&&t(this.value,$.value)},a.prototype.multiply=function($){for(var Z=this.clone(),K=xh($)?$:new a($),Q=0;Q1e-12&&(ka(H,ne)?Z.push({unit:H[ne].unit,prefix:H[ne].prefix,power:$.dimensions[te]||0}):fe=!0)}Z.length<$.units.length&&!fe&&($.units=Z)}}return $},a.prototype.toSI=function(){for(var $=this.clone(),Z=[],K=0;K1e-12)if(ka(U.si,Q))Z.push({unit:U.si[Q].unit,prefix:U.si[Q].prefix,power:$.dimensions[K]||0});else throw new Error("Cannot express custom unit "+Q+" in SI units")}return $.units=Z,$.fixPrefix=!0,$.skipAutomaticSimplification=!0,$},a.prototype.formatUnits=function(){for(var $="",Z="",K=0,Q=0,ae=0;ae0?(K++,$+=" "+this.units[ae].prefix.name+this.units[ae].unit.name,Math.abs(this.units[ae].power-1)>1e-15&&($+="^"+this.units[ae].power)):this.units[ae].power<0&&Q++;if(Q>0)for(var fe=0;fe0?(Z+=" "+this.units[fe].prefix.name+this.units[fe].unit.name,Math.abs(this.units[fe].power+1)>1e-15&&(Z+="^"+-this.units[fe].power)):(Z+=" "+this.units[fe].prefix.name+this.units[fe].unit.name,Z+="^"+this.units[fe].power));$=$.substr(1),Z=Z.substr(1),K>1&&Q>0&&($="("+$+")"),Q>1&&K>0&&(Z="("+Z+")");var te=$;return K>0&&Q>0&&(te+=" / "),te+=Z,te},a.prototype.format=function($){var Z=this.skipAutomaticSimplification||this.value===null?this.clone():this.simplify(),K=!1;typeof Z.value<"u"&&Z.value!==null&&Sh(Z.value)&&(K=Math.abs(Z.value.re)<1e-14);for(var Q in Z.units)ka(Z.units,Q)&&Z.units[Q].unit&&(Z.units[Q].unit.name==="VA"&&K?Z.units[Q].unit=O.VAR:Z.units[Q].unit.name==="VAR"&&!K&&(Z.units[Q].unit=O.VA));Z.units.length===1&&!Z.fixPrefix&&Math.abs(Z.units[0].power-Math.round(Z.units[0].power))<1e-14&&(Z.units[0].prefix=Z._bestPrefix());var ae=Z._denormalize(Z.value),fe=Z.value!==null?p(ae,$||{}):"",te=Z.formatUnits();return Z.value&&Sh(Z.value)&&(fe="("+fe+")"),te.length>0&&fe.length>0&&(fe+=" "),fe+=te,fe},a.prototype._bestPrefix=function(){if(this.units.length!==1)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var $=this.value!==null?e(this.value):0,Z=e(this.units[0].unit.value),K=this.units[0].prefix;if($===0)return K;var Q=this.units[0].power,ae=Math.log($/Math.pow(K.value*Z,Q))/Math.LN10-1.2;if(ae>-2.200001&&ae<1.800001)return K;ae=Math.abs(ae);var fe=this.units[0].unit.prefixes;for(var te in fe)if(ka(fe,te)){var ne=fe[te];if(ne.scientific){var ce=Math.abs(Math.log($/Math.pow(ne.value*Z,Q))/Math.LN10-1.2);(ce0)},O={meter:{name:"meter",base:f.LENGTH,prefixes:M.LONG,value:1,offset:0},inch:{name:"inch",base:f.LENGTH,prefixes:M.NONE,value:.0254,offset:0},foot:{name:"foot",base:f.LENGTH,prefixes:M.NONE,value:.3048,offset:0},yard:{name:"yard",base:f.LENGTH,prefixes:M.NONE,value:.9144,offset:0},mile:{name:"mile",base:f.LENGTH,prefixes:M.NONE,value:1609.344,offset:0},link:{name:"link",base:f.LENGTH,prefixes:M.NONE,value:.201168,offset:0},rod:{name:"rod",base:f.LENGTH,prefixes:M.NONE,value:5.0292,offset:0},chain:{name:"chain",base:f.LENGTH,prefixes:M.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:f.LENGTH,prefixes:M.NONE,value:1e-10,offset:0},m:{name:"m",base:f.LENGTH,prefixes:M.SHORT,value:1,offset:0},in:{name:"in",base:f.LENGTH,prefixes:M.NONE,value:.0254,offset:0},ft:{name:"ft",base:f.LENGTH,prefixes:M.NONE,value:.3048,offset:0},yd:{name:"yd",base:f.LENGTH,prefixes:M.NONE,value:.9144,offset:0},mi:{name:"mi",base:f.LENGTH,prefixes:M.NONE,value:1609.344,offset:0},li:{name:"li",base:f.LENGTH,prefixes:M.NONE,value:.201168,offset:0},rd:{name:"rd",base:f.LENGTH,prefixes:M.NONE,value:5.02921,offset:0},ch:{name:"ch",base:f.LENGTH,prefixes:M.NONE,value:20.1168,offset:0},mil:{name:"mil",base:f.LENGTH,prefixes:M.NONE,value:254e-7,offset:0},m2:{name:"m2",base:f.SURFACE,prefixes:M.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:f.SURFACE,prefixes:M.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:f.SURFACE,prefixes:M.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:f.SURFACE,prefixes:M.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:f.SURFACE,prefixes:M.NONE,value:2589988110336e-6,offset:0},sqrd:{name:"sqrd",base:f.SURFACE,prefixes:M.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:f.SURFACE,prefixes:M.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:f.SURFACE,prefixes:M.NONE,value:64516e-14,offset:0},acre:{name:"acre",base:f.SURFACE,prefixes:M.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:f.SURFACE,prefixes:M.NONE,value:1e4,offset:0},m3:{name:"m3",base:f.VOLUME,prefixes:M.CUBIC,value:1,offset:0},L:{name:"L",base:f.VOLUME,prefixes:M.SHORT,value:.001,offset:0},l:{name:"l",base:f.VOLUME,prefixes:M.SHORT,value:.001,offset:0},litre:{name:"litre",base:f.VOLUME,prefixes:M.LONG,value:.001,offset:0},cuin:{name:"cuin",base:f.VOLUME,prefixes:M.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:f.VOLUME,prefixes:M.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:f.VOLUME,prefixes:M.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:f.VOLUME,prefixes:M.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:f.VOLUME,prefixes:M.NONE,value:15e-6,offset:0},drop:{name:"drop",base:f.VOLUME,prefixes:M.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:f.VOLUME,prefixes:M.NONE,value:5e-8,offset:0},minim:{name:"minim",base:f.VOLUME,prefixes:M.NONE,value:6161152e-14,offset:0},fluiddram:{name:"fluiddram",base:f.VOLUME,prefixes:M.NONE,value:36966911e-13,offset:0},fluidounce:{name:"fluidounce",base:f.VOLUME,prefixes:M.NONE,value:2957353e-11,offset:0},gill:{name:"gill",base:f.VOLUME,prefixes:M.NONE,value:.0001182941,offset:0},cc:{name:"cc",base:f.VOLUME,prefixes:M.NONE,value:1e-6,offset:0},cup:{name:"cup",base:f.VOLUME,prefixes:M.NONE,value:.0002365882,offset:0},pint:{name:"pint",base:f.VOLUME,prefixes:M.NONE,value:.0004731765,offset:0},quart:{name:"quart",base:f.VOLUME,prefixes:M.NONE,value:.0009463529,offset:0},gallon:{name:"gallon",base:f.VOLUME,prefixes:M.NONE,value:.003785412,offset:0},beerbarrel:{name:"beerbarrel",base:f.VOLUME,prefixes:M.NONE,value:.1173478,offset:0},oilbarrel:{name:"oilbarrel",base:f.VOLUME,prefixes:M.NONE,value:.1589873,offset:0},hogshead:{name:"hogshead",base:f.VOLUME,prefixes:M.NONE,value:.238481,offset:0},fldr:{name:"fldr",base:f.VOLUME,prefixes:M.NONE,value:36966911e-13,offset:0},floz:{name:"floz",base:f.VOLUME,prefixes:M.NONE,value:2957353e-11,offset:0},gi:{name:"gi",base:f.VOLUME,prefixes:M.NONE,value:.0001182941,offset:0},cp:{name:"cp",base:f.VOLUME,prefixes:M.NONE,value:.0002365882,offset:0},pt:{name:"pt",base:f.VOLUME,prefixes:M.NONE,value:.0004731765,offset:0},qt:{name:"qt",base:f.VOLUME,prefixes:M.NONE,value:.0009463529,offset:0},gal:{name:"gal",base:f.VOLUME,prefixes:M.NONE,value:.003785412,offset:0},bbl:{name:"bbl",base:f.VOLUME,prefixes:M.NONE,value:.1173478,offset:0},obl:{name:"obl",base:f.VOLUME,prefixes:M.NONE,value:.1589873,offset:0},g:{name:"g",base:f.MASS,prefixes:M.SHORT,value:.001,offset:0},gram:{name:"gram",base:f.MASS,prefixes:M.LONG,value:.001,offset:0},ton:{name:"ton",base:f.MASS,prefixes:M.SHORT,value:907.18474,offset:0},t:{name:"t",base:f.MASS,prefixes:M.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:f.MASS,prefixes:M.LONG,value:1e3,offset:0},grain:{name:"grain",base:f.MASS,prefixes:M.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:f.MASS,prefixes:M.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:f.MASS,prefixes:M.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:f.MASS,prefixes:M.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:f.MASS,prefixes:M.NONE,value:45.359237,offset:0},stick:{name:"stick",base:f.MASS,prefixes:M.NONE,value:.115,offset:0},stone:{name:"stone",base:f.MASS,prefixes:M.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:f.MASS,prefixes:M.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:f.MASS,prefixes:M.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:f.MASS,prefixes:M.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:f.MASS,prefixes:M.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:f.MASS,prefixes:M.NONE,value:45.359237,offset:0},s:{name:"s",base:f.TIME,prefixes:M.SHORT,value:1,offset:0},min:{name:"min",base:f.TIME,prefixes:M.NONE,value:60,offset:0},h:{name:"h",base:f.TIME,prefixes:M.NONE,value:3600,offset:0},second:{name:"second",base:f.TIME,prefixes:M.LONG,value:1,offset:0},sec:{name:"sec",base:f.TIME,prefixes:M.LONG,value:1,offset:0},minute:{name:"minute",base:f.TIME,prefixes:M.NONE,value:60,offset:0},hour:{name:"hour",base:f.TIME,prefixes:M.NONE,value:3600,offset:0},day:{name:"day",base:f.TIME,prefixes:M.NONE,value:86400,offset:0},week:{name:"week",base:f.TIME,prefixes:M.NONE,value:7*86400,offset:0},month:{name:"month",base:f.TIME,prefixes:M.NONE,value:2629800,offset:0},year:{name:"year",base:f.TIME,prefixes:M.NONE,value:31557600,offset:0},decade:{name:"decade",base:f.TIME,prefixes:M.NONE,value:315576e3,offset:0},century:{name:"century",base:f.TIME,prefixes:M.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:f.TIME,prefixes:M.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:f.FREQUENCY,prefixes:M.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:f.FREQUENCY,prefixes:M.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:f.ANGLE,prefixes:M.SHORT,value:1,offset:0},radian:{name:"radian",base:f.ANGLE,prefixes:M.LONG,value:1,offset:0},deg:{name:"deg",base:f.ANGLE,prefixes:M.SHORT,value:null,offset:0},degree:{name:"degree",base:f.ANGLE,prefixes:M.LONG,value:null,offset:0},grad:{name:"grad",base:f.ANGLE,prefixes:M.SHORT,value:null,offset:0},gradian:{name:"gradian",base:f.ANGLE,prefixes:M.LONG,value:null,offset:0},cycle:{name:"cycle",base:f.ANGLE,prefixes:M.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:f.ANGLE,prefixes:M.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:f.ANGLE,prefixes:M.NONE,value:null,offset:0},A:{name:"A",base:f.CURRENT,prefixes:M.SHORT,value:1,offset:0},ampere:{name:"ampere",base:f.CURRENT,prefixes:M.LONG,value:1,offset:0},K:{name:"K",base:f.TEMPERATURE,prefixes:M.SHORT,value:1,offset:0},degC:{name:"degC",base:f.TEMPERATURE,prefixes:M.SHORT,value:1,offset:273.15},degF:{name:"degF",base:f.TEMPERATURE,prefixes:M.SHORT,value:1/1.8,offset:459.67},degR:{name:"degR",base:f.TEMPERATURE,prefixes:M.SHORT,value:1/1.8,offset:0},kelvin:{name:"kelvin",base:f.TEMPERATURE,prefixes:M.LONG,value:1,offset:0},celsius:{name:"celsius",base:f.TEMPERATURE,prefixes:M.LONG,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:f.TEMPERATURE,prefixes:M.LONG,value:1/1.8,offset:459.67},rankine:{name:"rankine",base:f.TEMPERATURE,prefixes:M.LONG,value:1/1.8,offset:0},mol:{name:"mol",base:f.AMOUNT_OF_SUBSTANCE,prefixes:M.SHORT,value:1,offset:0},mole:{name:"mole",base:f.AMOUNT_OF_SUBSTANCE,prefixes:M.LONG,value:1,offset:0},cd:{name:"cd",base:f.LUMINOUS_INTENSITY,prefixes:M.SHORT,value:1,offset:0},candela:{name:"candela",base:f.LUMINOUS_INTENSITY,prefixes:M.LONG,value:1,offset:0},N:{name:"N",base:f.FORCE,prefixes:M.SHORT,value:1,offset:0},newton:{name:"newton",base:f.FORCE,prefixes:M.LONG,value:1,offset:0},dyn:{name:"dyn",base:f.FORCE,prefixes:M.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:f.FORCE,prefixes:M.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:f.FORCE,prefixes:M.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:f.FORCE,prefixes:M.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:f.FORCE,prefixes:M.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:f.FORCE,prefixes:M.NONE,value:9.80665,offset:0},J:{name:"J",base:f.ENERGY,prefixes:M.SHORT,value:1,offset:0},joule:{name:"joule",base:f.ENERGY,prefixes:M.SHORT,value:1,offset:0},erg:{name:"erg",base:f.ENERGY,prefixes:M.NONE,value:1e-7,offset:0},Wh:{name:"Wh",base:f.ENERGY,prefixes:M.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:f.ENERGY,prefixes:M.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:f.ENERGY,prefixes:M.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:f.ENERGY,prefixes:M.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:f.POWER,prefixes:M.SHORT,value:1,offset:0},watt:{name:"watt",base:f.POWER,prefixes:M.LONG,value:1,offset:0},hp:{name:"hp",base:f.POWER,prefixes:M.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:f.POWER,prefixes:M.SHORT,value:d.I,offset:0},VA:{name:"VA",base:f.POWER,prefixes:M.SHORT,value:1,offset:0},Pa:{name:"Pa",base:f.PRESSURE,prefixes:M.SHORT,value:1,offset:0},psi:{name:"psi",base:f.PRESSURE,prefixes:M.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:f.PRESSURE,prefixes:M.NONE,value:101325,offset:0},bar:{name:"bar",base:f.PRESSURE,prefixes:M.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:f.PRESSURE,prefixes:M.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:f.PRESSURE,prefixes:M.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:f.PRESSURE,prefixes:M.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:f.PRESSURE,prefixes:M.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:f.ELECTRIC_CHARGE,prefixes:M.LONG,value:1,offset:0},C:{name:"C",base:f.ELECTRIC_CHARGE,prefixes:M.SHORT,value:1,offset:0},farad:{name:"farad",base:f.ELECTRIC_CAPACITANCE,prefixes:M.LONG,value:1,offset:0},F:{name:"F",base:f.ELECTRIC_CAPACITANCE,prefixes:M.SHORT,value:1,offset:0},volt:{name:"volt",base:f.ELECTRIC_POTENTIAL,prefixes:M.LONG,value:1,offset:0},V:{name:"V",base:f.ELECTRIC_POTENTIAL,prefixes:M.SHORT,value:1,offset:0},ohm:{name:"ohm",base:f.ELECTRIC_RESISTANCE,prefixes:M.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:f.ELECTRIC_INDUCTANCE,prefixes:M.LONG,value:1,offset:0},H:{name:"H",base:f.ELECTRIC_INDUCTANCE,prefixes:M.SHORT,value:1,offset:0},siemens:{name:"siemens",base:f.ELECTRIC_CONDUCTANCE,prefixes:M.LONG,value:1,offset:0},S:{name:"S",base:f.ELECTRIC_CONDUCTANCE,prefixes:M.SHORT,value:1,offset:0},weber:{name:"weber",base:f.MAGNETIC_FLUX,prefixes:M.LONG,value:1,offset:0},Wb:{name:"Wb",base:f.MAGNETIC_FLUX,prefixes:M.SHORT,value:1,offset:0},tesla:{name:"tesla",base:f.MAGNETIC_FLUX_DENSITY,prefixes:M.LONG,value:1,offset:0},T:{name:"T",base:f.MAGNETIC_FLUX_DENSITY,prefixes:M.SHORT,value:1,offset:0},b:{name:"b",base:f.BIT,prefixes:M.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:f.BIT,prefixes:M.BINARY_LONG,value:1,offset:0},B:{name:"B",base:f.BIT,prefixes:M.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:f.BIT,prefixes:M.BINARY_LONG,value:8,offset:0}},G={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fluiddrams:"fluiddram",fluidounces:"fluidounce",gills:"gill",cups:"cup",pints:"pint",quarts:"quart",gallons:"gallon",beerbarrels:"beerbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",kgf:"kilogramforce",acres:"acre",hectares:"hectare",sqfeet:"sqft",sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",amps:"ampere",amp:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function z($){if($.number==="BigNumber"){var Z=F3(r);O.rad.value=new r(1),O.deg.value=Z.div(180),O.grad.value=Z.div(200),O.cycle.value=Z.times(2),O.arcsec.value=Z.div(648e3),O.arcmin.value=Z.div(10800)}else O.rad.value=1,O.deg.value=Math.PI/180,O.grad.value=Math.PI/200,O.cycle.value=Math.PI*2,O.arcsec.value=Math.PI/648e3,O.arcmin.value=Math.PI/10800;O.radian.value=O.rad.value,O.degree.value=O.deg.value,O.gradian.value=O.grad.value}z(V),N&&N("config",function($,Z){$.number!==Z.number&&z($)});var U={si:{NONE:{unit:k,prefix:M.NONE[""]},LENGTH:{unit:O.m,prefix:M.SHORT[""]},MASS:{unit:O.g,prefix:M.SHORT.k},TIME:{unit:O.s,prefix:M.SHORT[""]},CURRENT:{unit:O.A,prefix:M.SHORT[""]},TEMPERATURE:{unit:O.K,prefix:M.SHORT[""]},LUMINOUS_INTENSITY:{unit:O.cd,prefix:M.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:O.mol,prefix:M.SHORT[""]},ANGLE:{unit:O.rad,prefix:M.SHORT[""]},BIT:{unit:O.bits,prefix:M.SHORT[""]},FORCE:{unit:O.N,prefix:M.SHORT[""]},ENERGY:{unit:O.J,prefix:M.SHORT[""]},POWER:{unit:O.W,prefix:M.SHORT[""]},PRESSURE:{unit:O.Pa,prefix:M.SHORT[""]},ELECTRIC_CHARGE:{unit:O.C,prefix:M.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:O.F,prefix:M.SHORT[""]},ELECTRIC_POTENTIAL:{unit:O.V,prefix:M.SHORT[""]},ELECTRIC_RESISTANCE:{unit:O.ohm,prefix:M.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:O.H,prefix:M.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:O.S,prefix:M.SHORT[""]},MAGNETIC_FLUX:{unit:O.Wb,prefix:M.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:O.T,prefix:M.SHORT[""]},FREQUENCY:{unit:O.Hz,prefix:M.SHORT[""]}}};U.cgs=JSON.parse(JSON.stringify(U.si)),U.cgs.LENGTH={unit:O.m,prefix:M.SHORT.c},U.cgs.MASS={unit:O.g,prefix:M.SHORT[""]},U.cgs.FORCE={unit:O.dyn,prefix:M.SHORT[""]},U.cgs.ENERGY={unit:O.erg,prefix:M.NONE[""]},U.us=JSON.parse(JSON.stringify(U.si)),U.us.LENGTH={unit:O.ft,prefix:M.NONE[""]},U.us.MASS={unit:O.lbm,prefix:M.NONE[""]},U.us.TEMPERATURE={unit:O.degF,prefix:M.NONE[""]},U.us.FORCE={unit:O.lbf,prefix:M.NONE[""]},U.us.ENERGY={unit:O.BTU,prefix:M.BTU[""]},U.us.POWER={unit:O.hp,prefix:M.NONE[""]},U.us.PRESSURE={unit:O.psi,prefix:M.NONE[""]},U.auto=JSON.parse(JSON.stringify(U.si));var H=U.auto;a.setUnitSystem=function($){if(ka(U,$))H=U[$];else throw new Error("Unit system "+$+" does not exist. Choices are: "+Object.keys(U).join(", "))},a.getUnitSystem=function(){for(var $ in U)if(ka(U,$)&&U[$]===H)return $},a.typeConverters={BigNumber:function(Z){return new r(Z+"")},Fraction:function(Z){return new n(Z)},Complex:function(Z){return Z},number:function(Z){return Z}},a.prototype._numberConverter=function(){var $=a.typeConverters[this.valueType()];if($)return $;throw new TypeError('Unsupported Unit value type "'+this.valueType()+'"')},a._getNumberConverter=function($){if(!a.typeConverters[$])throw new TypeError('Unsupported type "'+$+'"');return a.typeConverters[$]};for(var B in O)if(ka(O,B)){var W=O[B];W.dimensions=W.base.dimensions}for(var q in G)if(ka(G,q)){var re=O[G[q]],ie={};for(var le in re)ka(re,le)&&(ie[le]=re[le]);ie.name=q,O[q]=ie}a.isValidAlpha=function(Z){return/^[a-zA-Z]$/.test(Z)};function he($){for(var Z=0;Z<$.length;Z++){if(s=$.charAt(Z),Z===0&&!a.isValidAlpha(s))throw new Error('Invalid unit name (must begin with alpha character): "'+$+'"');if(Z>0&&!(a.isValidAlpha(s)||A(s)))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+$+'"')}}return a.createUnit=function($,Z){if(typeof $!="object")throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(Z&&Z.override){for(var K in $)if(ka($,K)&&a.deleteUnit(K),$[K].aliases)for(var Q=0;Q<$[K].aliases.length;Q++)a.deleteUnit($[K].aliases[Q])}var ae;for(var fe in $)ka($,fe)&&(ae=a.createUnitSingle(fe,$[fe]));return ae},a.createUnitSingle=function($,Z){if((typeof Z>"u"||Z===null)&&(Z={}),typeof $!="string")throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if(ka(O,$))throw new Error('Cannot create unit "'+$+'": a unit with that name already exists');he($);var K=null,Q=[],ae=0,fe,te,ne;if(Z&&Z.type==="Unit")K=Z.clone();else if(typeof Z=="string")Z!==""&&(fe=Z);else if(typeof Z=="object")fe=Z.definition,te=Z.prefixes,ae=Z.offset,ne=Z.baseName,Z.aliases&&(Q=Z.aliases.valueOf());else throw new TypeError('Cannot create unit "'+$+'" from "'+Z.toString()+'": expecting "string" or "Unit" or "Object"');if(Q){for(var ce=0;ce1e-12){Ie=!1;break}if(Ie){Te=!0,oe.base=f[Fe];break}}if(!Te){ne=ne||$+"_STUFF";var Ae={dimensions:K.dimensions.slice(0)};Ae.key=ne,f[ne]=Ae,H[ne]={unit:oe,prefix:M.NONE[""]},oe.base=f[ne]}}else{if(ne=ne||$+"_STUFF",S.indexOf(ne)>=0)throw new Error('Cannot create new base unit "'+$+'": a base unit with that name already exists (and cannot be overridden)');S.push(ne);for(var de in f)ka(f,de)&&(f[de].dimensions[S.length-1]=0);for(var we={dimensions:[]},Se=0;Se{var{typed:N,Unit:V}=T;return N(H4,{Unit:function(X){return X.clone()},string:function(X){return V.isValuelessUnit(X)?new V(null,X):V.parse(X,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string | Unit":function(X,J){return new V(X,J)},"number | BigNumber | Fraction":function(X){return new V(X)},"Array | Matrix":N.referToSelf(Y=>X=>wi(X,Y))})}),V4="sparse",AH=["typed","SparseMatrix"],TH=Lr(V4,AH,T=>{var{typed:N,SparseMatrix:V}=T;return N(V4,{"":function(){return new V([])},string:function(X){return new V([],X)},"Array | Matrix":function(X){return new V(X)},"Array | Matrix, string":function(X,J){return new V(X,J)}})}),G4="createUnit",MH=["typed","Unit"],SH=Lr(G4,MH,T=>{var{typed:N,Unit:V}=T;return N(G4,{"Object, Object":function(X,J){return V.createUnit(X,J)},Object:function(X){return V.createUnit(X,{})},"string, Unit | string | Object, Object":function(X,J,R){var F={};return F[X]=J,V.createUnit(F,R)},"string, Unit | string | Object":function(X,J){var R={};return R[X]=J,V.createUnit(R,{})},string:function(X){var J={};return J[X]={},V.createUnit(J,{})}})}),W4="acos",EH=["typed","config","Complex"],CH=Lr(W4,EH,T=>{var{typed:N,config:V,Complex:Y}=T;return N(W4,{number:function(J){return J>=-1&&J<=1||V.predictable?Math.acos(J):new Y(J,0).acos()},Complex:function(J){return J.acos()},BigNumber:function(J){return J.acos()}})}),Y4="acosh",DH=["typed","config","Complex"],LH=Lr(Y4,DH,T=>{var{typed:N,config:V,Complex:Y}=T;return N(Y4,{number:function(J){return J>=1||V.predictable?sC(J):J<=-1?new Y(Math.log(Math.sqrt(J*J-1)-J),Math.PI):new Y(J,0).acosh()},Complex:function(J){return J.acosh()},BigNumber:function(J){return J.acosh()}})}),Z4="acot",PH=["typed","BigNumber"],NH=Lr(Z4,PH,T=>{var{typed:N,BigNumber:V}=T;return N(Z4,{number:lC,Complex:function(X){return X.acot()},BigNumber:function(X){return new V(1).div(X).atan()}})}),X4="acoth",RH=["typed","config","Complex","BigNumber"],FH=Lr(X4,RH,T=>{var{typed:N,config:V,Complex:Y,BigNumber:X}=T;return N(X4,{number:function(R){return R>=1||R<=-1||V.predictable?uC(R):new Y(R,0).acoth()},Complex:function(R){return R.acoth()},BigNumber:function(R){return new X(1).div(R).atanh()}})}),j4="acsc",IH=["typed","config","Complex","BigNumber"],_H=Lr(j4,IH,T=>{var{typed:N,config:V,Complex:Y,BigNumber:X}=T;return N(j4,{number:function(R){return R<=-1||R>=1||V.predictable?fC(R):new Y(R,0).acsc()},Complex:function(R){return R.acsc()},BigNumber:function(R){return new X(1).div(R).asin()}})}),$4="acsch",OH=["typed","BigNumber"],zH=Lr($4,OH,T=>{var{typed:N,BigNumber:V}=T;return N($4,{number:cC,Complex:function(X){return X.acsch()},BigNumber:function(X){return new V(1).div(X).asinh()}})}),K4="asec",kH=["typed","config","Complex","BigNumber"],BH=Lr(K4,kH,T=>{var{typed:N,config:V,Complex:Y,BigNumber:X}=T;return N(K4,{number:function(R){return R<=-1||R>=1||V.predictable?hC(R):new Y(R,0).asec()},Complex:function(R){return R.asec()},BigNumber:function(R){return new X(1).div(R).acos()}})}),J4="asech",UH=["typed","config","Complex","BigNumber"],HH=Lr(J4,UH,T=>{var{typed:N,config:V,Complex:Y,BigNumber:X}=T;return N(J4,{number:function(R){if(R<=1&&R>=-1||V.predictable){var F=1/R;if(F>0||V.predictable)return vC(R);var e=Math.sqrt(F*F-1);return new Y(Math.log(e-F),Math.PI)}return new Y(R,0).asech()},Complex:function(R){return R.asech()},BigNumber:function(R){return new X(1).div(R).acosh()}})}),Q4="asin",VH=["typed","config","Complex"],GH=Lr(Q4,VH,T=>{var{typed:N,config:V,Complex:Y}=T;return N(Q4,{number:function(J){return J>=-1&&J<=1||V.predictable?Math.asin(J):new Y(J,0).asin()},Complex:function(J){return J.asin()},BigNumber:function(J){return J.asin()}})}),WH="asinh",YH=["typed"],ZH=Lr(WH,YH,T=>{var{typed:N}=T;return N("asinh",{number:dC,Complex:function(Y){return Y.asinh()},BigNumber:function(Y){return Y.asinh()}})}),XH="atan",jH=["typed"],$H=Lr(XH,jH,T=>{var{typed:N}=T;return N("atan",{number:function(Y){return Math.atan(Y)},Complex:function(Y){return Y.atan()},BigNumber:function(Y){return Y.atan()}})}),q4="atan2",KH=["typed","matrix","equalScalar","BigNumber","DenseMatrix","concat"],JH=Lr(q4,KH,T=>{var{typed:N,matrix:V,equalScalar:Y,BigNumber:X,DenseMatrix:J,concat:R}=T,F=Qf({typed:N,equalScalar:Y}),e=Vl({typed:N}),i=DC({typed:N,equalScalar:Y}),m=qs({typed:N,equalScalar:Y}),t=Ss({typed:N,DenseMatrix:J}),y=fo({typed:N,matrix:V,concat:R});return N(q4,{"number, number":Math.atan2,"BigNumber, BigNumber":(p,l)=>X.atan2(p,l)},y({scalar:"number | BigNumber",SS:i,DS:e,SD:F,Ss:m,sS:t}))}),eM="atanh",QH=["typed","config","Complex"],qH=Lr(eM,QH,T=>{var{typed:N,config:V,Complex:Y}=T;return N(eM,{number:function(J){return J<=1&&J>=-1||V.predictable?pC(J):new Y(J,0).atanh()},Complex:function(J){return J.atanh()},BigNumber:function(J){return J.atanh()}})}),x0=Lr("trigUnit",["typed"],T=>{var{typed:N}=T;return{Unit:N.referToSelf(V=>Y=>{if(!Y.hasBase(Y.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return N.find(V,Y.valueType())(Y.value)})}}),tM="cos",eV=["typed"],tV=Lr(tM,eV,T=>{var{typed:N}=T,V=x0({typed:N});return N(tM,{number:Math.cos,"Complex | BigNumber":Y=>Y.cos()},V)}),rM="cosh",rV=["typed"],nV=Lr(rM,rV,T=>{var{typed:N}=T;return N(rM,{number:oF,"Complex | BigNumber":V=>V.cosh()})}),nM="cot",aV=["typed","BigNumber"],iV=Lr(nM,aV,T=>{var{typed:N,BigNumber:V}=T,Y=x0({typed:N});return N(nM,{number:gC,Complex:X=>X.cot(),BigNumber:X=>new V(1).div(X.tan())},Y)}),aM="coth",oV=["typed","BigNumber"],sV=Lr(aM,oV,T=>{var{typed:N,BigNumber:V}=T;return N(aM,{number:mC,Complex:Y=>Y.coth(),BigNumber:Y=>new V(1).div(Y.tanh())})}),iM="csc",lV=["typed","BigNumber"],uV=Lr(iM,lV,T=>{var{typed:N,BigNumber:V}=T,Y=x0({typed:N});return N(iM,{number:yC,Complex:X=>X.csc(),BigNumber:X=>new V(1).div(X.sin())},Y)}),oM="csch",fV=["typed","BigNumber"],cV=Lr(oM,fV,T=>{var{typed:N,BigNumber:V}=T;return N(oM,{number:xC,Complex:Y=>Y.csch(),BigNumber:Y=>new V(1).div(Y.sinh())})}),sM="sec",hV=["typed","BigNumber"],vV=Lr(sM,hV,T=>{var{typed:N,BigNumber:V}=T,Y=x0({typed:N});return N(sM,{number:bC,Complex:X=>X.sec(),BigNumber:X=>new V(1).div(X.cos())},Y)}),lM="sech",dV=["typed","BigNumber"],pV=Lr(lM,dV,T=>{var{typed:N,BigNumber:V}=T;return N(lM,{number:wC,Complex:Y=>Y.sech(),BigNumber:Y=>new V(1).div(Y.cosh())})}),uM="sin",gV=["typed"],mV=Lr(uM,gV,T=>{var{typed:N}=T,V=x0({typed:N});return N(uM,{number:Math.sin,"Complex | BigNumber":Y=>Y.sin()},V)}),fM="sinh",yV=["typed"],xV=Lr(fM,yV,T=>{var{typed:N}=T;return N(fM,{number:AC,"Complex | BigNumber":V=>V.sinh()})}),cM="tan",bV=["typed"],wV=Lr(cM,bV,T=>{var{typed:N}=T,V=x0({typed:N});return N(cM,{number:Math.tan,"Complex | BigNumber":Y=>Y.tan()},V)}),AV="tanh",TV=["typed"],MV=Lr(AV,TV,T=>{var{typed:N}=T;return N("tanh",{number:lF,"Complex | BigNumber":V=>V.tanh()})}),hM="setCartesian",SV=["typed","size","subset","compareNatural","Index","DenseMatrix"],EV=Lr(hM,SV,T=>{var{typed:N,size:V,subset:Y,compareNatural:X,Index:J,DenseMatrix:R}=T;return N(hM,{"Array | Matrix, Array | Matrix":function(e,i){var m=[];if(Y(V(e),new J(0))!==0&&Y(V(i),new J(0))!==0){var t=Ui(Array.isArray(e)?e:e.toArray()).sort(X),y=Ui(Array.isArray(i)?i:i.toArray()).sort(X);m=[];for(var p=0;p{var{typed:N,size:V,subset:Y,compareNatural:X,Index:J,DenseMatrix:R}=T;return N(vM,{"Array | Matrix, Array | Matrix":function(e,i){var m;if(Y(V(e),new J(0))===0)m=[];else{if(Y(V(i),new J(0))===0)return Ui(e.toArray());var t=o0(Ui(Array.isArray(e)?e:e.toArray()).sort(X)),y=o0(Ui(Array.isArray(i)?i:i.toArray()).sort(X));m=[];for(var p,l=0;l{var{typed:N,size:V,subset:Y,compareNatural:X,Index:J,DenseMatrix:R}=T;return N(dM,{"Array | Matrix":function(e){var i;if(Y(V(e),new J(0))===0)i=[];else{var m=Ui(Array.isArray(e)?e:e.toArray()).sort(X);i=[],i.push(m[0]);for(var t=1;t{var{typed:N,size:V,subset:Y,compareNatural:X,Index:J,DenseMatrix:R}=T;return N(pM,{"Array | Matrix, Array | Matrix":function(e,i){var m;if(Y(V(e),new J(0))===0||Y(V(i),new J(0))===0)m=[];else{var t=o0(Ui(Array.isArray(e)?e:e.toArray()).sort(X)),y=o0(Ui(Array.isArray(i)?i:i.toArray()).sort(X));m=[];for(var p=0;p{var{typed:N,size:V,subset:Y,compareNatural:X,Index:J}=T;return N(gM,{"Array | Matrix, Array | Matrix":function(F,e){if(Y(V(F),new J(0))===0)return!0;if(Y(V(e),new J(0))===0)return!1;for(var i=o0(Ui(Array.isArray(F)?F:F.toArray()).sort(X)),m=o0(Ui(Array.isArray(e)?e:e.toArray()).sort(X)),t,y=0;y{var{typed:N,size:V,subset:Y,compareNatural:X,Index:J}=T;return N(mM,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(F,e){if(Y(V(e),new J(0))===0)return 0;for(var i=Ui(Array.isArray(e)?e:e.toArray()),m=0,t=0;t{var{typed:N,size:V,subset:Y,compareNatural:X,Index:J}=T;return N(yM,{"Array | Matrix":function(i){if(Y(V(i),new J(0))===0)return[];for(var m=Ui(Array.isArray(i)?i:i.toArray()).sort(X),t=[],y=0;y.toString(2).length<=m.length;)t.push(R(m,y.toString(2).split("").reverse())),y++;return F(t)}});function R(e,i){for(var m=[],t=0;t0;m--)for(var t=0;te[t+1].length&&(i=e[t],e[t]=e[t+1],e[t+1]=i);return e}}),xM="setSize",BV=["typed","compareNatural"],UV=Lr(xM,BV,T=>{var{typed:N,compareNatural:V}=T;return N(xM,{"Array | Matrix":function(X){return Array.isArray(X)?Ui(X).length:Ui(X.toArray()).length},"Array | Matrix, boolean":function(X,J){if(J===!1||X.length===0)return Array.isArray(X)?Ui(X).length:Ui(X.toArray()).length;for(var R=Ui(Array.isArray(X)?X:X.toArray()).sort(V),F=1,e=1;e{var{typed:N,size:V,concat:Y,subset:X,setDifference:J,Index:R}=T;return N(bM,{"Array | Matrix, Array | Matrix":function(e,i){if(X(V(e),new R(0))===0)return Ui(i);if(X(V(i),new R(0))===0)return Ui(e);var m=Ui(e),t=Ui(i);return Y(J(m,t),J(t,m))}})}),wM="setUnion",GV=["typed","size","concat","subset","setIntersect","setSymDifference","Index"],WV=Lr(wM,GV,T=>{var{typed:N,size:V,concat:Y,subset:X,setIntersect:J,setSymDifference:R,Index:F}=T;return N(wM,{"Array | Matrix, Array | Matrix":function(i,m){if(X(V(i),new F(0))===0)return Ui(m);if(X(V(m),new F(0))===0)return Ui(i);var t=Ui(i),y=Ui(m);return Y(R(t,y),J(t,y))}})}),AM="add",YV=["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix","concat"],ZV=Lr(AM,YV,T=>{var{typed:N,matrix:V,addScalar:Y,equalScalar:X,DenseMatrix:J,SparseMatrix:R,concat:F}=T,e=Gv({typed:N}),i=D3({typed:N,equalScalar:X}),m=Gd({typed:N,DenseMatrix:J}),t=fo({typed:N,matrix:V,concat:F});return N(AM,{"any, any":Y,"any, any, ...any":N.referToSelf(y=>(p,l,d)=>{for(var r=y(p,l),n=0;n{var{typed:N,abs:V,addScalar:Y,divideScalar:X,multiplyScalar:J,sqrt:R,smaller:F,isPositive:e}=T;return N(TM,{"... number | BigNumber":i,Array:i,Matrix:m=>i(Ui(m.toArray()))});function i(m){for(var t=0,y=0,p=0;p{var{typed:N,abs:V,add:Y,pow:X,conj:J,sqrt:R,multiply:F,equalScalar:e,larger:i,smaller:m,matrix:t,ctranspose:y,eigs:p}=T;return N(MM,{number:Math.abs,Complex:function(g){return g.abs()},BigNumber:function(g){return g.abs()},boolean:function(g){return Math.abs(g)},Array:function(g){return s(t(g),2)},Matrix:function(g){return s(g,2)},"Array, number | BigNumber | string":function(g,A){return s(t(g),A)},"Matrix, number | BigNumber | string":function(g,A){return s(g,A)}});function l(b){var g=0;return b.forEach(function(A){var v=V(A);i(v,g)&&(g=v)},!0),g}function d(b){var g;return b.forEach(function(A){var v=V(A);(!g||m(v,g))&&(g=v)},!0),g||0}function r(b,g){if(g===Number.POSITIVE_INFINITY||g==="inf")return l(b);if(g===Number.NEGATIVE_INFINITY||g==="-inf")return d(b);if(g==="fro")return s(b,2);if(typeof g=="number"&&!isNaN(g)){if(!e(g,0)){var A=0;return b.forEach(function(v){A=Y(X(V(v),g),A)},!0),X(A,1/g)}return Number.POSITIVE_INFINITY}throw new Error("Unsupported parameter value")}function n(b){var g=0;return b.forEach(function(A,v){g=Y(g,F(A,J(A)))}),V(R(g))}function u(b){var g=[],A=0;return b.forEach(function(v,h){var x=h[1],C=Y(g[x]||0,V(v));i(C,A)&&(A=C),g[x]=C},!0),A}function a(b){var g=b.size();if(g[0]!==g[1])throw new RangeError("Invalid matrix dimensions");var A=y(b),v=F(A,b),h=p(v).values.toArray(),x=h[h.length-1];return V(R(x))}function o(b){var g=[],A=0;return b.forEach(function(v,h){var x=h[0],C=Y(g[x]||0,V(v));i(C,A)&&(A=C),g[x]=C},!0),A}function c(b,g){if(g===1)return u(b);if(g===Number.POSITIVE_INFINITY||g==="inf")return o(b);if(g==="fro")return n(b);if(g===2)return a(b);throw new Error("Unsupported parameter value "+g)}function s(b,g){var A=b.size();if(A.length===1)return r(b,g);if(A.length===2){if(A[0]&&A[1])return c(b,g);throw new RangeError("Invalid matrix dimensions")}}}),SM="dot",JV=["typed","addScalar","multiplyScalar","conj","size"],QV=Lr(SM,JV,T=>{var{typed:N,addScalar:V,multiplyScalar:Y,conj:X,size:J}=T;return N(SM,{"Array | DenseMatrix, Array | DenseMatrix":F,"SparseMatrix, SparseMatrix":e});function R(m,t){var y=i(m),p=i(t),l,d;if(y.length===1)l=y[0];else if(y.length===2&&y[1]===1)l=y[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+y.join(", ")+")");if(p.length===1)d=p[0];else if(p.length===2&&p[1]===1)d=p[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+p.join(", ")+")");if(l!==d)throw new RangeError("Vectors must have equal length ("+l+" != "+d+")");if(l===0)throw new RangeError("Cannot calculate the dot product of empty vectors");return l}function F(m,t){var y=R(m,t),p=Qa(m)?m._data:m,l=Qa(m)?m._datatype:void 0,d=Qa(t)?t._data:t,r=Qa(t)?t._datatype:void 0,n=i(m).length===2,u=i(t).length===2,a=V,o=Y;if(l&&r&&l===r&&typeof l=="string"){var c=l;a=N.find(V,[c,c]),o=N.find(Y,[c,c])}if(!n&&!u){for(var s=o(X(p[0]),d[0]),b=1;bs){o++;continue}c===s&&(r=n(r,u(p[a],d[o])),a++,o++)}return r}function i(m){return Qa(m)?m.size():J(m)}}),qV="trace",eG=["typed","matrix","add"],tG=Lr(qV,eG,T=>{var{typed:N,matrix:V,add:Y}=T;return N("trace",{Array:function(F){return X(V(F))},SparseMatrix:J,DenseMatrix:X,any:ei});function X(R){var F=R._size,e=R._data;switch(F.length){case 1:if(F[0]===1)return ei(e[0]);throw new RangeError("Matrix must be square (size: "+vi(F)+")");case 2:{var i=F[0],m=F[1];if(i===m){for(var t=0,y=0;y0)for(var l=0;ll)break}return p}throw new RangeError("Matrix must be square (size: "+vi(m)+")")}}),EM="index",rG=["typed","Index"],nG=Lr(EM,rG,T=>{var{typed:N,Index:V}=T;return N(EM,{"...number | string | BigNumber | Range | Array | Matrix":function(X){var J=X.map(function(F){return Ei(F)?F.toNumber():Array.isArray(F)||Qa(F)?F.map(function(e){return Ei(e)?e.toNumber():e}):F}),R=new V;return V.apply(R,J),R}})}),UC=new Set(["end"]),aG="Node",iG=["mathWithTransform"],oG=Lr(aG,iG,T=>{var{mathWithTransform:N}=T;function V(X){for(var J of[...UC])if(X.has(J))throw new Error('Scope contains an illegal symbol, "'+J+'" is a reserved keyword')}class Y{get type(){return"Node"}get isNode(){return!0}evaluate(J){return this.compile().evaluate(J)}compile(){var J=this._compile(N,{}),R={},F=null;function e(i){var m=Kp(i);return V(m),J(m,R,F)}return{evaluate:e}}_compile(J,R){throw new Error("Method _compile must be implemented by type "+this.type)}forEach(J){throw new Error("Cannot run forEach on a Node interface")}map(J){throw new Error("Cannot run map on a Node interface")}_ifNode(J){if(!no(J))throw new TypeError("Callback function must return a Node");return J}traverse(J){J(this,null,null);function R(F,e){F.forEach(function(i,m,t){e(i,m,t),R(i,e)})}R(this,J)}transform(J){function R(F,e,i){var m=J(F,e,i);return m!==F?m:F.map(R)}return R(this,null,null)}filter(J){var R=[];return this.traverse(function(F,e,i){J(F,e,i)&&R.push(F)}),R}clone(){throw new Error("Cannot clone a Node interface")}cloneDeep(){return this.map(function(J){return J.cloneDeep()})}equals(J){return J?this.type===J.type&&Bg(this,J):!1}toString(J){var R=this._getCustomString(J);return typeof R<"u"?R:this._toString(J)}toJSON(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)}toHTML(J){var R=this._getCustomString(J);return typeof R<"u"?R:this.toHTML(J)}_toString(){throw new Error("_toString not implemented for "+this.type)}toTex(J){var R=this._getCustomString(J);return typeof R<"u"?R:this._toTex(J)}_toTex(J){throw new Error("_toTex not implemented for "+this.type)}_getCustomString(J){if(J&&typeof J=="object")switch(typeof J.handler){case"object":case"undefined":return;case"function":return J.handler(this,J);default:throw new TypeError("Object or function expected as callback")}}getIdentifier(){return this.type}getContent(){return this}}return Y},{isClass:!0,isNode:!0});function Gl(T){return T&&T.isIndexError?new $f(T.index+1,T.min+1,T.max!==void 0?T.max+1:void 0):T}function HC(T){var{subset:N}=T;return function(Y,X){try{if(Array.isArray(Y))return N(Y,X);if(Y&&typeof Y.subset=="function")return Y.subset(X);if(typeof Y=="string")return N(Y,X);if(typeof Y=="object"){if(!X.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return lf(Y,X.getObjectProperty())}else throw new TypeError("Cannot apply index: unsupported type of object")}catch(J){throw Gl(J)}}}var Qm="AccessorNode",sG=["subset","Node"],lG=Lr(Qm,sG,T=>{var{subset:N,Node:V}=T,Y=HC({subset:N});function X(R){return!(kd(R)||Qu(R)||Bi(R)||_v(R)||_1(R)||Nh(R)||_s(R))}class J extends V{constructor(F,e){if(super(),!no(F))throw new TypeError('Node expected for parameter "object"');if(!p0(e))throw new TypeError('IndexNode expected for parameter "index"');this.object=F,this.index=e}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return Qm}get isAccessorNode(){return!0}_compile(F,e){var i=this.object._compile(F,e),m=this.index._compile(F,e);if(this.index.isObjectProperty()){var t=this.index.getObjectProperty();return function(p,l,d){return lf(i(p,l,d),t)}}else return function(p,l,d){var r=i(p,l,d),n=m(p,l,r);return Y(r,n)}}forEach(F){F(this.object,"object",this),F(this.index,"index",this)}map(F){return new J(this._ifNode(F(this.object,"object",this)),this._ifNode(F(this.index,"index",this)))}clone(){return new J(this.object,this.index)}_toString(F){var e=this.object.toString(F);return X(this.object)&&(e="("+e+")"),e+this.index.toString(F)}toHTML(F){var e=this.object.toHTML(F);return X(this.object)&&(e='('+e+')'),e+this.index.toHTML(F)}_toTex(F){var e=this.object.toTex(F);return X(this.object)&&(e="\\left(' + object + '\\right)"),e+this.index.toTex(F)}toJSON(){return{mathjs:Qm,object:this.object,index:this.index}}static fromJSON(F){return new J(F.object,F.index)}}return zs(J,"name",Qm),J},{isClass:!0,isNode:!0}),qm="ArrayNode",uG=["Node"],fG=Lr(qm,uG,T=>{var{Node:N}=T;class V extends N{constructor(X){if(super(),this.items=X||[],!Array.isArray(this.items)||!this.items.every(no))throw new TypeError("Array containing Nodes expected")}get type(){return qm}get isArrayNode(){return!0}_compile(X,J){var R=Eh(this.items,function(i){return i._compile(X,J)}),F=X.config.matrix!=="Array";if(F){var e=X.matrix;return function(m,t,y){return e(Eh(R,function(p){return p(m,t,y)}))}}else return function(m,t,y){return Eh(R,function(p){return p(m,t,y)})}}forEach(X){for(var J=0;J['+J.join(',')+']'}_toTex(X){function J(R,F){var e=R.some(Qu)&&!R.every(Qu),i=F||e,m=i?"&":"\\\\",t=R.map(function(y){return y.items?J(y.items,!F):y.toTex(X)}).join(m);return e||!i||i&&!F?"\\begin{bmatrix}"+t+"\\end{bmatrix}":t}return J(this.items,!1)}}return zs(V,"name",qm),V},{isClass:!0,isNode:!0});function cG(T){var{subset:N,matrix:V}=T;return function(X,J,R){try{if(Array.isArray(X))return V(X).subset(J,R).valueOf();if(X&&typeof X.subset=="function")return X.subset(J,R);if(typeof X=="string")return N(X,J,R);if(typeof X=="object"){if(!J.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return s0(X,J.getObjectProperty(),R),X}else throw new TypeError("Cannot apply index: unsupported type of object")}catch(F){throw Gl(F)}}}var Vf=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{op:"or",associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{op:"xor",associativity:"left",associativeWith:[]}},{"OperatorNode:and":{op:"and",associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{op:"|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{op:"^|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{op:"&",associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{op:"==",associativity:"left",associativeWith:[]},"OperatorNode:unequal":{op:"!=",associativity:"left",associativeWith:[]},"OperatorNode:smaller":{op:"<",associativity:"left",associativeWith:[]},"OperatorNode:larger":{op:">",associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{op:"<=",associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{op:">=",associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{op:"<<",associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{op:">>",associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{op:">>>",associativity:"left",associativeWith:[]}},{"OperatorNode:to":{op:"to",associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{op:"+",associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{op:"-",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{op:"*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{op:"/",associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{op:".*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{op:"./",associativity:"left",associativeWith:[]},"OperatorNode:mod":{op:"mod",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]}},{"OperatorNode:unaryPlus":{op:"+",associativity:"right"},"OperatorNode:unaryMinus":{op:"-",associativity:"right"},"OperatorNode:bitNot":{op:"~",associativity:"right"},"OperatorNode:not":{op:"not",associativity:"right"}},{"OperatorNode:pow":{op:"^",associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{op:".^",associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{op:"!",associativity:"left"}},{"OperatorNode:ctranspose":{op:"'",associativity:"left"}}];function ey(T,N){if(!N||N!=="auto")return T;for(var V=T;Nh(V);)V=V.content;return V}function oo(T,N,V,Y){var X=T;N!=="keep"&&(X=T.getContent());for(var J=X.getIdentifier(),R=null,F=0;F{var{subset:N,matrix:V,Node:Y}=T,X=HC({subset:N}),J=cG({subset:N,matrix:V});function R(e,i,m){i||(i="keep");var t=oo(e,i,m),y=oo(e.value,i,m);return i==="all"||y!==null&&y<=t}class F extends Y{constructor(i,m,t){if(super(),this.object=i,this.index=t?m:null,this.value=t||m,!_s(i)&&!kd(i))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(_s(i)&&i.name==="end")throw new Error('Cannot assign to symbol "end"');if(this.index&&!p0(this.index))throw new TypeError('IndexNode expected as "index"');if(!no(this.value))throw new TypeError('Node expected as "value"')}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return ty}get isAssignmentNode(){return!0}_compile(i,m){var t=this.object._compile(i,m),y=this.index?this.index._compile(i,m):null,p=this.value._compile(i,m),l=this.object.name;if(this.index)if(this.index.isObjectProperty()){var d=this.index.getObjectProperty();return function(o,c,s){var b=t(o,c,s),g=p(o,c,s);return s0(b,d,g),g}}else{if(_s(this.object))return function(o,c,s){var b=t(o,c,s),g=p(o,c,s),A=y(o,c,b);return o.set(l,J(b,A,g)),g};var r=this.object.object._compile(i,m);if(this.object.index.isObjectProperty()){var n=this.object.index.getObjectProperty();return function(o,c,s){var b=r(o,c,s),g=lf(b,n),A=y(o,c,g),v=p(o,c,s);return s0(b,n,J(g,A,v)),v}}else{var u=this.object.index._compile(i,m);return function(o,c,s){var b=r(o,c,s),g=u(o,c,b),A=X(b,g),v=y(o,c,A),h=p(o,c,s);return J(b,g,J(A,v,h)),h}}}else{if(!_s(this.object))throw new TypeError("SymbolNode expected as object");return function(o,c,s){var b=p(o,c,s);return o.set(l,b),b}}}forEach(i){i(this.object,"object",this),this.index&&i(this.index,"index",this),i(this.value,"value",this)}map(i){var m=this._ifNode(i(this.object,"object",this)),t=this.index?this._ifNode(i(this.index,"index",this)):null,y=this._ifNode(i(this.value,"value",this));return new F(m,t,y)}clone(){return new F(this.object,this.index,this.value)}_toString(i){var m=this.object.toString(i),t=this.index?this.index.toString(i):"",y=this.value.toString(i);return R(this,i&&i.parenthesis,i&&i.implicit)&&(y="("+y+")"),m+t+" = "+y}toJSON(){return{mathjs:ty,object:this.object,index:this.index,value:this.value}}static fromJSON(i){return new F(i.object,i.index,i.value)}toHTML(i){var m=this.object.toHTML(i),t=this.index?this.index.toHTML(i):"",y=this.value.toHTML(i);return R(this,i&&i.parenthesis,i&&i.implicit)&&(y='('+y+')'),m+t+'='+y}_toTex(i){var m=this.object.toTex(i),t=this.index?this.index.toTex(i):"",y=this.value.toTex(i);return R(this,i&&i.parenthesis,i&&i.implicit)&&(y="\\left(".concat(y,"\\right)")),m+t+":="+y}}return zs(F,"name",ty),F},{isClass:!0,isNode:!0}),ry="BlockNode",pG=["ResultSet","Node"],gG=Lr(ry,pG,T=>{var{ResultSet:N,Node:V}=T;class Y extends V{constructor(J){if(super(),!Array.isArray(J))throw new Error("Array expected");this.blocks=J.map(function(R){var F=R&&R.node,e=R&&R.visible!==void 0?R.visible:!0;if(!no(F))throw new TypeError('Property "node" must be a Node');if(typeof e!="boolean")throw new TypeError('Property "visible" must be a boolean');return{node:F,visible:e}})}get type(){return ry}get isBlockNode(){return!0}_compile(J,R){var F=Eh(this.blocks,function(e){return{evaluate:e.node._compile(J,R),visible:e.visible}});return function(i,m,t){var y=[];return k1(F,function(l){var d=l.evaluate(i,m,t);l.visible&&y.push(d)}),new N(y)}}forEach(J){for(var R=0;R;')}).join('
')}_toTex(J){return this.blocks.map(function(R){return R.node.toTex(J)+(R.visible?"":";")}).join(`\\;\\; +`)}}return zs(Y,"name",ry),Y},{isClass:!0,isNode:!0}),ny="ConditionalNode",mG=["Node"],yG=Lr(ny,mG,T=>{var{Node:N}=T;function V(X){if(typeof X=="number"||typeof X=="boolean"||typeof X=="string")return!!X;if(X){if(Ei(X))return!X.isZero();if(Sh(X))return!!(X.re||X.im);if(xh(X))return!!X.value}if(X==null)return!1;throw new TypeError('Unsupported type of condition "'+wo(X)+'"')}class Y extends N{constructor(J,R,F){if(super(),!no(J))throw new TypeError("Parameter condition must be a Node");if(!no(R))throw new TypeError("Parameter trueExpr must be a Node");if(!no(F))throw new TypeError("Parameter falseExpr must be a Node");this.condition=J,this.trueExpr=R,this.falseExpr=F}get type(){return ny}get isConditionalNode(){return!0}_compile(J,R){var F=this.condition._compile(J,R),e=this.trueExpr._compile(J,R),i=this.falseExpr._compile(J,R);return function(t,y,p){return V(F(t,y,p))?e(t,y,p):i(t,y,p)}}forEach(J){J(this.condition,"condition",this),J(this.trueExpr,"trueExpr",this),J(this.falseExpr,"falseExpr",this)}map(J){return new Y(this._ifNode(J(this.condition,"condition",this)),this._ifNode(J(this.trueExpr,"trueExpr",this)),this._ifNode(J(this.falseExpr,"falseExpr",this)))}clone(){return new Y(this.condition,this.trueExpr,this.falseExpr)}_toString(J){var R=J&&J.parenthesis?J.parenthesis:"keep",F=oo(this,R,J&&J.implicit),e=this.condition.toString(J),i=oo(this.condition,R,J&&J.implicit);(R==="all"||this.condition.type==="OperatorNode"||i!==null&&i<=F)&&(e="("+e+")");var m=this.trueExpr.toString(J),t=oo(this.trueExpr,R,J&&J.implicit);(R==="all"||this.trueExpr.type==="OperatorNode"||t!==null&&t<=F)&&(m="("+m+")");var y=this.falseExpr.toString(J),p=oo(this.falseExpr,R,J&&J.implicit);return(R==="all"||this.falseExpr.type==="OperatorNode"||p!==null&&p<=F)&&(y="("+y+")"),e+" ? "+m+" : "+y}toJSON(){return{mathjs:ny,condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}}static fromJSON(J){return new Y(J.condition,J.trueExpr,J.falseExpr)}toHTML(J){var R=J&&J.parenthesis?J.parenthesis:"keep",F=oo(this,R,J&&J.implicit),e=this.condition.toHTML(J),i=oo(this.condition,R,J&&J.implicit);(R==="all"||this.condition.type==="OperatorNode"||i!==null&&i<=F)&&(e='('+e+')');var m=this.trueExpr.toHTML(J),t=oo(this.trueExpr,R,J&&J.implicit);(R==="all"||this.trueExpr.type==="OperatorNode"||t!==null&&t<=F)&&(m='('+m+')');var y=this.falseExpr.toHTML(J),p=oo(this.falseExpr,R,J&&J.implicit);return(R==="all"||this.falseExpr.type==="OperatorNode"||p!==null&&p<=F)&&(y='('+y+')'),e+'?'+m+':'+y}_toTex(J){return"\\begin{cases} {"+this.trueExpr.toTex(J)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(J)+"}\\\\{"+this.falseExpr.toTex(J)+"}, &\\quad{\\text{otherwise}}\\end{cases}"}}return zs(Y,"name",ny),Y},{isClass:!0,isNode:!0}),xb=Object.assign||function(T){for(var N=1;N1&&arguments[1]!==void 0?arguments[1]:{},V=N.preserveFormatting,Y=V===void 0?!1:V,X=N.escapeMapFn,J=X===void 0?wG:X,R=String(T),F="",e=J(xb({},xG),Y?xb({},bG):{}),i=Object.keys(e),m=function(){var y=!1;i.forEach(function(p,l){y||R.length>=p.length&&R.slice(0,p.length)===p&&(F+=e[i[l]],R=R.slice(p.length,R.length),y=!0)}),y||(F+=R.slice(0,1),R=R.slice(1,R.length))};R;)m();return F};const TG=AG;var bb={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},ki={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},CM={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(ki.add,"${args[1]}\\right)")},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:"\\left(${args[0]}".concat(ki.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(ki.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(ki.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(ki.pow,"{${args[0]}}-1\\right)"),fix:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},floor:{1:"\\left\\lfloor${args[0]}\\right\\rfloor"},gcd:"\\gcd\\left(${args}\\right)",hypot:"\\hypot\\left(${args}\\right)",log:{1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},log10:{1:"\\log_{10}\\left(${args[0]}\\right)"},log1p:{1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},log2:"\\log_{2}\\left(${args[0]}\\right)",mod:{2:"\\left(${args[0]}".concat(ki.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(ki.multiply,"${args[1]}\\right)")},norm:{1:"\\left\\|${args[0]}\\right\\|",2:void 0},nthRoot:{2:"\\sqrt[${args[1]}]{${args[0]}}"},nthRoots:{2:"\\{y : $y^{args[1]} = {${args[0]}}\\}"},pow:{2:"\\left(${args[0]}\\right)".concat(ki.pow,"{${args[1]}}")},round:{1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},sign:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},sqrt:{1:"\\sqrt{${args[0]}}"},square:{1:"\\left(${args[0]}\\right)^2"},subtract:{2:"\\left(${args[0]}".concat(ki.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(ki.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(ki.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(ki.bitAnd,"${args[1]}\\right)")},bitNot:{1:ki.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(ki.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(ki.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(ki.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(ki.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(ki.rightLogShift,"${args[1]}\\right)")},bellNumbers:{1:"\\mathrm{B}_{${args[0]}}"},catalan:{1:"\\mathrm{C}_{${args[0]}}"},stirlingS2:{2:"\\mathrm{S}\\left(${args}\\right)"},arg:{1:"\\arg\\left(${args[0]}\\right)"},conj:{1:"\\left(${args[0]}\\right)^*"},im:{1:"\\Im\\left\\lbrace${args[0]}\\right\\rbrace"},re:{1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},and:{2:"\\left(${args[0]}".concat(ki.and,"${args[1]}\\right)")},not:{1:ki.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(ki.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(ki.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(ki.ctranspose)},det:{1:"\\det\\left(${args[0]}\\right)"},dot:{2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},expm:{1:"\\exp\\left(${args[0]}\\right)"},inv:{1:"\\left(${args[0]}\\right)^{-1}"},pinv:{1:"\\left(${args[0]}\\right)^{+}"},sqrtm:{1:"{${args[0]}}".concat(ki.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(ki.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(ki.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},lgamma:{1:"\\ln\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(ki.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(ki.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(ki.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(ki.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(ki.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(ki.unequal,"${args[1]}\\right)")},erf:{1:"erf\\left(${args[0]}\\right)"},max:"\\max\\left(${args}\\right)",min:"\\min\\left(${args}\\right)",variance:"\\mathrm{Var}\\left(${args}\\right)",acos:{1:"\\cos^{-1}\\left(${args[0]}\\right)"},acosh:{1:"\\cosh^{-1}\\left(${args[0]}\\right)"},acot:{1:"\\cot^{-1}\\left(${args[0]}\\right)"},acoth:{1:"\\coth^{-1}\\left(${args[0]}\\right)"},acsc:{1:"\\csc^{-1}\\left(${args[0]}\\right)"},acsch:{1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},asec:{1:"\\sec^{-1}\\left(${args[0]}\\right)"},asech:{1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},asin:{1:"\\sin^{-1}\\left(${args[0]}\\right)"},asinh:{1:"\\sinh^{-1}\\left(${args[0]}\\right)"},atan:{1:"\\tan^{-1}\\left(${args[0]}\\right)"},atan2:{2:"\\mathrm{atan2}\\left(${args}\\right)"},atanh:{1:"\\tanh^{-1}\\left(${args[0]}\\right)"},cos:{1:"\\cos\\left(${args[0]}\\right)"},cosh:{1:"\\cosh\\left(${args[0]}\\right)"},cot:{1:"\\cot\\left(${args[0]}\\right)"},coth:{1:"\\coth\\left(${args[0]}\\right)"},csc:{1:"\\csc\\left(${args[0]}\\right)"},csch:{1:"\\mathrm{csch}\\left(${args[0]}\\right)"},sec:{1:"\\sec\\left(${args[0]}\\right)"},sech:{1:"\\mathrm{sech}\\left(${args[0]}\\right)"},sin:{1:"\\sin\\left(${args[0]}\\right)"},sinh:{1:"\\sinh\\left(${args[0]}\\right)"},tan:{1:"\\tan\\left(${args[0]}\\right)"},tanh:{1:"\\tanh\\left(${args[0]}\\right)"},to:{2:"\\left(${args[0]}".concat(ki.to,"${args[1]}\\right)")},numeric:function(N,V){return N.args[0].toTex()},number:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},string:{0:'\\mathtt{""}',1:"\\mathrm{string}\\left(${args[0]}\\right)"},bignumber:{0:"0",1:"\\left(${args[0]}\\right)"},complex:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)+".concat(bb.i,"\\cdot\\left(${args[1]}\\right)\\right)")},matrix:{0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},sparse:{0:"\\begin{bsparse}\\end{bsparse}",1:"\\left(${args[0]}\\right)"},unit:{1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"}},MG="\\mathrm{${name}}\\left(${args}\\right)",DM={deg:"^\\circ"};function wb(T){return TG(T,{preserveFormatting:!0})}function VC(T,N){return N=typeof N>"u"?!1:N,N?ka(DM,T)?DM[T]:"\\mathrm{"+wb(T)+"}":ka(bb,T)?bb[T]:wb(T)}var ay="ConstantNode",SG=["Node"],EG=Lr(ay,SG,T=>{var{Node:N}=T;class V extends N{constructor(X){super(),this.value=X}get type(){return ay}get isConstantNode(){return!0}_compile(X,J){var R=this.value;return function(){return R}}forEach(X){}map(X){return this.clone()}clone(){return new V(this.value)}_toString(X){return vi(this.value,X)}toHTML(X){var J=this._toString(X);switch(wo(this.value)){case"number":case"BigNumber":case"Fraction":return''+J+"";case"string":return''+J+"";case"boolean":return''+J+"";case"null":return''+J+"";case"undefined":return''+J+"";default:return''+J+""}}toJSON(){return{mathjs:ay,value:this.value}}static fromJSON(X){return new V(X.value)}_toTex(X){var J=this._toString(X);switch(wo(this.value)){case"string":return"\\mathtt{"+wb(J)+"}";case"number":case"BigNumber":{if(!isFinite(this.value))return this.value.valueOf()<0?"-\\infty":"\\infty";var R=J.toLowerCase().indexOf("e");if(R!==-1)return J.substring(0,R)+"\\cdot10^{"+J.substring(R+1)+"}"}return J;case"Fraction":return this.value.toLatex();default:return J}}}return zs(V,"name",ay),V},{isClass:!0,isNode:!0}),iy="FunctionAssignmentNode",CG=["typed","Node"],DG=Lr(iy,CG,T=>{var{typed:N,Node:V}=T;function Y(J,R,F){var e=oo(J,R,F),i=oo(J.expr,R,F);return R==="all"||i!==null&&i<=e}class X extends V{constructor(R,F,e){if(super(),typeof R!="string")throw new TypeError('String expected for parameter "name"');if(!Array.isArray(F))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!no(e))throw new TypeError('Node expected for parameter "expr"');if(UC.has(R))throw new Error('Illegal function name, "'+R+'" is a reserved keyword');var i=new Set;for(var m of F){var t=typeof m=="string"?m:m.name;if(i.has(t))throw new Error('Duplicate parameter name "'.concat(t,'"'));i.add(t)}this.name=R,this.params=F.map(function(y){return y&&y.name||y}),this.types=F.map(function(y){return y&&y.type||"any"}),this.expr=e}get type(){return iy}get isFunctionAssignmentNode(){return!0}_compile(R,F){var e=Object.create(F);k1(this.params,function(l){e[l]=!0});var i=this.expr._compile(R,e),m=this.name,t=this.params,y=DT(this.types,","),p=m+"("+DT(this.params,", ")+")";return function(d,r,n){var u={};u[y]=function(){for(var o=Object.create(r),c=0;c'+tf(this.params[i])+"");var m=this.expr.toHTML(R);return Y(this,F,R&&R.implicit)&&(m='('+m+')'),''+tf(this.name)+'('+e.join(',')+')='+m}_toTex(R){var F=R&&R.parenthesis?R.parenthesis:"keep",e=this.expr.toTex(R);return Y(this,F,R&&R.implicit)&&(e="\\left(".concat(e,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(VC).join(",")+"\\right):="+e}}return zs(X,"name",iy),X},{isClass:!0,isNode:!0}),oy="IndexNode",LG=["Node","size"],PG=Lr(oy,LG,T=>{var{Node:N,size:V}=T;class Y extends N{constructor(J,R){if(super(),this.dimensions=J,this.dotNotation=R||!1,!Array.isArray(J)||!J.every(no))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}get type(){return oy}get isIndexNode(){return!0}_compile(J,R){var F=Eh(this.dimensions,function(i,m){var t=i.filter(l=>l.isSymbolNode&&l.name==="end").length>0;if(t){var y=Object.create(R);y.end=!0;var p=i._compile(J,y);return function(d,r,n){if(!Qa(n)&&!ro(n)&&!zl(n))throw new TypeError('Cannot resolve "end": context must be a Matrix, Array, or string but is '+wo(n));var u=V(n).valueOf(),a=Object.create(r);return a.end=u[m],p(d,a,n)}}else return i._compile(J,R)}),e=lf(J,"index");return function(m,t,y){var p=Eh(F,function(l){return l(m,t,y)});return e(...p)}}forEach(J){for(var R=0;R.'+tf(this.getObjectProperty())+"":'['+R.join(',')+']'}_toTex(J){var R=this.dimensions.map(function(F){return F.toTex(J)});return this.dotNotation?"."+this.getObjectProperty():"_{"+R.join(",")+"}"}}return zs(Y,"name",oy),Y},{isClass:!0,isNode:!0}),sy="ObjectNode",NG=["Node"],RG=Lr(sy,NG,T=>{var{Node:N}=T;class V extends N{constructor(X){if(super(),this.properties=X||{},X&&(typeof X!="object"||!Object.keys(X).every(function(J){return no(X[J])})))throw new TypeError("Object containing Nodes expected")}get type(){return sy}get isObjectNode(){return!0}_compile(X,J){var R={};for(var F in this.properties)if(ka(this.properties,F)){var e=$m(F),i=JSON.parse(e);if(!A3(this.properties,i))throw new Error('No access to property "'+i+'"');R[i]=this.properties[F]._compile(X,J)}return function(t,y,p){var l={};for(var d in R)ka(R,d)&&(l[d]=R[d](t,y,p));return l}}forEach(X){for(var J in this.properties)ka(this.properties,J)&&X(this.properties[J],"properties["+$m(J)+"]",this)}map(X){var J={};for(var R in this.properties)ka(this.properties,R)&&(J[R]=this._ifNode(X(this.properties[R],"properties["+$m(R)+"]",this)));return new V(J)}clone(){var X={};for(var J in this.properties)ka(this.properties,J)&&(X[J]=this.properties[J]);return new V(X)}_toString(X){var J=[];for(var R in this.properties)ka(this.properties,R)&&J.push($m(R)+": "+this.properties[R].toString(X));return"{"+J.join(", ")+"}"}toJSON(){return{mathjs:sy,properties:this.properties}}static fromJSON(X){return new V(X.properties)}toHTML(X){var J=[];for(var R in this.properties)ka(this.properties,R)&&J.push(''+tf(R)+':'+this.properties[R].toHTML(X));return'{'+J.join(',')+'}'}_toTex(X){var J=[];for(var R in this.properties)ka(this.properties,R)&&J.push("\\mathbf{"+R+":} & "+this.properties[R].toTex(X)+"\\\\");var F="\\left\\{\\begin{array}{ll}"+J.join(` +`)+"\\end{array}\\right\\}";return F}}return zs(V,"name",sy),V},{isClass:!0,isNode:!0}),ly="OperatorNode",FG=["Node"],IG=Lr(ly,FG,T=>{var{Node:N}=T;function V(J,R){var F=J;if(R==="auto")for(;Nh(F);)F=F.content;return Bi(F)?!0:ds(F)?V(F.args[0],R):!1}function Y(J,R,F,e,i){var m=oo(J,R,F),t=og(J,R);if(R==="all"||e.length>2&&J.getIdentifier()!=="OperatorNode:add"&&J.getIdentifier()!=="OperatorNode:multiply")return e.map(function(v){switch(v.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});var y;switch(e.length){case 0:y=[];break;case 1:{var p=oo(e[0],R,F,J);if(i&&p!==null){var l,d;if(R==="keep"?(l=e[0].getIdentifier(),d=J.getIdentifier()):(l=e[0].getContent().getIdentifier(),d=J.getContent().getIdentifier()),Vf[m][d].latexLeftParens===!1){y=[!1];break}if(Vf[p][l].latexParens===!1){y=[!1];break}}if(p===null){y=[!1];break}if(p<=m){y=[!0];break}y=[!1]}break;case 2:{var r,n=oo(e[0],R,F,J),u=c2(J,e[0],R);n===null?r=!1:n===m&&t==="right"&&!u||n=2&&J.getIdentifier()==="OperatorNode:multiply"&&J.implicit&&R!=="all"&&F==="hide")for(var A=1;A2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var r=i.map(function(n,u){return n=n.toString(R),m[u]&&(n="("+n+")"),n});return this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&e==="hide"?r.join(" "):r.join(" "+this.op+" ")}else return this.fn+"("+this.args.join(", ")+")"}toJSON(){return{mathjs:ly,op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}}static fromJSON(R){return new X(R.op,R.fn,R.args,R.implicit,R.isPercentage)}toHTML(R){var F=R&&R.parenthesis?R.parenthesis:"keep",e=R&&R.implicit?R.implicit:"hide",i=this.args,m=Y(this,F,e,i,!1);if(i.length===1){var t=og(this,F),y=i[0].toHTML(R);return m[0]&&(y='('+y+')'),t==="right"?''+tf(this.op)+""+y:y+''+tf(this.op)+""}else if(i.length===2){var p=i[0].toHTML(R),l=i[1].toHTML(R);return m[0]&&(p='('+p+')'),m[1]&&(l='('+l+')'),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&e==="hide"?p+''+l:p+''+tf(this.op)+""+l}else{var d=i.map(function(r,n){return r=r.toHTML(R),m[n]&&(r='('+r+')'),r});return i.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")?this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&e==="hide"?d.join(''):d.join(''+tf(this.op)+""):''+tf(this.fn)+'('+d.join(',')+')'}}_toTex(R){var F=R&&R.parenthesis?R.parenthesis:"keep",e=R&&R.implicit?R.implicit:"hide",i=this.args,m=Y(this,F,e,i,!0),t=ki[this.fn];if(t=typeof t>"u"?this.op:t,i.length===1){var y=og(this,F),p=i[0].toTex(R);return m[0]&&(p="\\left(".concat(p,"\\right)")),y==="right"?t+p:p+t}else if(i.length===2){var l=i[0],d=l.toTex(R);m[0]&&(d="\\left(".concat(d,"\\right)"));var r=i[1],n=r.toTex(R);m[1]&&(n="\\left(".concat(n,"\\right)"));var u;switch(F==="keep"?u=l.getIdentifier():u=l.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return t+"{"+d+"}{"+n+"}";case"OperatorNode:pow":switch(d="{"+d+"}",n="{"+n+"}",u){case"ConditionalNode":case"OperatorNode:divide":d="\\left(".concat(d,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&e==="hide")return d+"~"+n}return d+t+n}else if(i.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var a=i.map(function(o,c){return o=o.toTex(R),m[c]&&(o="\\left(".concat(o,"\\right)")),o});return this.getIdentifier()==="OperatorNode:multiply"&&this.implicit&&e==="hide"?a.join("~"):a.join(t)}else return"\\mathrm{"+this.fn+"}\\left("+i.map(function(o){return o.toTex(R)}).join(",")+"\\right)"}getIdentifier(){return this.type+":"+this.fn}}return zs(X,"name",ly),X},{isClass:!0,isNode:!0}),uy="ParenthesisNode",_G=["Node"],OG=Lr(uy,_G,T=>{var{Node:N}=T;class V extends N{constructor(X){if(super(),!no(X))throw new TypeError('Node expected for parameter "content"');this.content=X}get type(){return uy}get isParenthesisNode(){return!0}_compile(X,J){return this.content._compile(X,J)}getContent(){return this.content.getContent()}forEach(X){X(this.content,"content",this)}map(X){var J=X(this.content,"content",this);return new V(J)}clone(){return new V(this.content)}_toString(X){return!X||X&&!X.parenthesis||X&&X.parenthesis==="keep"?"("+this.content.toString(X)+")":this.content.toString(X)}toJSON(){return{mathjs:uy,content:this.content}}static fromJSON(X){return new V(X.content)}toHTML(X){return!X||X&&!X.parenthesis||X&&X.parenthesis==="keep"?'('+this.content.toHTML(X)+')':this.content.toHTML(X)}_toTex(X){return!X||X&&!X.parenthesis||X&&X.parenthesis==="keep"?"\\left(".concat(this.content.toTex(X),"\\right)"):this.content.toTex(X)}}return zs(V,"name",uy),V},{isClass:!0,isNode:!0}),fy="RangeNode",zG=["Node"],kG=Lr(fy,zG,T=>{var{Node:N}=T;function V(X,J,R){var F=oo(X,J,R),e={},i=oo(X.start,J,R);if(e.start=i!==null&&i<=F||J==="all",X.step){var m=oo(X.step,J,R);e.step=m!==null&&m<=F||J==="all"}var t=oo(X.end,J,R);return e.end=t!==null&&t<=F||J==="all",e}class Y extends N{constructor(J,R,F){if(super(),!no(J))throw new TypeError("Node expected");if(!no(R))throw new TypeError("Node expected");if(F&&!no(F))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=J,this.end=R,this.step=F||null}get type(){return fy}get isRangeNode(){return!0}needsEnd(){var J=this.filter(function(R){return _s(R)&&R.name==="end"});return J.length>0}_compile(J,R){var F=J.range,e=this.start._compile(J,R),i=this.end._compile(J,R);if(this.step){var m=this.step._compile(J,R);return function(y,p,l){return F(e(y,p,l),i(y,p,l),m(y,p,l))}}else return function(y,p,l){return F(e(y,p,l),i(y,p,l))}}forEach(J){J(this.start,"start",this),J(this.end,"end",this),this.step&&J(this.step,"step",this)}map(J){return new Y(this._ifNode(J(this.start,"start",this)),this._ifNode(J(this.end,"end",this)),this.step&&this._ifNode(J(this.step,"step",this)))}clone(){return new Y(this.start,this.end,this.step&&this.step)}_toString(J){var R=J&&J.parenthesis?J.parenthesis:"keep",F=V(this,R,J&&J.implicit),e,i=this.start.toString(J);if(F.start&&(i="("+i+")"),e=i,this.step){var m=this.step.toString(J);F.step&&(m="("+m+")"),e+=":"+m}var t=this.end.toString(J);return F.end&&(t="("+t+")"),e+=":"+t,e}toJSON(){return{mathjs:fy,start:this.start,end:this.end,step:this.step}}static fromJSON(J){return new Y(J.start,J.end,J.step)}toHTML(J){var R=J&&J.parenthesis?J.parenthesis:"keep",F=V(this,R,J&&J.implicit),e,i=this.start.toHTML(J);if(F.start&&(i='('+i+')'),e=i,this.step){var m=this.step.toHTML(J);F.step&&(m='('+m+')'),e+=':'+m}var t=this.end.toHTML(J);return F.end&&(t='('+t+')'),e+=':'+t,e}_toTex(J){var R=J&&J.parenthesis?J.parenthesis:"keep",F=V(this,R,J&&J.implicit),e=this.start.toTex(J);if(F.start&&(e="\\left(".concat(e,"\\right)")),this.step){var i=this.step.toTex(J);F.step&&(i="\\left(".concat(i,"\\right)")),e+=":"+i}var m=this.end.toTex(J);return F.end&&(m="\\left(".concat(m,"\\right)")),e+=":"+m,e}}return zs(Y,"name",fy),Y},{isClass:!0,isNode:!0}),cy="RelationalNode",BG=["Node"],UG=Lr(cy,BG,T=>{var{Node:N}=T,V={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="};class Y extends N{constructor(J,R){if(super(),!Array.isArray(J))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(R))throw new TypeError("Parameter params must be an array");if(J.length!==R.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=J,this.params=R}get type(){return cy}get isRelationalNode(){return!0}_compile(J,R){var F=this,e=this.params.map(i=>i._compile(J,R));return function(m,t,y){for(var p,l=e[0](m,t,y),d=0;dJ(R,"params["+F+"]",this),this)}map(J){return new Y(this.conditionals.slice(),this.params.map((R,F)=>this._ifNode(J(R,"params["+F+"]",this)),this))}clone(){return new Y(this.conditionals,this.params)}_toString(J){for(var R=J&&J.parenthesis?J.parenthesis:"keep",F=oo(this,R,J&&J.implicit),e=this.params.map(function(t,y){var p=oo(t,R,J&&J.implicit);return R==="all"||p!==null&&p<=F?"("+t.toString(J)+")":t.toString(J)}),i=e[0],m=0;m('+t.toHTML(J)+')':t.toHTML(J)}),i=e[0],m=0;m'+tf(V[this.conditionals[m]])+""+e[m+1];return i}_toTex(J){for(var R=J&&J.parenthesis?J.parenthesis:"keep",F=oo(this,R,J&&J.implicit),e=this.params.map(function(t,y){var p=oo(t,R,J&&J.implicit);return R==="all"||p!==null&&p<=F?"\\left("+t.toTex(J)+"\right)":t.toTex(J)}),i=e[0],m=0;m{var{math:N,Unit:V,Node:Y}=T;function X(R){return V?V.isValuelessUnit(R):!1}class J extends Y{constructor(F){if(super(),typeof F!="string")throw new TypeError('String expected for parameter "name"');this.name=F}get type(){return"SymbolNode"}get isSymbolNode(){return!0}_compile(F,e){var i=this.name;if(e[i]===!0)return function(t,y,p){return y[i]};if(i in F)return function(t,y,p){return t.has(i)?t.get(i):lf(F,i)};var m=X(i);return function(t,y,p){return t.has(i)?t.get(i):m?new V(null,i):J.onUndefinedSymbol(i)}}forEach(F){}map(F){return this.clone()}static onUndefinedSymbol(F){throw new Error("Undefined symbol "+F)}clone(){return new J(this.name)}_toString(F){return this.name}toHTML(F){var e=tf(this.name);return e==="true"||e==="false"?''+e+"":e==="i"?''+e+"":e==="Infinity"?''+e+"":e==="NaN"?''+e+"":e==="null"?''+e+"":e==="undefined"?''+e+"":''+e+""}toJSON(){return{mathjs:"SymbolNode",name:this.name}}static fromJSON(F){return new J(F.name)}_toTex(F){var e=!1;typeof N[this.name]>"u"&&X(this.name)&&(e=!0);var i=VC(this.name,e);return i[0]==="\\"?i:" "+i}}return J},{isClass:!0,isNode:!0});function hg(T){for(var N=arguments.length,V=new Array(N>1?N-1:0),Y=1;Y{var{math:N,Node:V,SymbolNode:Y}=T,X=F=>vi(F,{truncate:78});function J(F,e,i){for(var m="",t=/\$(?:\{([a-z_][a-z_0-9]*)(?:\[([0-9]+)\])?\}|\$)/gi,y=0,p;(p=t.exec(F))!==null;)if(m+=F.substring(y,p.index),y=p.index,p[0]==="$$")m+="$",y++;else{y+=p[0].length;var l=e[p[1]];if(!l)throw new ReferenceError("Template: Property "+p[1]+" does not exist.");if(p[2]===void 0)switch(typeof l){case"string":m+=l;break;case"object":if(no(l))m+=l.toTex(i);else if(Array.isArray(l))m+=l.map(function(d,r){if(no(d))return d.toTex(i);throw new TypeError("Template: "+p[1]+"["+r+"] is not a Node.")}).join(",");else throw new TypeError("Template: "+p[1]+" has to be a Node, String or array of Nodes");break;default:throw new TypeError("Template: "+p[1]+" has to be a Node, String or array of Nodes")}else if(no(l[p[2]]&&l[p[2]]))m+=l[p[2]].toTex(i);else throw new TypeError("Template: "+p[1]+"["+p[2]+"] is not a Node.")}return m+=F.slice(y),m}class R extends V{constructor(e,i){if(super(),typeof e=="string"&&(e=new Y(e)),!no(e))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(i)||!i.every(no))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=e,this.args=i||[]}get name(){return this.fn.name||""}get type(){return hy}get isFunctionNode(){return!0}_compile(e,i){var m=this.args.map(b=>b._compile(e,i));if(_s(this.fn)){var t=this.fn.name;if(i[t]){var r=this.args;return function(g,A,v){var h=A[t];if(typeof h!="function")throw new TypeError("Argument '".concat(t,"' was not a function; received: ").concat(X(h)));if(h.rawArgs)return h(r,e,hg(g,A),g);var x=m.map(C=>C(g,A,v));return h.apply(h,x)}}else{var y=t in e?lf(e,t):void 0,p=typeof y=="function"&&y.rawArgs===!0,l=b=>{var g;if(b.has(t))g=b.get(t);else if(t in e)g=lf(e,t);else return R.onUndefinedFunction(t);if(typeof g=="function")return g;throw new TypeError("'".concat(t,`' is not a function; its value is: + `).concat(X(g)))};if(p){var d=this.args;return function(g,A,v){var h=l(g);return h(d,e,hg(g,A),g)}}else switch(m.length){case 0:return function(g,A,v){var h=l(g);return h()};case 1:return function(g,A,v){var h=l(g),x=m[0];return h(x(g,A,v))};case 2:return function(g,A,v){var h=l(g),x=m[0],C=m[1];return h(x(g,A,v),C(g,A,v))};default:return function(g,A,v){var h=l(g),x=m.map(C=>C(g,A,v));return h(...x)}}}}else if(kd(this.fn)&&p0(this.fn.index)&&this.fn.index.isObjectProperty()){var n=this.fn.object._compile(e,i),u=this.fn.index.getObjectProperty(),a=this.args;return function(g,A,v){var h=n(g,A,v);wF(h,u);var x=h[u]&&h[u].rawArgs;if(x)return h[u](a,e,hg(g,A),g);var C=m.map(D=>D(g,A,v));return h[u].apply(h,C)}}else{var o=this.fn.toString(),c=this.fn._compile(e,i),s=this.args;return function(g,A,v){var h=c(g,A,v);if(typeof h!="function")throw new TypeError("Expression '".concat(o,"' did not evaluate to a function; value is:")+` + `.concat(X(h)));if(h.rawArgs)return h(s,e,hg(g,A),g);var x=m.map(C=>C(g,A,v));return h.apply(h,x)}}}forEach(e){e(this.fn,"fn",this);for(var i=0;i'+tf(this.fn)+'('+i.join(',')+')'}toTex(e){var i;return e&&typeof e.handler=="object"&&ka(e.handler,this.name)&&(i=e.handler[this.name](this,e)),typeof i<"u"?i:super.toTex(e)}_toTex(e){var i=this.args.map(function(y){return y.toTex(e)}),m;CM[this.name]&&(m=CM[this.name]),N[this.name]&&(typeof N[this.name].toTex=="function"||typeof N[this.name].toTex=="object"||typeof N[this.name].toTex=="string")&&(m=N[this.name].toTex);var t;switch(typeof m){case"function":t=m(this,e);break;case"string":t=J(m,this,e);break;case"object":switch(typeof m[i.length]){case"function":t=m[i.length](this,e);break;case"string":t=J(m[i.length],this,e);break}}return typeof t<"u"?t:J(MG,this,e)}getIdentifier(){return this.type+":"+this.name}}return zs(R,"name",hy),zs(R,"onUndefinedFunction",function(F){throw new Error("Undefined function "+F)}),zs(R,"fromJSON",function(F){return new R(F.fn,F.args)}),R},{isClass:!0,isNode:!0}),LM="parse",ZG=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],XG=Lr(LM,ZG,T=>{var{typed:N,numeric:V,config:Y,AccessorNode:X,ArrayNode:J,AssignmentNode:R,BlockNode:F,ConditionalNode:e,ConstantNode:i,FunctionAssignmentNode:m,FunctionNode:t,IndexNode:y,ObjectNode:p,OperatorNode:l,ParenthesisNode:d,RangeNode:r,RelationalNode:n,SymbolNode:u}=T,a=N(LM,{string:function(Ve){return P(Ve,{})},"Array | Matrix":function(Ve){return o(Ve,{})},"string, Object":function(Ve,Ze){var Ke=Ze.nodes!==void 0?Ze.nodes:{};return P(Ve,Ke)},"Array | Matrix, Object":o});function o(Pe){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ze=Ve.nodes!==void 0?Ve.nodes:{};return wi(Pe,function(Ke){if(typeof Ke!="string")throw new TypeError("String expected");return P(Ke,Ze)})}var c={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},s={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},b={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},g={true:!0,false:!1,null:null,undefined:void 0},A=["NaN","Infinity"];function v(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:c.NULL,nestingLevel:0,conditionalLevel:null}}function h(Pe,Ve){return Pe.expression.substr(Pe.index,Ve)}function x(Pe){return h(Pe,1)}function C(Pe){Pe.index++}function D(Pe){return Pe.expression.charAt(Pe.index-1)}function L(Pe){return Pe.expression.charAt(Pe.index+1)}function w(Pe){for(Pe.tokenType=c.NULL,Pe.token="",Pe.comment="";;){if(x(Pe)==="#")for(;x(Pe)!==` +`&&x(Pe)!=="";)Pe.comment+=x(Pe),C(Pe);if(a.isWhitespace(x(Pe),Pe.nestingLevel))C(Pe);else break}if(x(Pe)===""){Pe.tokenType=c.DELIMITER;return}if(x(Pe)===` +`&&!Pe.nestingLevel){Pe.tokenType=c.DELIMITER,Pe.token=x(Pe),C(Pe);return}var Ve=x(Pe),Ze=h(Pe,2),Ke=h(Pe,3);if(Ke.length===3&&s[Ke]){Pe.tokenType=c.DELIMITER,Pe.token=Ke,C(Pe),C(Pe),C(Pe);return}if(Ze.length===2&&s[Ze]){Pe.tokenType=c.DELIMITER,Pe.token=Ze,C(Pe),C(Pe);return}if(s[Ve]){Pe.tokenType=c.DELIMITER,Pe.token=Ve,C(Pe);return}if(a.isDigitDot(Ve)){Pe.tokenType=c.NUMBER;var lt=h(Pe,2);if(lt==="0b"||lt==="0o"||lt==="0x"){for(Pe.token+=x(Pe),C(Pe),Pe.token+=x(Pe),C(Pe);a.isHexDigit(x(Pe));)Pe.token+=x(Pe),C(Pe);if(x(Pe)===".")for(Pe.token+=".",C(Pe);a.isHexDigit(x(Pe));)Pe.token+=x(Pe),C(Pe);else if(x(Pe)==="i")for(Pe.token+="i",C(Pe);a.isDigit(x(Pe));)Pe.token+=x(Pe),C(Pe);return}if(x(Pe)==="."){if(Pe.token+=x(Pe),C(Pe),!a.isDigit(x(Pe))){Pe.tokenType=c.DELIMITER;return}}else{for(;a.isDigit(x(Pe));)Pe.token+=x(Pe),C(Pe);a.isDecimalMark(x(Pe),L(Pe))&&(Pe.token+=x(Pe),C(Pe))}for(;a.isDigit(x(Pe));)Pe.token+=x(Pe),C(Pe);if(x(Pe)==="E"||x(Pe)==="e"){if(a.isDigit(L(Pe))||L(Pe)==="-"||L(Pe)==="+"){if(Pe.token+=x(Pe),C(Pe),(x(Pe)==="+"||x(Pe)==="-")&&(Pe.token+=x(Pe),C(Pe)),!a.isDigit(x(Pe)))throw _e(Pe,'Digit expected, got "'+x(Pe)+'"');for(;a.isDigit(x(Pe));)Pe.token+=x(Pe),C(Pe);if(a.isDecimalMark(x(Pe),L(Pe)))throw _e(Pe,'Digit expected, got "'+x(Pe)+'"')}else if(L(Pe)===".")throw C(Pe),_e(Pe,'Digit expected, got "'+x(Pe)+'"')}return}if(a.isAlpha(x(Pe),D(Pe),L(Pe))){for(;a.isAlpha(x(Pe),D(Pe),L(Pe))||a.isDigit(x(Pe));)Pe.token+=x(Pe),C(Pe);ka(b,Pe.token)?Pe.tokenType=c.DELIMITER:Pe.tokenType=c.SYMBOL;return}for(Pe.tokenType=c.UNKNOWN;x(Pe)!=="";)Pe.token+=x(Pe),C(Pe);throw _e(Pe,'Syntax error in part "'+Pe.token+'"')}function M(Pe){do w(Pe);while(Pe.token===` +`)}function S(Pe){Pe.nestingLevel++}function f(Pe){Pe.nestingLevel--}a.isAlpha=function(Ve,Ze,Ke){return a.isValidLatinOrGreek(Ve)||a.isValidMathSymbol(Ve,Ke)||a.isValidMathSymbol(Ze,Ve)},a.isValidLatinOrGreek=function(Ve){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(Ve)},a.isValidMathSymbol=function(Ve,Ze){return/^[\uD835]$/.test(Ve)&&/^[\uDC00-\uDFFF]$/.test(Ze)&&/^[^\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]$/.test(Ze)},a.isWhitespace=function(Ve,Ze){return Ve===" "||Ve===" "||Ve===` +`&&Ze>0},a.isDecimalMark=function(Ve,Ze){return Ve==="."&&Ze!=="/"&&Ze!=="*"&&Ze!=="^"},a.isDigitDot=function(Ve){return Ve>="0"&&Ve<="9"||Ve==="."},a.isDigit=function(Ve){return Ve>="0"&&Ve<="9"},a.isHexDigit=function(Ve){return Ve>="0"&&Ve<="9"||Ve>="a"&&Ve<="f"||Ve>="A"&&Ve<="F"};function P(Pe,Ve){var Ze=v();$s(Ze,{expression:Pe,extraNodes:Ve}),w(Ze);var Ke=E(Ze);if(Ze.token!=="")throw Ze.tokenType===c.DELIMITER?Ye(Ze,"Unexpected operator "+Ze.token):_e(Ze,'Unexpected part "'+Ze.token+'"');return Ke}function E(Pe){var Ve,Ze=[],Ke;for(Pe.token!==""&&Pe.token!==` +`&&Pe.token!==";"&&(Ve=k(Pe),Pe.comment&&(Ve.comment=Pe.comment));Pe.token===` +`||Pe.token===";";)Ze.length===0&&Ve&&(Ke=Pe.token!==";",Ze.push({node:Ve,visible:Ke})),w(Pe),Pe.token!==` +`&&Pe.token!==";"&&Pe.token!==""&&(Ve=k(Pe),Pe.comment&&(Ve.comment=Pe.comment),Ke=Pe.token!==";",Ze.push({node:Ve,visible:Ke}));return Ze.length>0?new F(Ze):(Ve||(Ve=new i(void 0),Pe.comment&&(Ve.comment=Pe.comment)),Ve)}function k(Pe){var Ve,Ze,Ke,lt,vt=O(Pe);if(Pe.token==="="){if(_s(vt))return Ve=vt.name,M(Pe),Ke=k(Pe),new R(new u(Ve),Ke);if(kd(vt))return M(Pe),Ke=k(Pe),new R(vt.object,vt.index,Ke);if(_v(vt)&&_s(vt.fn)&&(lt=!0,Ze=[],Ve=vt.name,vt.args.forEach(function(mt,Et){_s(mt)?Ze[Et]=mt.name:lt=!1}),lt))return M(Pe),Ke=k(Pe),new m(Ve,Ze,Ke);throw _e(Pe,"Invalid left hand side of assignment operator =")}return vt}function O(Pe){for(var Ve=G(Pe);Pe.token==="?";){var Ze=Pe.conditionalLevel;Pe.conditionalLevel=Pe.nestingLevel,M(Pe);var Ke=Ve,lt=k(Pe);if(Pe.token!==":")throw _e(Pe,"False part of conditional expression expected");Pe.conditionalLevel=null,M(Pe);var vt=k(Pe);Ve=new e(Ke,lt,vt),Pe.conditionalLevel=Ze}return Ve}function G(Pe){for(var Ve=z(Pe);Pe.token==="or";)M(Pe),Ve=new l("or","or",[Ve,z(Pe)]);return Ve}function z(Pe){for(var Ve=U(Pe);Pe.token==="xor";)M(Pe),Ve=new l("xor","xor",[Ve,U(Pe)]);return Ve}function U(Pe){for(var Ve=H(Pe);Pe.token==="and";)M(Pe),Ve=new l("and","and",[Ve,H(Pe)]);return Ve}function H(Pe){for(var Ve=B(Pe);Pe.token==="|";)M(Pe),Ve=new l("|","bitOr",[Ve,B(Pe)]);return Ve}function B(Pe){for(var Ve=W(Pe);Pe.token==="^|";)M(Pe),Ve=new l("^|","bitXor",[Ve,W(Pe)]);return Ve}function W(Pe){for(var Ve=q(Pe);Pe.token==="&";)M(Pe),Ve=new l("&","bitAnd",[Ve,q(Pe)]);return Ve}function q(Pe){for(var Ve=[re(Pe)],Ze=[],Ke={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};ka(Ke,Pe.token);){var lt={name:Pe.token,fn:Ke[Pe.token]};Ze.push(lt),M(Pe),Ve.push(re(Pe))}return Ve.length===1?Ve[0]:Ve.length===2?new l(Ze[0].name,Ze[0].fn,Ve):new n(Ze.map(vt=>vt.fn),Ve)}function re(Pe){var Ve,Ze,Ke,lt;Ve=ie(Pe);for(var vt={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};ka(vt,Pe.token);)Ze=Pe.token,Ke=vt[Ze],M(Pe),lt=[Ve,ie(Pe)],Ve=new l(Ze,Ke,lt);return Ve}function ie(Pe){var Ve,Ze,Ke,lt;Ve=le(Pe);for(var vt={to:"to",in:"to"};ka(vt,Pe.token);)Ze=Pe.token,Ke=vt[Ze],M(Pe),Ze==="in"&&Pe.token===""?Ve=new l("*","multiply",[Ve,new u("in")],!0):(lt=[Ve,le(Pe)],Ve=new l(Ze,Ke,lt));return Ve}function le(Pe){var Ve,Ze=[];if(Pe.token===":"?Ve=new i(1):Ve=he(Pe),Pe.token===":"&&Pe.conditionalLevel!==Pe.nestingLevel){for(Ze.push(Ve);Pe.token===":"&&Ze.length<3;)M(Pe),Pe.token===")"||Pe.token==="]"||Pe.token===","||Pe.token===""?Ze.push(new u("end")):Ze.push(he(Pe));Ze.length===3?Ve=new r(Ze[0],Ze[2],Ze[1]):Ve=new r(Ze[0],Ze[1])}return Ve}function he(Pe){var Ve,Ze,Ke,lt;Ve=$(Pe);for(var vt={"+":"add","-":"subtract"};ka(vt,Pe.token);){Ze=Pe.token,Ke=vt[Ze],M(Pe);var mt=$(Pe);mt.isPercentage?lt=[Ve,new l("*","multiply",[Ve,mt])]:lt=[Ve,mt],Ve=new l(Ze,Ke,lt)}return Ve}function $(Pe){var Ve,Ze,Ke,lt;Ve=Z(Pe),Ze=Ve;for(var vt={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide"};ka(vt,Pe.token);)Ke=Pe.token,lt=vt[Ke],M(Pe),Ze=Z(Pe),Ve=new l(Ke,lt,[Ve,Ze]);return Ve}function Z(Pe){var Ve,Ze;for(Ve=K(Pe),Ze=Ve;Pe.tokenType===c.SYMBOL||Pe.token==="in"&&Bi(Ve)||Pe.tokenType===c.NUMBER&&!Bi(Ze)&&(!ds(Ze)||Ze.op==="!")||Pe.token==="(";)Ze=K(Pe),Ve=new l("*","multiply",[Ve,Ze],!0);return Ve}function K(Pe){for(var Ve=Q(Pe),Ze=Ve,Ke=[];Pe.token==="/"&&sb(Ze);)if(Ke.push($s({},Pe)),M(Pe),Pe.tokenType===c.NUMBER)if(Ke.push($s({},Pe)),M(Pe),Pe.tokenType===c.SYMBOL||Pe.token==="(")$s(Pe,Ke.pop()),Ke.pop(),Ze=Q(Pe),Ve=new l("/","divide",[Ve,Ze]);else{Ke.pop(),$s(Pe,Ke.pop());break}else{$s(Pe,Ke.pop());break}return Ve}function Q(Pe){var Ve,Ze,Ke,lt;Ve=ae(Pe);for(var vt={"%":"mod",mod:"mod"};ka(vt,Pe.token);)Ze=Pe.token,Ke=vt[Ze],M(Pe),Ze==="%"&&Pe.tokenType===c.DELIMITER&&Pe.token!=="("?Ve=new l("/","divide",[Ve,new i(100)],!1,!0):(lt=[Ve,ae(Pe)],Ve=new l(Ze,Ke,lt));return Ve}function ae(Pe){var Ve,Ze,Ke,lt={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return ka(lt,Pe.token)?(Ke=lt[Pe.token],Ve=Pe.token,M(Pe),Ze=[ae(Pe)],new l(Ve,Ke,Ze)):fe(Pe)}function fe(Pe){var Ve,Ze,Ke,lt;return Ve=te(Pe),(Pe.token==="^"||Pe.token===".^")&&(Ze=Pe.token,Ke=Ze==="^"?"pow":"dotPow",M(Pe),lt=[Ve,ae(Pe)],Ve=new l(Ze,Ke,lt)),Ve}function te(Pe){var Ve,Ze,Ke,lt;Ve=ne(Pe);for(var vt={"!":"factorial","'":"ctranspose"};ka(vt,Pe.token);)Ze=Pe.token,Ke=vt[Ze],w(Pe),lt=[Ve],Ve=new l(Ze,Ke,lt),Ve=oe(Pe,Ve);return Ve}function ne(Pe){var Ve=[];if(Pe.tokenType===c.SYMBOL&&ka(Pe.extraNodes,Pe.token)){var Ze=Pe.extraNodes[Pe.token];if(w(Pe),Pe.token==="("){if(Ve=[],S(Pe),w(Pe),Pe.token!==")")for(Ve.push(k(Pe));Pe.token===",";)w(Pe),Ve.push(k(Pe));if(Pe.token!==")")throw _e(Pe,"Parenthesis ) expected");f(Pe),w(Pe)}return new Ze(Ve)}return ce(Pe)}function ce(Pe){var Ve,Ze;return Pe.tokenType===c.SYMBOL||Pe.tokenType===c.DELIMITER&&Pe.token in b?(Ze=Pe.token,w(Pe),ka(g,Ze)?Ve=new i(g[Ze]):A.indexOf(Ze)!==-1?Ve=new i(V(Ze,"number")):Ve=new u(Ze),Ve=oe(Pe,Ve),Ve):de(Pe)}function oe(Pe,Ve,Ze){for(var Ke;(Pe.token==="("||Pe.token==="["||Pe.token===".")&&(!Ze||Ze.indexOf(Pe.token)!==-1);)if(Ke=[],Pe.token==="(")if(_s(Ve)||kd(Ve)){if(S(Pe),w(Pe),Pe.token!==")")for(Ke.push(k(Pe));Pe.token===",";)w(Pe),Ke.push(k(Pe));if(Pe.token!==")")throw _e(Pe,"Parenthesis ) expected");f(Pe),w(Pe),Ve=new t(Ve,Ke)}else return Ve;else if(Pe.token==="["){if(S(Pe),w(Pe),Pe.token!=="]")for(Ke.push(k(Pe));Pe.token===",";)w(Pe),Ke.push(k(Pe));if(Pe.token!=="]")throw _e(Pe,"Parenthesis ] expected");f(Pe),w(Pe),Ve=new X(Ve,new y(Ke))}else{if(w(Pe),Pe.tokenType!==c.SYMBOL)throw _e(Pe,"Property name expected after dot");Ke.push(new i(Pe.token)),w(Pe);var lt=!0;Ve=new X(Ve,new y(Ke,lt))}return Ve}function de(Pe){var Ve,Ze;return Pe.token==='"'?(Ze=we(Pe),Ve=new i(Ze),Ve=oe(Pe,Ve),Ve):Se(Pe)}function we(Pe){for(var Ve="";x(Pe)!==""&&x(Pe)!=='"';)x(Pe)==="\\"&&(Ve+=x(Pe),C(Pe)),Ve+=x(Pe),C(Pe);if(w(Pe),Pe.token!=='"')throw _e(Pe,'End of string " expected');return w(Pe),JSON.parse('"'+Ve+'"')}function Se(Pe){var Ve,Ze;return Pe.token==="'"?(Ze=Te(Pe),Ve=new i(Ze),Ve=oe(Pe,Ve),Ve):Fe(Pe)}function Te(Pe){for(var Ve="";x(Pe)!==""&&x(Pe)!=="'";)x(Pe)==="\\"&&(Ve+=x(Pe),C(Pe)),Ve+=x(Pe),C(Pe);if(w(Pe),Pe.token!=="'")throw _e(Pe,"End of string ' expected");return w(Pe),JSON.parse('"'+Ve+'"')}function Fe(Pe){var Ve,Ze,Ke,lt;if(Pe.token==="["){if(S(Pe),w(Pe),Pe.token!=="]"){var vt=Ie(Pe);if(Pe.token===";"){for(Ke=1,Ze=[vt];Pe.token===";";)w(Pe),Ze[Ke]=Ie(Pe),Ke++;if(Pe.token!=="]")throw _e(Pe,"End of matrix ] expected");f(Pe),w(Pe),lt=Ze[0].items.length;for(var mt=1;mt{var{typed:N,parse:V}=T;return N(PM,{string:function(X){return V(X).compile()},"Array | Matrix":function(X){return wi(X,function(J){return V(J).compile()})}})}),NM="evaluate",KG=["typed","parse"],JG=Lr(NM,KG,T=>{var{typed:N,parse:V}=T;return N(NM,{string:function(X){var J=l0();return V(X).compile().evaluate(J)},"string, Map | Object":function(X,J){return V(X).compile().evaluate(J)},"Array | Matrix":function(X){var J=l0();return wi(X,function(R){return V(R).compile().evaluate(J)})},"Array | Matrix, Map | Object":function(X,J){return wi(X,function(R){return V(R).compile().evaluate(J)})}})}),QG="Parser",qG=["evaluate"],eW=Lr(QG,qG,T=>{var{evaluate:N}=T;function V(){if(!(this instanceof V))throw new SyntaxError("Constructor must be called with the new operator");Object.defineProperty(this,"scope",{value:l0(),writable:!1})}return V.prototype.type="Parser",V.prototype.isParser=!0,V.prototype.evaluate=function(Y){return N(Y,this.scope)},V.prototype.get=function(Y){if(this.scope.has(Y))return this.scope.get(Y)},V.prototype.getAll=function(){return MF(this.scope)},V.prototype.getAllAsMap=function(){return this.scope},V.prototype.set=function(Y,X){return this.scope.set(Y,X),X},V.prototype.remove=function(Y){this.scope.delete(Y)},V.prototype.clear=function(){this.scope.clear()},V},{isClass:!0}),RM="parser",tW=["typed","Parser"],rW=Lr(RM,tW,T=>{var{typed:N,Parser:V}=T;return N(RM,{"":function(){return new V}})}),FM="lup",nW=["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtract","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],aW=Lr(FM,nW,T=>{var{typed:N,matrix:V,abs:Y,addScalar:X,divideScalar:J,multiplyScalar:R,subtract:F,larger:e,equalScalar:i,unaryMinus:m,DenseMatrix:t,SparseMatrix:y,Spa:p}=T;return N(FM,{DenseMatrix:function(n){return l(n)},SparseMatrix:function(n){return d(n)},Array:function(n){var u=V(n),a=l(u);return{L:a.L.valueOf(),U:a.U.valueOf(),p:a.p}}});function l(r){var n=r._size[0],u=r._size[1],a=Math.min(n,u),o=ei(r._data),c=[],s=[n,a],b=[],g=[a,u],A,v,h,x=[];for(A=0;A0)for(A=0;A0&&O.forEach(0,w-1,function(W,q){y._forEachRow(W,b,g,A,function(re,ie){re>W&&O.accumulate(re,m(R(ie,q)))})});var U=w,H=O.get(w),B=Y(H);O.forEach(w+1,n-1,function(W,q){var re=Y(q);e(re,B)&&(U=W,B=re,H=q)}),w!==U&&(y._swapRows(w,U,v[1],b,g,A),y._swapRows(w,U,D[1],h,x,C),O.swap(w,U),P(w,U)),O.forEach(0,n-1,function(W,q){W<=w?(h.push(q),x.push(W)):(q=J(q,H),i(q,0)||(b.push(q),g.push(W)))})};for(w=0;w{var{typed:N,matrix:V,zeros:Y,identity:X,isZero:J,equal:R,sign:F,sqrt:e,conj:i,unaryMinus:m,addScalar:t,divideScalar:y,multiplyScalar:p,subtract:l,complex:d}=T;return $s(N(IM,{DenseMatrix:function(o){return n(o)},SparseMatrix:function(o){return u()},Array:function(o){var c=V(o),s=n(c);return{Q:s.Q.valueOf(),R:s.R.valueOf()}}}),{_denseQRimpl:r});function r(a){var o=a._size[0],c=a._size[1],s=X([o],"dense"),b=s._data,g=a.clone(),A=g._data,v,h,x,C=Y([o],"");for(x=0;x0)for(var s=c[0][0].type==="Complex"?d(0):0,b=0;b=0;){var e=V[R+F],i=V[Y+e];i===-1?(F--,J[N++]=e):(V[Y+e]=V[X+i],++F,V[R+F]=i)}return N}function lW(T,N){if(!T)return null;var V=0,Y,X=[],J=[],R=0,F=N,e=2*N;for(Y=0;Y=0;Y--)T[Y]!==-1&&(J[F+Y]=J[R+T[Y]],J[R+T[Y]]=Y);for(Y=0;Y{var{add:N,multiply:V,transpose:Y}=T;return function(m,t){if(!t||m<=0||m>3)return null;var y=t._size,p=y[0],l=y[1],d=0,r=Math.max(16,10*Math.sqrt(l));r=Math.min(l-2,r);var n=X(m,t,p,l,r);fW(n,e,null);for(var u=n._index,a=n._ptr,o=a[l],c=[],s=[],b=0,g=l+1,A=2*(l+1),v=3*(l+1),h=4*(l+1),x=5*(l+1),C=6*(l+1),D=7*(l+1),L=c,w=J(l,a,s,b,v,L,A,D,g,C,h,x),M=R(l,a,s,x,h,C,r,g,v,L,A),S=0,f,P,E,k,O,G,z,U,H,B,W,q,re,ie,le,he;M$?(G=E,z=Q,U=s[b+E]-$):(G=u[Q++],z=a[G],U=s[b+G]),O=1;O<=U;O++)f=u[z++],!((H=s[g+f])<=0)&&(K+=H,s[g+f]=-H,u[fe++]=f,s[A+f]!==-1&&(L[s[A+f]]=L[f]),L[f]!==-1?s[A+L[f]]=s[A+f]:s[v+s[x+f]]=s[A+f]);G!==E&&(a[G]=yv(E),s[C+G]=0)}for($!==0&&(o=fe),s[x+E]=K,a[E]=ae,s[b+E]=fe-ae,s[h+E]=-2,w=F(w,d,s,C,l),B=ae;B=w?s[C+G]-=H:s[C+G]!==0&&(s[C+G]=s[x+G]+te)}for(B=ae;B0?(he+=ne,u[ie++]=G,le+=G):(a[G]=yv(E),s[C+G]=0)}s[h+f]=ie-q+1;var ce=ie,oe=q+s[b+f];for(Q=re+1;Q=0))for(le=L[f],f=s[D+le],s[D+le]=-1;f!==-1&&s[A+f]!==-1;f=s[A+f],w++){for(U=s[b+f],W=s[h+f],Q=a[f]+1;Q<=a[f]+U-1;Q++)s[C+u[Q]]=w;var we=f;for(P=s[A+f];P!==-1;){var Se=s[b+P]===U&&s[h+P]===W;for(Q=a[P]+1;Se&&Q<=a[P]+U-1;Q++)s[C+u[Q]]!==w&&(Se=0);Se?(a[P]=yv(f),s[g+f]+=s[g+P],s[g+P]=0,s[h+P]=-1,P=s[A+P],s[A+we]=P):(we=P,P=s[A+P])}}for(Q=ae,B=ae;B=0;P--)s[g+P]>0||(s[A+P]=s[v+a[P]],s[v+a[P]]=P);for(G=l;G>=0;G--)s[g+G]<=0||a[G]!==-1&&(s[A+G]=s[v+a[G]],s[v+a[G]]=G);for(E=0,f=0;f<=l;f++)a[f]===-1&&(E=GC(f,E,s,v,A,c,C));return c.splice(c.length-1,1),c};function X(i,m,t,y,p){var l=Y(m);if(i===1&&y===t)return N(m,l);if(i===2){for(var d=l._index,r=l._ptr,n=0,u=0;up))for(var o=r[u+1];ad)t[r+c]=0,t[p+c]=-1,o++,m[c]=yv(i),t[r+i]++;else{var b=t[n+s];b!==-1&&(u[b]=c),t[a+c]=t[n+s],t[n+s]=c}}return o}function F(i,m,t,y,p){if(i<2||i+m<0){for(var l=0;l{var{transpose:N}=T;return function(V,Y,X,J){if(!V||!Y||!X)return null;var R=V._size,F=R[0],e=R[1],i,m,t,y,p,l,d,r=4*e+(J?e+F+1:0),n=[],u=0,a=e,o=2*e,c=3*e,s=4*e,b=5*e+1;for(t=0;t=1&&g[m]++,x.jleaf===2&&g[x.q]--}Y[m]!==-1&&(n[u+m]=Y[m])}for(m=0;m{var{add:N,multiply:V,transpose:Y}=T,X=vW({add:N,multiply:V,transpose:Y}),J=mW({transpose:Y});return function(e,i,m){var t=i._ptr,y=i._size,p=y[1],l,d={};if(d.q=X(e,i),e&&!d.q)return null;if(m){var r=e?sW(i,null,d.q,0):i;d.parent=uW(r,1);var n=lW(d.parent,p);if(d.cp=J(r,d.parent,n,1),r&&d.parent&&d.cp&&R(r,d))for(d.unz=0,l=0;l=0;b--)for(A=i[b],v=i[b+1],g=A;g=0;s--)d[s]=-1,b=r[s],b!==-1&&(n[c+b]++===0&&(n[o+b]=s),n[u+s]=n[a+b],n[a+b]=s);for(e.lnz=0,e.m2=y,b=0;b=0;){T=Y[y];var p=X?X[T]:T;Ab(R,T)||(WC(R,T),Y[e+y]=p<0?0:_M(R[p]));var l=1;for(m=Y[e+y],t=p<0?0:_M(R[p+1]);m{var{divideScalar:N,multiply:V,subtract:Y}=T;return function(J,R,F,e,i,m,t){var y=J._values,p=J._index,l=J._ptr,d=J._size,r=d[1],n=R._values,u=R._index,a=R._ptr,o,c,s,b,g=AW(J,R,F,e,m);for(o=g;o{var{abs:N,divideScalar:V,multiply:Y,subtract:X,larger:J,largerEq:R,SparseMatrix:F}=T,e=SW({divideScalar:V,multiply:Y,subtract:X});return function(m,t,y){if(!m)return null;var p=m._size,l=p[1],d,r=100,n=100;t&&(d=t.q,r=t.lnz||r,n=t.unz||n);var u=[],a=[],o=[],c=new F({values:u,index:a,ptr:o,size:[l,l]}),s=[],b=[],g=[],A=new F({values:s,index:b,ptr:g,size:[l,l]}),v=[],h,x,C=[],D=[];for(h=0;h{var{typed:N,abs:V,add:Y,multiply:X,transpose:J,divideScalar:R,subtract:F,larger:e,largerEq:i,SparseMatrix:m}=T,t=bW({add:Y,multiply:X,transpose:J}),y=DW({abs:V,divideScalar:R,multiply:X,subtract:F,larger:e,largerEq:i,SparseMatrix:m});return N(OM,{"SparseMatrix, number, number":function(l,d,r){if(!Ya(d)||d<0||d>3)throw new Error("Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]");if(r<0||r>1)throw new Error("Partial pivoting threshold must be a number from 0 to 1");var n=t(d,l,!1),u=y(l,n,r);return{L:u.L,U:u.U,p:u.pinv,q:n.q,toString:function(){return"L: "+this.L.toString()+` +U: `+this.U.toString()+` +p: `+this.p.toString()+(this.q?` +q: `+this.q.toString():"")+` +`}}}})});function zM(T,N){var V,Y=N.length,X=[];if(T)for(V=0;V{var{typed:N,matrix:V,lup:Y,slu:X,usolve:J,lsolve:R,DenseMatrix:F}=T,e=Qg({DenseMatrix:F});return N(kM,{"Array, Array | Matrix":function(y,p){y=V(y);var l=Y(y),d=m(l.L,l.U,l.p,null,p);return d.valueOf()},"DenseMatrix, Array | Matrix":function(y,p){var l=Y(y);return m(l.L,l.U,l.p,null,p)},"SparseMatrix, Array | Matrix":function(y,p){var l=Y(y);return m(l.L,l.U,l.p,null,p)},"SparseMatrix, Array | Matrix, number, number":function(y,p,l,d){var r=X(y,l,d);return m(r.L,r.U,r.p,r.q,p)},"Object, Array | Matrix":function(y,p){return m(y.L,y.U,y.p,y.q,p)}});function i(t){if(Qa(t))return t;if(ro(t))return V(t);throw new TypeError("Invalid Matrix LU decomposition")}function m(t,y,p,l,d){t=i(t),y=i(y),p&&(d=e(t,d,!0),d._data=zM(p,d._data));var r=R(t,d),n=J(y,r);return l&&(n._data=zM(l,n._data)),n}}),BM="polynomialRoot",FW=["typed","isZero","equalScalar","add","subtract","multiply","divide","sqrt","unaryMinus","cbrt","typeOf","im","re"],IW=Lr(BM,FW,T=>{var{typed:N,isZero:V,equalScalar:Y,add:X,subtract:J,multiply:R,divide:F,sqrt:e,unaryMinus:i,cbrt:m,typeOf:t,im:y,re:p}=T;return N(BM,{"number|Complex, ...number|Complex":(l,d)=>{for(var r=[l,...d];r.length>0&&V(r[r.length-1]);)r.pop();if(r.length<2)throw new RangeError("Polynomial [".concat(l,", ").concat(d,"] must have a non-zero non-constant coefficient"));switch(r.length){case 2:return[i(F(r[0],r[1]))];case 3:{var[n,u,a]=r,o=R(2,a),c=R(u,u),s=R(4,a,n);if(Y(c,s))return[F(i(u),o)];var b=e(J(c,s));return[F(J(b,u),o),F(J(i(b),u),o)]}case 4:{var[g,A,v,h]=r,x=i(R(3,h)),C=R(v,v),D=R(3,h,A),L=X(R(2,v,v,v),R(27,h,h,g)),w=R(9,h,v,A);if(Y(C,D)&&Y(L,w))return[F(v,x)];var M=J(C,D),S=J(L,w),f=X(R(18,h,v,A,g),R(v,v,A,A)),P=X(R(4,v,v,v,g),R(4,h,A,A,A),R(27,h,h,g,g));if(Y(f,P))return[F(J(R(4,h,v,A),X(R(9,h,h,g),R(v,v,v))),R(h,M)),F(J(R(9,h,g),R(v,A)),R(2,M))];var E;Y(C,D)?E=S:E=F(X(S,e(J(R(S,S),R(4,M,M,M)))),2);var k=!0,O=m(E,k).toArray().map(G=>F(X(v,G,F(M,G)),x));return O.map(G=>t(G)==="Complex"&&Y(p(G),p(G)+y(G))?p(G):G)}default:throw new RangeError("only implemented for cubic or lower-order polynomials, not ".concat(r))}}})}),_W="Help",OW=["parse"],zW=Lr(_W,OW,T=>{var{parse:N}=T;function V(Y){if(!(this instanceof V))throw new SyntaxError("Constructor must be called with the new operator");if(!Y)throw new Error('Argument "doc" missing');this.doc=Y}return V.prototype.type="Help",V.prototype.isHelp=!0,V.prototype.toString=function(){var Y=this.doc||{},X=` +`;if(Y.name&&(X+="Name: "+Y.name+` + +`),Y.category&&(X+="Category: "+Y.category+` + +`),Y.description&&(X+=`Description: + `+Y.description+` + +`),Y.syntax&&(X+=`Syntax: + `+Y.syntax.join(` + `)+` + +`),Y.examples){X+=`Examples: +`;for(var J={},R=0;RJ!=="mathjs").forEach(J=>{X[J]=Y[J]}),new V(X)},V.prototype.valueOf=V.prototype.toString,V},{isClass:!0}),kW="Chain",BW=["?on","math","typed"],UW=Lr(kW,BW,T=>{var{on:N,math:V,typed:Y}=T;function X(i){if(!(this instanceof X))throw new SyntaxError("Constructor must be called with the new operator");r8(i)?this.value=i.value:this.value=i}X.prototype.type="Chain",X.prototype.isChain=!0,X.prototype.done=function(){return this.value},X.prototype.valueOf=function(){return this.value},X.prototype.toString=function(){return vi(this.value)},X.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},X.fromJSON=function(i){return new X(i.value)};function J(i,m){typeof m=="function"&&(X.prototype[i]=F(m))}function R(i,m){GR(X.prototype,i,function(){var y=m();if(typeof y=="function")return F(y)})}function F(i){return function(){if(arguments.length===0)return new X(i(this.value));for(var m=[this.value],t=0;ti[l])};for(var y in i)t(y)}};var e={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return X.createProxy(V),N&&N("import",function(i,m,t){t||R(i,m)}),X},{isClass:!0}),UM={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]},HW={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]},VW={name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]},GW={name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]},WW={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]},YW={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]},ZW={name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]},XW={name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]},jW={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]},$W={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]},KW={name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as `(1 + sqrt(5)) / 2` and is approximately 1.618034...",examples:["phi"],seealso:[]},HM={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]},JW={name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]},QW={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]},qW={name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]},eY={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]},tY={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]},rY={name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",examples:["0.1 + 0.2","bignumber(0.1) + bignumber(0.2)",'bignumber("7.2")','bignumber("7.2e500")',"bignumber([0.1, 0.2, 0.3])"],seealso:["boolean","complex","fraction","index","matrix","string","unit"]},nY={name:"boolean",category:"Construction",syntax:["x","boolean(x)"],description:"Convert a string or number into a boolean.",examples:["boolean(0)","boolean(1)","boolean(3)",'boolean("true")','boolean("false")',"boolean([1, 0, 1, 1])"],seealso:["bignumber","complex","index","matrix","number","string","unit"]},aY={name:"complex",category:"Construction",syntax:["complex()","complex(re, im)","complex(string)"],description:"Create a complex number.",examples:["complex()","complex(2, 3)",'complex("7 - 2i")'],seealso:["bignumber","boolean","index","matrix","number","string","unit"]},iY={name:"createUnit",category:"Construction",syntax:["createUnit(definitions)","createUnit(name, definition)"],description:"Create a user-defined unit and register it with the Unit type.",examples:['createUnit("foo")','createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})','createUnit("mph", "1 mile/hour")'],seealso:["unit","splitUnit"]},oY={name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(matrix)","fraction(num,den)","fraction({n: num, d: den})"],description:"Create a fraction from a number or from integer numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)","fraction({n: 333, d: 53})","fraction([sqrt(9), sqrt(10), sqrt(11)])"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]},sY={name:"index",category:"Construction",syntax:["[start]","[start:end]","[start:step:end]","[start1, start 2, ...]","[start1:end1, start2:end2, ...]","[start1:step1:end1, start2:step2:end2, ...]"],description:"Create an index to get or replace a subset of a matrix",examples:["[1, 2, 3]","A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[1:2, 1:2] = ones(2, 2)"],seealso:["bignumber","boolean","complex","matrix,","number","range","string","unit"]},lY={name:"matrix",category:"Construction",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()",'matrix("dense")',"matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])",'matrix([3, 4; 5, 6], "sparse")','matrix([3, 4; 5, 6], "sparse", "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","sparse"]},uY={name:"number",category:"Construction",syntax:["x","number(x)","number(unit, valuelessUnit)"],description:"Create a number or convert a string or boolean into a number.",examples:["2","2e3","4.05","number(2)",'number("7.2")',"number(true)","number([true, false, true, true])",'number(unit("52cm"), "m")'],seealso:["bignumber","boolean","complex","fraction","index","matrix","string","unit"]},fY={name:"sparse",category:"Construction",syntax:["sparse()","sparse([a1, b1, ...; a1, b2, ...])",'sparse([a1, b1, ...; a1, b2, ...], "number")'],description:"Create a sparse matrix.",examples:["sparse()","sparse([3, 4; 5, 6])",'sparse([3, 0; 5, 0], "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","matrix"]},cY={name:"splitUnit",category:"Construction",syntax:["splitUnit(unit: Unit, parts: Unit[])"],description:"Split a unit in an array of units whose sum is equal to the original unit.",examples:['splitUnit(1 m, ["feet", "inch"])'],seealso:["unit","createUnit"]},hY={name:"string",category:"Construction",syntax:['"text"',"string(x)"],description:"Create a string or convert a value to a string",examples:['"Hello World!"',"string(4.2)","string(3 + 2i)"],seealso:["bignumber","boolean","complex","index","matrix","number","unit"]},vY={name:"unit",category:"Construction",syntax:["value unit","unit(value, unit)","unit(string)"],description:"Create a unit.",examples:["5.5 mm","3 inch",'unit(7.1, "kilogram")','unit("23 deg")'],seealso:["bignumber","boolean","complex","index","matrix","number","string"]},dY={name:"config",category:"Core",syntax:["config()","config(options)"],description:"Get configuration or change configuration.",examples:["config()","1/3 + 1/4",'config({number: "Fraction"})',"1/3 + 1/4"],seealso:[]},pY={name:"import",category:"Core",syntax:["import(functions)","import(functions, options)"],description:"Import functions or constants from an object.",examples:["import({myFn: f(x)=x^2, myConstant: 32 })","myFn(2)","myConstant"],seealso:[]},gY={name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number": f(x)=x+x })',"double(2)",'double("hello")'],seealso:[]},mY={name:"derivative",category:"Algebra",syntax:["derivative(expr, variable)","derivative(expr, variable, {simplify: boolean})"],description:"Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.",examples:['derivative("2x^3", "x")','derivative("2x^3", "x", {simplify: false})','derivative("2x^2 + 3x + 4", "x")','derivative("sin(2x)", "x")','f = parse("x^2 + x")','x = parse("x")',"df = derivative(f, x)","df.evaluate({x: 3})"],seealso:["simplify","parse","evaluate"]},yY={name:"leafCount",category:"Algebra",syntax:["leafCount(expr)"],description:"Computes the number of leaves in the parse tree of the given expression",examples:['leafCount("e^(i*pi)-1")','leafCount(parse("{a: 22/7, b: 10^(1/2)}"))'],seealso:["simplify"]},xY={name:"lsolve",category:"Algebra",syntax:["x=lsolve(L, b)"],description:"Finds one solution of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolveAll","lup","lusolve","usolve","matrix","sparse"]},bY={name:"lsolveAll",category:"Algebra",syntax:["x=lsolveAll(L, b)"],description:"Finds all solutions of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolve","lup","lusolve","usolve","matrix","sparse"]},wY={name:"lup",category:"Algebra",syntax:["lup(m)"],description:"Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U",examples:["lup([[2, 1], [1, 4]])","lup(matrix([[2, 1], [1, 4]]))","lup(sparse([[2, 1], [1, 4]]))"],seealso:["lusolve","lsolve","usolve","matrix","sparse","slu","qr"]},AY={name:"lusolve",category:"Algebra",syntax:["x=lusolve(A, b)","x=lusolve(lu, b)"],description:"Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lusolve(a, b)"],seealso:["lup","slu","lsolve","usolve","matrix","sparse"]},TY={name:"polynomialRoot",category:"Algebra",syntax:["x=polynomialRoot(-6, 3)","x=polynomialRoot(4, -4, 1)","x=polynomialRoot(-8, 12, -6, 1)"],description:"Finds the roots of a univariate polynomial given by its coefficients starting from constant, linear, and so on, increasing in degree.",examples:["a = polynomialRoot(-6, 11, -6 1)"],seealso:["cbrt","sqrt"]},MY={name:"qr",category:"Algebra",syntax:["qr(A)"],description:"Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.",examples:["qr([[1, -1, 4], [1, 4, -2], [1, 4, 2], [1, -1, 0]])"],seealso:["lup","slu","matrix"]},SY={name:"rationalize",category:"Algebra",syntax:["rationalize(expr)","rationalize(expr, scope)","rationalize(expr, scope, detailed)"],description:"Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.",examples:['rationalize("2x/y - y/(x+1)")','rationalize("2x/y - y/(x+1)", true)'],seealso:["simplify"]},EY={name:"resolve",category:"Algebra",syntax:["resolve(node, scope)"],description:"Recursively substitute variables in an expression tree.",examples:['resolve(parse("1 + x"), { x: 7 })','resolve(parse("size(text)"), { text: "Hello World" })','resolve(parse("x + y"), { x: parse("3z") })','resolve(parse("3x"), { x: parse("y+z"), z: parse("w^y") })'],seealso:["simplify","evaluate"],mayThrow:["ReferenceError"]},CY={name:"simplify",category:"Algebra",syntax:["simplify(expr)","simplify(expr, rules)"],description:"Simplify an expression tree.",examples:['simplify("3 + 2 / 4")','simplify("2x + x")','f = parse("x * (x + 2 + x)")',"simplified = simplify(f)","simplified.evaluate({x: 2})"],seealso:["simplifyCore","derivative","evaluate","parse","rationalize","resolve"]},DY={name:"simplifyConstant",category:"Algebra",syntax:["simplifyConstant(expr)","simplifyConstant(expr, options)"],description:"Replace constant subexpressions of node with their values.",examples:['simplifyConatant("(3-3)*x")','simplifyConstant(parse("z-cos(tau/8)"))'],seealso:["simplify","simplifyCore","evaluate"]},LY={name:"simplifyCore",category:"Algebra",syntax:["simplifyCore(node)"],description:"Perform simple one-pass simplifications on an expression tree.",examples:['simplifyCore(parse("0*x"))','simplifyCore(parse("(x+0)*2"))'],seealso:["simplify","simplifyConstant","evaluate"]},PY={name:"slu",category:"Algebra",syntax:["slu(A, order, threshold)"],description:"Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U",examples:["slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)"],seealso:["lusolve","lsolve","usolve","matrix","sparse","lup","qr"]},NY={name:"symbolicEqual",category:"Algebra",syntax:["symbolicEqual(expr1, expr2)","symbolicEqual(expr1, expr2, options)"],description:"Returns true if the difference of the expressions simplifies to 0",examples:['symbolicEqual("x*y","y*x")','symbolicEqual("abs(x^2)", "x^2")','symbolicEqual("abs(x)", "x", {context: {abs: {trivial: true}}})'],seealso:["simplify","evaluate"]},RY={name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds one solution of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolveAll","lup","lusolve","lsolve","matrix","sparse"]},FY={name:"usolveAll",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds all solutions of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolve","lup","lusolve","lsolve","matrix","sparse"]},IY={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]},_Y={name:"add",category:"Operators",syntax:["x + y","add(x, y)"],description:"Add two values.",examples:["a = 2.1 + 3.6","a - 3.6","3 + 2i","3 cm + 2 inch",'"2.3" + "4"'],seealso:["subtract"]},OY={name:"cbrt",category:"Arithmetic",syntax:["cbrt(x)","cbrt(x, allRoots)"],description:"Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:["cbrt(64)","cube(4)","cbrt(-8)","cbrt(2 + 3i)","cbrt(8i)","cbrt(8i, true)","cbrt(27 m^3)"],seealso:["square","sqrt","cube","multiply"]},zY={name:"ceil",category:"Arithmetic",syntax:["ceil(x)"],description:"Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.",examples:["ceil(3.2)","ceil(3.8)","ceil(-4.2)"],seealso:["floor","fix","round"]},kY={name:"cube",category:"Arithmetic",syntax:["cube(x)"],description:"Compute the cube of a value. The cube of x is x * x * x.",examples:["cube(2)","2^3","2 * 2 * 2"],seealso:["multiply","square","pow"]},BY={name:"divide",category:"Operators",syntax:["x / y","divide(x, y)"],description:"Divide two values.",examples:["a = 2 / 3","a * 3","4.5 / 2","3 + 4 / 2","(3 + 4) / 2","18 km / 4.5"],seealso:["multiply"]},UY={name:"dotDivide",category:"Operators",syntax:["x ./ y","dotDivide(x, y)"],description:"Divide two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a ./ b"],seealso:["multiply","dotMultiply","divide"]},HY={name:"dotMultiply",category:"Operators",syntax:["x .* y","dotMultiply(x, y)"],description:"Multiply two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a .* b"],seealso:["multiply","divide","dotDivide"]},VY={name:"dotPow",category:"Operators",syntax:["x .^ y","dotPow(x, y)"],description:"Calculates the power of x to y element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","a .^ 2"],seealso:["pow"]},GY={name:"exp",category:"Arithmetic",syntax:["exp(x)"],description:"Calculate the exponent of a value.",examples:["exp(1.3)","e ^ 1.3","log(exp(1.3))","x = 2.4","(exp(i*x) == cos(x) + i*sin(x)) # Euler's formula"],seealso:["expm","expm1","pow","log"]},WY={name:"expm",category:"Arithmetic",syntax:["exp(x)"],description:"Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.",examples:["expm([[0,2],[0,0]])"],seealso:["exp"]},YY={name:"expm1",category:"Arithmetic",syntax:["expm1(x)"],description:"Calculate the value of subtracting 1 from the exponential value.",examples:["expm1(2)","pow(e, 2) - 1","log(expm1(2) + 1)"],seealso:["exp","pow","log"]},ZY={name:"fix",category:"Arithmetic",syntax:["fix(x)"],description:"Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.",examples:["fix(3.2)","fix(3.8)","fix(-4.2)","fix(-4.8)"],seealso:["ceil","floor","round"]},XY={name:"floor",category:"Arithmetic",syntax:["floor(x)"],description:"Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.",examples:["floor(3.2)","floor(3.8)","floor(-4.2)"],seealso:["ceil","fix","round"]},jY={name:"gcd",category:"Arithmetic",syntax:["gcd(a, b)","gcd(a, b, c, ...)"],description:"Compute the greatest common divisor.",examples:["gcd(8, 12)","gcd(-4, 6)","gcd(25, 15, -10)"],seealso:["lcm","xgcd"]},$Y={name:"hypot",category:"Arithmetic",syntax:["hypot(a, b, c, ...)","hypot([a, b, c, ...])"],description:"Calculate the hypotenusa of a list with values. ",examples:["hypot(3, 4)","sqrt(3^2 + 4^2)","hypot(-2)","hypot([3, 4, 5])"],seealso:["abs","norm"]},KY={name:"invmod",category:"Arithmetic",syntax:["invmod(a, b)"],description:"Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax \u2263 1 (mod b)",examples:["invmod(8, 12)=NaN","invmod(7, 13)=2","invmod(15151, 15122)=10429"],seealso:["gcd","xgcd"]},JY={name:"lcm",category:"Arithmetic",syntax:["lcm(x, y)"],description:"Compute the least common multiple.",examples:["lcm(4, 6)","lcm(6, 21)","lcm(6, 21, 5)"],seealso:["gcd"]},QY={name:"log",category:"Arithmetic",syntax:["log(x)","log(x, base)"],description:"Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",examples:["log(3.5)","a = log(2.4)","exp(a)","10 ^ 4","log(10000, 10)","log(10000) / log(10)","b = log(1024, 2)","2 ^ b"],seealso:["exp","log1p","log2","log10"]},qY={name:"log10",category:"Arithmetic",syntax:["log10(x)"],description:"Compute the 10-base logarithm of a value.",examples:["log10(0.00001)","log10(10000)","10 ^ 4","log(10000) / log(10)","log(10000, 10)"],seealso:["exp","log"]},eZ={name:"log1p",category:"Arithmetic",syntax:["log1p(x)","log1p(x, base)"],description:"Calculate the logarithm of a `value+1`",examples:["log1p(2.5)","exp(log1p(1.4))","pow(10, 4)","log1p(9999, 10)","log1p(9999) / log(10)"],seealso:["exp","log","log2","log10"]},tZ={name:"log2",category:"Arithmetic",syntax:["log2(x)"],description:"Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`.",examples:["log2(0.03125)","log2(16)","log2(16) / log2(2)","pow(2, 4)"],seealso:["exp","log1p","log","log10"]},rZ={name:"mod",category:"Operators",syntax:["x % y","x mod y","mod(x, y)"],description:"Calculates the modulus, the remainder of an integer division.",examples:["7 % 3","11 % 2","10 mod 4","isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divide"]},nZ={name:"multiply",category:"Operators",syntax:["x * y","multiply(x, y)"],description:"multiply two values.",examples:["a = 2.1 * 3.4","a / 3.4","2 * 3 + 4","2 * (3 + 4)","3 * 2.1 km"],seealso:["divide"]},aZ={name:"norm",category:"Arithmetic",syntax:["norm(x)","norm(x, p)"],description:"Calculate the norm of a number, vector or matrix.",examples:["abs(-3.5)","norm(-3.5)","norm(3 - 4i)","norm([1, 2, -3], Infinity)","norm([1, 2, -3], -Infinity)","norm([3, 4], 2)","norm([[1, 2], [3, 4]], 1)",'norm([[1, 2], [3, 4]], "inf")','norm([[1, 2], [3, 4]], "fro")']},iZ={name:"nthRoot",category:"Arithmetic",syntax:["nthRoot(a)","nthRoot(a, root)"],description:'Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".',examples:["4 ^ 3","nthRoot(64, 3)","nthRoot(9, 2)","sqrt(9)"],seealso:["nthRoots","pow","sqrt"]},oZ={name:"nthRoots",category:"Arithmetic",syntax:["nthRoots(A)","nthRoots(A, root)"],description:'Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values.',examples:["nthRoots(1)","nthRoots(1, 3)"],seealso:["sqrt","pow","nthRoot"]},sZ={name:"pow",category:"Operators",syntax:["x ^ y","pow(x, y)"],description:"Calculates the power of x to y, x^y.",examples:["2^3","2*2*2","1 + e ^ (pi * i)","pow([[1, 2], [4, 3]], 2)","pow([[1, 2], [4, 3]], -1)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]},lZ={name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)"],description:"round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.",examples:["round(3.2)","round(3.8)","round(-4.2)","round(-4.8)","round(pi, 3)","round(123.45678, 2)"],seealso:["ceil","floor","fix"]},uZ={name:"sign",category:"Arithmetic",syntax:["sign(x)"],description:"Compute the sign of a value. The sign of a value x is 1 when x>1, -1 when x<0, and 0 when x=0.",examples:["sign(3.5)","sign(-4.2)","sign(0)"],seealso:["abs"]},fZ={name:"sqrt",category:"Arithmetic",syntax:["sqrt(x)"],description:"Compute the square root value. If x = y * y, then y is the square root of x.",examples:["sqrt(25)","5 * 5","sqrt(-1)"],seealso:["square","sqrtm","multiply","nthRoot","nthRoots","pow"]},cZ={name:"sqrtm",category:"Arithmetic",syntax:["sqrtm(x)"],description:"Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.",examples:["sqrtm([[33, 24], [48, 57]])"],seealso:["sqrt","abs","square","multiply"]},hZ={name:"sylvester",category:"Matrix",syntax:["sylvester(A,B,C)"],description:"Solves the real-valued Sylvester equation AX+XB=C for X",examples:["sylvester([[-1, -2], [1, 1]], [[-2, 1], [-1, 2]], [[-3, 2], [3, 0]])","sylvester(A,B,C)"],seealso:["schur","lyap"]},vZ={name:"schur",category:"Matrix",syntax:["schur(A)"],description:"Performs a real Schur decomposition of the real matrix A = UTU'",examples:["schur([[1, 0], [-4, 3]])","schur(A)"],seealso:["lyap","sylvester"]},dZ={name:"lyap",category:"Matrix",syntax:["lyap(A,Q)"],description:"Solves the Continuous-time Lyapunov equation AP+PA'+Q=0 for P",examples:["lyap([[-2, 0], [1, -4]], [[3, 1], [1, 3]])","lyap(A,Q)"],seealso:["schur","sylvester"]},pZ={name:"square",category:"Arithmetic",syntax:["square(x)"],description:"Compute the square of a value. The square of x is x * x.",examples:["square(3)","sqrt(9)","3^2","3 * 3"],seealso:["multiply","pow","sqrt","cube"]},gZ={name:"subtract",category:"Operators",syntax:["x - y","subtract(x, y)"],description:"subtract two values.",examples:["a = 5.3 - 2","a + 2","2/3 - 1/6","2 * 3 - 3","2.1 km - 500m"],seealso:["add"]},mZ={name:"unaryMinus",category:"Operators",syntax:["-x","unaryMinus(x)"],description:"Inverse the sign of a value. Converts booleans and strings to numbers.",examples:["-4.5","-(-5.6)",'-"22"'],seealso:["add","subtract","unaryPlus"]},yZ={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]},xZ={name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]},bZ={name:"bitAnd",category:"Bitwise",syntax:["x & y","bitAnd(x, y)"],description:"Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0",examples:["5 & 3","bitAnd(53, 131)","[1, 12, 31] & 42"],seealso:["bitNot","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},wZ={name:"bitNot",category:"Bitwise",syntax:["~x","bitNot(x)"],description:"Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.",examples:["~1","~2","bitNot([2, -3, 4])"],seealso:["bitAnd","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},AZ={name:"bitOr",category:"Bitwise",syntax:["x | y","bitOr(x, y)"],description:"Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.",examples:["5 | 3","bitOr([1, 2, 3], 4)"],seealso:["bitAnd","bitNot","bitXor","leftShift","rightArithShift","rightLogShift"]},TZ={name:"bitXor",category:"Bitwise",syntax:["bitXor(x, y)"],description:"Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.",examples:["bitOr(1, 2)","bitXor([2, 3, 4], 4)"],seealso:["bitAnd","bitNot","bitOr","leftShift","rightArithShift","rightLogShift"]},MZ={name:"leftShift",category:"Bitwise",syntax:["x << y","leftShift(x, y)"],description:"Bitwise left logical shift of a value x by y number of bits.",examples:["4 << 1","8 >> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]},SZ={name:"rightArithShift",category:"Bitwise",syntax:["x >> y","rightArithShift(x, y)"],description:"Bitwise right arithmetic shift of a value x by y number of bits.",examples:["8 >> 1","4 << 1","-12 >> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightLogShift"]},EZ={name:"rightLogShift",category:"Bitwise",syntax:["x >>> y","rightLogShift(x, y)"],description:"Bitwise right logical shift of a value x by y number of bits.",examples:["8 >>> 1","4 << 1","-12 >>> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightArithShift"]},CZ={name:"bellNumbers",category:"Combinatorics",syntax:["bellNumbers(n)"],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. `bellNumbers` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]},DZ={name:"catalan",category:"Combinatorics",syntax:["catalan(n)"],description:"The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["catalan(3)","catalan(8)"],seealso:["bellNumbers"]},LZ={name:"composition",category:"Combinatorics",syntax:["composition(n, k)"],description:"The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.",examples:["composition(5, 3)"],seealso:["combinations"]},PZ={name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2(n, k)"],description:"he Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. `stirlingS2` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:["stirlingS2(5, 3)"],seealso:["bellNumbers"]},NZ={name:"arg",category:"Complex",syntax:["arg(x)"],description:"Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).",examples:["arg(2 + 2i)","atan2(3, 2)","arg(2 + 3i)"],seealso:["re","im","conj","abs"]},RZ={name:"conj",category:"Complex",syntax:["conj(x)"],description:"Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.",examples:["conj(2 + 3i)","conj(2 - 3i)","conj(-5.2i)"],seealso:["re","im","abs","arg"]},FZ={name:"im",category:"Complex",syntax:["im(x)"],description:"Get the imaginary part of a complex number.",examples:["im(2 + 3i)","re(2 + 3i)","im(-5.2i)","im(2.4)"],seealso:["re","conj","abs","arg"]},IZ={name:"re",category:"Complex",syntax:["re(x)"],description:"Get the real part of a complex number.",examples:["re(2 + 3i)","im(2 + 3i)","re(-5.2i)","re(2.4)"],seealso:["im","conj","abs","arg"]},_Z={name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate([expr1, expr2, expr3, ...])"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(" + 4 + ")")'],seealso:[]},OZ={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]},zZ={name:"distance",category:"Geometry",syntax:["distance([x1, y1], [x2, y2])","distance([[x1, y1], [x2, y2]])"],description:"Calculates the Euclidean distance between two points.",examples:["distance([0,0], [4,4])","distance([[0,0], [4,4]])"],seealso:[]},kZ={name:"intersect",category:"Geometry",syntax:["intersect(expr1, expr2, expr3, expr4)","intersect(expr1, expr2, expr3)"],description:"Computes the intersection point of lines and/or planes.",examples:["intersect([0, 0], [10, 10], [10, 0], [0, 10])","intersect([1, 0, 1], [4, -2, 2], [1, 1, 1, 6])"],seealso:[]},BZ={name:"and",category:"Logical",syntax:["x and y","and(x, y)"],description:"Logical and. Test whether two values are both defined with a nonzero/nonempty value.",examples:["true and false","true and true","2 and 4"],seealso:["not","or","xor"]},UZ={name:"not",category:"Logical",syntax:["not x","not(x)"],description:"Logical not. Flips the boolean value of given argument.",examples:["not true","not false","not 2","not 0"],seealso:["and","or","xor"]},HZ={name:"or",category:"Logical",syntax:["x or y","or(x, y)"],description:"Logical or. Test if at least one value is defined with a nonzero/nonempty value.",examples:["true or false","false or false","0 or 4"],seealso:["not","and","xor"]},VZ={name:"xor",category:"Logical",syntax:["x xor y","xor(x, y)"],description:"Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.",examples:["true xor false","false xor false","true xor true","0 xor 4"],seealso:["not","and","or"]},GZ={name:"column",category:"Matrix",syntax:["column(x, index)"],description:"Return a column from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","column(A, 1)","column(A, 2)"],seealso:["row","matrixFromColumns"]},WZ={name:"concat",category:"Matrix",syntax:["concat(A, B, C, ...)","concat(A, B, C, ..., dim)"],description:"Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.",examples:["A = [1, 2; 5, 6]","B = [3, 4; 7, 8]","concat(A, B)","concat(A, B, 1)","concat(A, B, 2)"],seealso:["det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},YZ={name:"count",category:"Matrix",syntax:["count(x)"],description:"Count the number of elements of a matrix, array or string.",examples:["a = [1, 2; 3, 4; 5, 6]","count(a)","size(a)",'count("hello world")'],seealso:["size"]},ZZ={name:"cross",category:"Matrix",syntax:["cross(A, B)"],description:"Calculate the cross product for two vectors in three dimensional space.",examples:["cross([1, 1, 0], [0, 1, 1])","cross([3, -3, 1], [4, 9, 2])","cross([2, 3, 4], [5, 6, 7])"],seealso:["multiply","dot"]},XZ={name:"ctranspose",category:"Matrix",syntax:["x'","ctranspose(x)"],description:"Complex Conjugate and Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","ctranspose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},jZ={name:"det",category:"Matrix",syntax:["det(x)"],description:"Calculate the determinant of a matrix",examples:["det([1, 2; 3, 4])","det([-2, 2, 3; -1, 1, 3; 2, 0, -1])"],seealso:["concat","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},$Z={name:"diag",category:"Matrix",syntax:["diag(x)","diag(x, k)"],description:"Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.",examples:["diag(1:3)","diag(1:3, 1)","a = [1, 2, 3; 4, 5, 6; 7, 8, 9]","diag(a)"],seealso:["concat","det","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},KZ={name:"diff",category:"Matrix",syntax:["diff(arr)","diff(arr, dim)"],description:["Create a new matrix or array with the difference of the passed matrix or array.","Dim parameter is optional and used to indicant the dimension of the array/matrix to apply the difference","If no dimension parameter is passed it is assumed as dimension 0","Dimension is zero-based in javascript and one-based in the parser","Arrays must be 'rectangular' meaning arrays like [1, 2]","If something is passed as a matrix it will be returned as a matrix but other than that all matrices are converted to arrays"],examples:["diff([1, 2, 4, 7, 0])","diff([1, 2, 4, 7, 0], 0)","diff(matrix([1, 2, 4, 7, 0]))","diff([[1, 2], [3, 4]])","diff([[1, 2], [3, 4]], 0)","diff([[1, 2], [3, 4]], 1)","diff([[1, 2], [3, 4]], bignumber(1))","diff(matrix([[1, 2], [3, 4]]), 1)","diff([[1, 2], matrix([3, 4])], 1)"],seealso:["subtract","partitionSelect"]},JZ={name:"dot",category:"Matrix",syntax:["dot(A, B)","A * B"],description:"Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn",examples:["dot([2, 4, 1], [2, 2, 3])","[2, 4, 1] * [2, 2, 3]"],seealso:["multiply","cross"]},QZ={name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and eigenvectors of a real symmetric matrix",examples:["eigs([[5, 2.3], [2.3, 1]])"],seealso:["inv"]},qZ={name:"filter",category:"Matrix",syntax:["filter(x, test)"],description:"Filter items in a matrix.",examples:["isPositive(x) = x > 0","filter([6, -2, -1, 4, 3], isPositive)","filter([6, -2, 0, 1, 0], x != 0)"],seealso:["sort","map","forEach"]},eX={name:"flatten",category:"Matrix",syntax:["flatten(x)"],description:"Flatten a multi dimensional matrix into a single dimensional matrix.",examples:["a = [1, 2, 3; 4, 5, 6]","size(a)","b = flatten(a)","size(b)"],seealso:["concat","resize","size","squeeze"]},tX={name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["numberOfPets = {}","addPet(n) = numberOfPets[n] = (numberOfPets[n] ? numberOfPets[n]:0 ) + 1;",'forEach(["Dog","Cat","Cat"], addPet)',"numberOfPets"],seealso:["map","sort","filter"]},rX={name:"getMatrixDataType",category:"Matrix",syntax:["getMatrixDataType(x)"],description:'Find the data type of all elements in a matrix or array, for example "number" if all items are a number and "Complex" if all values are complex numbers. If a matrix contains more than one data type, it will return "mixed".',examples:["getMatrixDataType([1, 2, 3])","getMatrixDataType([[5 cm], [2 inch]])",'getMatrixDataType([1, "text"])',"getMatrixDataType([1, bignumber(4)])"],seealso:["matrix","sparse","typeOf"]},nX={name:"identity",category:"Matrix",syntax:["identity(n)","identity(m, n)","identity([m, n])"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["identity(3)","identity(3, 5)","a = [1, 2, 3; 4, 5, 6]","identity(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},aX={name:"inv",category:"Matrix",syntax:["inv(x)"],description:"Calculate the inverse of a matrix",examples:["inv([1, 2; 3, 4])","inv(4)","1 / 4"],seealso:["concat","det","diag","identity","ones","range","size","squeeze","subset","trace","transpose","zeros"]},iX={name:"pinv",category:"Matrix",syntax:["pinv(x)"],description:"Calculate the Moore\u2013Penrose inverse of a matrix",examples:["pinv([1, 2; 3, 4])","pinv([[1, 0], [0, 1], [0, 1]])","pinv(4)"],seealso:["inv"]},oX={name:"kron",category:"Matrix",syntax:["kron(x, y)"],description:"Calculates the kronecker product of 2 matrices or vectors.",examples:["kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])","kron([1,1], [2,3,4])"],seealso:["multiply","dot","cross"]},sX={name:"map",category:"Matrix",syntax:["map(x, callback)"],description:"Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array.",examples:["map([1, 2, 3], square)"],seealso:["filter","forEach"]},lX={name:"matrixFromColumns",category:"Matrix",syntax:["matrixFromColumns(...arr)","matrixFromColumns(row1, row2)","matrixFromColumns(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual columns.",examples:["matrixFromColumns([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromRows","matrixFromFunction","zeros"]},uX={name:"matrixFromFunction",category:"Matrix",syntax:["matrixFromFunction(size, fn)","matrixFromFunction(size, fn, format)","matrixFromFunction(size, fn, format, datatype)","matrixFromFunction(size, format, fn)","matrixFromFunction(size, format, datatype, fn)"],description:"Create a matrix by evaluating a generating function at each index.",examples:["f(I) = I[1] - I[2]","matrixFromFunction([3,3], f)","g(I) = I[1] - I[2] == 1 ? 4 : 0",'matrixFromFunction([100, 100], "sparse", g)',"matrixFromFunction([5], random)"],seealso:["matrix","matrixFromRows","matrixFromColumns","zeros"]},fX={name:"matrixFromRows",category:"Matrix",syntax:["matrixFromRows(...arr)","matrixFromRows(row1, row2)","matrixFromRows(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual rows.",examples:["matrixFromRows([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromColumns","matrixFromFunction","zeros"]},cX={name:"ones",category:"Matrix",syntax:["ones(m)","ones(m, n)","ones(m, n, p, ...)","ones([m])","ones([m, n])","ones([m, n, p, ...])"],description:"Create a matrix containing ones.",examples:["ones(3)","ones(3, 5)","ones([2,3]) * 4.5","a = [1, 2, 3; 4, 5, 6]","ones(size(a))"],seealso:["concat","det","diag","identity","inv","range","size","squeeze","subset","trace","transpose","zeros"]},hX={name:"partitionSelect",category:"Matrix",syntax:["partitionSelect(x, k)","partitionSelect(x, k, compare)"],description:"Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.",examples:["partitionSelect([5, 10, 1], 2)",'partitionSelect(["C", "B", "A", "D"], 1, compareText)',"arr = [5, 2, 1]","partitionSelect(arr, 0) # returns 1, arr is now: [1, 2, 5]","arr","partitionSelect(arr, 1, 'desc') # returns 2, arr is now: [5, 2, 1]","arr"],seealso:["sort"]},vX={name:"range",category:"Type",syntax:["start:end","start:step:end","range(start, end)","range(start, end, step)","range(string)"],description:"Create a range. Lower bound of the range is included, upper bound is excluded.",examples:["1:5","3:-1:-3","range(3, 7)","range(0, 12, 2)",'range("4:10")',"a = [1, 2, 3, 4; 5, 6, 7, 8]","a[1:2, 1:2]"],seealso:["concat","det","diag","identity","inv","ones","size","squeeze","subset","trace","transpose","zeros"]},dX={name:"reshape",category:"Matrix",syntax:["reshape(x, sizes)"],description:"Reshape a multi dimensional array to fit the specified dimensions.",examples:["reshape([1, 2, 3, 4, 5, 6], [2, 3])","reshape([[1, 2], [3, 4]], [1, 4])","reshape([[1, 2], [3, 4]], [4])","reshape([1, 2, 3, 4], [-1, 2])"],seealso:["size","squeeze","resize"]},pX={name:"resize",category:"Matrix",syntax:["resize(x, size)","resize(x, size, defaultValue)"],description:"Resize a matrix.",examples:["resize([1,2,3,4,5], [3])","resize([1,2,3], [5])","resize([1,2,3], [5], -1)","resize(2, [2, 3])",'resize("hello", [8], "!")'],seealso:["size","subset","squeeze","reshape"]},gX={name:"rotate",category:"Matrix",syntax:["rotate(w, theta)","rotate(w, theta, v)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotate([1, 0], pi / 2)",'rotate(matrix([1, 0]), unit("35deg"))','rotate([1, 0, 0], unit("90deg"), [0, 0, 1])','rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],seealso:["matrix","rotationMatrix"]},mX={name:"rotationMatrix",category:"Matrix",syntax:["rotationMatrix(theta)","rotationMatrix(theta, v)","rotationMatrix(theta, v, format)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotationMatrix(pi / 2)",'rotationMatrix(unit("45deg"), [0, 0, 1])','rotationMatrix(1, matrix([0, 0, 1]), "sparse")'],seealso:["cos","sin"]},yX={name:"row",category:"Matrix",syntax:["row(x, index)"],description:"Return a row from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","row(A, 1)","row(A, 2)"],seealso:["column","matrixFromRows"]},xX={name:"size",category:"Matrix",syntax:["size(x)"],description:"Calculate the size of a matrix.",examples:["size(2.3)",'size("hello world")',"a = [1, 2; 3, 4; 5, 6]","size(a)","size(1:6)"],seealso:["concat","count","det","diag","identity","inv","ones","range","squeeze","subset","trace","transpose","zeros"]},bX={name:"sort",category:"Matrix",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"], "natural")',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]},wX={name:"squeeze",category:"Matrix",syntax:["squeeze(x)"],description:"Remove inner and outer singleton dimensions from a matrix.",examples:["a = zeros(3,2,1)","size(squeeze(a))","b = zeros(1,1,3)","size(squeeze(b))"],seealso:["concat","det","diag","identity","inv","ones","range","size","subset","trace","transpose","zeros"]},AX={name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of the entries of a matrix or characters of a string. Indexes are one-based. There should be one index specification for each dimension of the target. Each specification can be a single index, a list of indices, or a range in colon notation `l:u`. In a range, both the lower bound l and upper bound u are included; and if a bound is omitted it defaults to the most extreme valid value. The cartesian product of the indices specified in each dimension determines the target of the operation.",examples:["d = [1, 2; 3, 4]","e = []","e[1, 1:2] = [5, 6]","e[2, :] = [7, 8]","f = d * e","f[2, 1]","f[:, 1]","f[[1,2], [1,3]] = [9, 10; 11, 12]","f"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]},TX={name:"trace",category:"Matrix",syntax:["trace(A)"],description:"Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.",examples:["A = [1, 2, 3; -1, 2, 3; 2, 0, 3]","trace(A)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","transpose","zeros"]},MX={name:"transpose",category:"Matrix",syntax:["x'","transpose(x)"],description:"Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","transpose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},SX={name:"zeros",category:"Matrix",syntax:["zeros(m)","zeros(m, n)","zeros(m, n, p, ...)","zeros([m])","zeros([m, n])","zeros([m, n, p, ...])"],description:"Create a matrix containing zeros.",examples:["zeros(3)","zeros(3, 5)","a = [1, 2, 3; 4, 5, 6]","zeros(size(a))"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose"]},EX={name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]},CX={name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]},DX={name:"combinations",category:"Probability",syntax:["combinations(n, k)"],description:"Compute the number of combinations of n items taken k at a time",examples:["combinations(7, 5)"],seealso:["combinationsWithRep","permutations","factorial"]},LX={name:"combinationsWithRep",category:"Probability",syntax:["combinationsWithRep(n, k)"],description:"Compute the number of combinations of n items taken k at a time with replacements.",examples:["combinationsWithRep(7, 5)"],seealso:["combinations","permutations","factorial"]},PX={name:"factorial",category:"Probability",syntax:["n!","factorial(n)"],description:"Compute the factorial of a value",examples:["5!","5 * 4 * 3 * 2 * 1","3!"],seealso:["combinations","combinationsWithRep","permutations","gamma"]},NX={name:"gamma",category:"Probability",syntax:["gamma(n)"],description:"Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.",examples:["gamma(4)","3!","gamma(1/2)","sqrt(pi)"],seealso:["factorial"]},RX={name:"lgamma",category:"Probability",syntax:["lgamma(n)"],description:"Logarithm of the gamma function for real, positive numbers and complex numbers, using Lanczos approximation for numbers and Stirling series for complex numbers.",examples:["lgamma(4)","lgamma(1/2)","lgamma(i)","lgamma(complex(1.1, 2))"],seealso:["gamma"]},FX={name:"kldivergence",category:"Probability",syntax:["kldivergence(x, y)"],description:"Calculate the Kullback-Leibler (KL) divergence between two distributions.",examples:["kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])"],seealso:[]},IX={name:"multinomial",category:"Probability",syntax:["multinomial(A)"],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:["multinomial([1, 2, 1])"],seealso:["combinations","factorial"]},_X={name:"permutations",category:"Probability",syntax:["permutations(n)","permutations(n, k)"],description:"Compute the number of permutations of n items taken k at a time",examples:["permutations(5)","permutations(5, 3)"],seealso:["combinations","combinationsWithRep","factorial"]},OX={name:"pickRandom",category:"Probability",syntax:["pickRandom(array)","pickRandom(array, number)","pickRandom(array, weights)","pickRandom(array, number, weights)","pickRandom(array, weights, number)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])","pickRandom([1, 3, 1, 6], 2)","pickRandom([1, 3, 1, 6], [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)"],seealso:["random","randomInt"]},zX={name:"random",category:"Probability",syntax:["random()","random(max)","random(min, max)","random(size)","random(size, max)","random(size, min, max)"],description:"Return a random number.",examples:["random()","random(10, 20)","random([2, 3])"],seealso:["pickRandom","randomInt"]},kX={name:"randomInt",category:"Probability",syntax:["randomInt(max)","randomInt(min, max)","randomInt(size)","randomInt(size, max)","randomInt(size, min, max)"],description:"Return a random integer number",examples:["randomInt(10, 20)","randomInt([2, 3], 10)"],seealso:["pickRandom","random"]},BX={name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compareNatural","compareText"]},UX={name:"compareNatural",category:"Relational",syntax:["compareNatural(x, y)"],description:"Compare two values of any type in a deterministic, natural way. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compareNatural(2, 3)","compareNatural(3, 2)","compareNatural(2, 2)","compareNatural(5cm, 40mm)",'compareNatural("2", "10")',"compareNatural(2 + 3i, 2 + 4i)","compareNatural([1, 2, 4], [1, 2, 3])","compareNatural([1, 5], [1, 2, 3])","compareNatural([1, 2], [1, 2])","compareNatural({a: 2}, {a: 4})"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare","compareText"]},HX={name:"compareText",category:"Relational",syntax:["compareText(x, y)"],description:"Compare two strings lexically. Comparison is case sensitive. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:['compareText("B", "A")','compareText("A", "B")','compareText("A", "A")','compareText("2", "10")','compare("2", "10")',"compare(2, 10)",'compareNatural("2", "10")','compareText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural"]},VX={name:"deepEqual",category:"Relational",syntax:["deepEqual(x, y)"],description:"Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.",examples:["deepEqual([1,3,4], [1,3,4])","deepEqual([1,3,4], [1,3])"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]},GX={name:"equal",category:"Relational",syntax:["x == y","equal(x, y)"],description:"Check equality of two values. Returns true if the values are equal, and false if not.",examples:["2+2 == 3","2+2 == 4","a = 3.2","b = 6-2.8","a == b","50cm == 0.5m"],seealso:["unequal","smaller","larger","smallerEq","largerEq","compare","deepEqual","equalText"]},WX={name:"equalText",category:"Relational",syntax:["equalText(x, y)"],description:"Check equality of two strings. Comparison is case sensitive. Returns true if the values are equal, and false if not.",examples:['equalText("Hello", "Hello")','equalText("a", "A")','equal("2e3", "2000")','equalText("2e3", "2000")','equalText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural","compareText","equal"]},YX={name:"larger",category:"Relational",syntax:["x > y","larger(x, y)"],description:"Check if value x is larger than y. Returns true if x is larger than y, and false if not.",examples:["2 > 3","5 > 2*2","a = 3.3","b = 6-2.8","(a > b)","(b < a)","5 cm > 2 inch"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]},ZX={name:"largerEq",category:"Relational",syntax:["x >= y","largerEq(x, y)"],description:"Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.",examples:["2 >= 1+1","2 > 1+1","a = 3.2","b = 6-2.8","(a >= b)"],seealso:["equal","unequal","smallerEq","smaller","compare"]},XX={name:"smaller",category:"Relational",syntax:["x < y","smaller(x, y)"],description:"Check if value x is smaller than value y. Returns true if x is smaller than y, and false if not.",examples:["2 < 3","5 < 2*2","a = 3.3","b = 6-2.8","(a < b)","5 cm < 2 inch"],seealso:["equal","unequal","larger","smallerEq","largerEq","compare"]},jX={name:"smallerEq",category:"Relational",syntax:["x <= y","smallerEq(x, y)"],description:"Check if value x is smaller or equal to value y. Returns true if x is smaller than y, and false if not.",examples:["2 <= 1+1","2 < 1+1","a = 3.2","b = 6-2.8","(a <= b)"],seealso:["equal","unequal","larger","smaller","largerEq","compare"]},$X={name:"unequal",category:"Relational",syntax:["x != y","unequal(x, y)"],description:"Check unequality of two values. Returns true if the values are unequal, and false if they are equal.",examples:["2+2 != 3","2+2 != 4","a = 3.2","b = 6-2.8","a != b","50cm != 0.5m","5 cm != 2 inch"],seealso:["equal","smaller","larger","smallerEq","largerEq","compare","deepEqual"]},KX={name:"setCartesian",category:"Set",syntax:["setCartesian(set1, set2)"],description:"Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays and the values will be sorted in ascending order before the operation.",examples:["setCartesian([1, 2], [3, 4])"],seealso:["setUnion","setIntersect","setDifference","setPowerset"]},JX={name:"setDifference",category:"Set",syntax:["setDifference(set1, set2)"],description:"Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setDifference([1, 2, 3, 4], [3, 4, 5, 6])","setDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setSymDifference"]},QX={name:"setDistinct",category:"Set",syntax:["setDistinct(set)"],description:"Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setDistinct([1, 1, 1, 2, 2, 3])"],seealso:["setMultiplicity"]},qX={name:"setIntersect",category:"Set",syntax:["setIntersect(set1, set2)"],description:"Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIntersect([1, 2, 3, 4], [3, 4, 5, 6])","setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setDifference"]},ej={name:"setIsSubset",category:"Set",syntax:["setIsSubset(set1, set2)"],description:"Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIsSubset([1, 2], [3, 4, 5, 6])","setIsSubset([3, 4], [3, 4, 5, 6])"],seealso:["setUnion","setIntersect","setDifference"]},tj={name:"setMultiplicity",category:"Set",syntax:["setMultiplicity(element, set)"],description:"Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setMultiplicity(1, [1, 2, 2, 4])","setMultiplicity(2, [1, 2, 2, 4])"],seealso:["setDistinct","setSize"]},rj={name:"setPowerset",category:"Set",syntax:["setPowerset(set)"],description:"Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setPowerset([1, 2, 3])"],seealso:["setCartesian"]},nj={name:"setSize",category:"Set",syntax:["setSize(set)","setSize(set, unique)"],description:'Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.',examples:["setSize([1, 2, 2, 4])","setSize([1, 2, 2, 4], true)"],seealso:["setUnion","setIntersect","setDifference"]},aj={name:"setSymDifference",category:"Set",syntax:["setSymDifference(set1, set2)"],description:"Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setSymDifference([1, 2, 3, 4], [3, 4, 5, 6])","setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setDifference"]},ij={name:"setUnion",category:"Set",syntax:["setUnion(set1, set2)"],description:"Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setUnion([1, 2, 3, 4], [3, 4, 5, 6])","setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setIntersect","setDifference"]},oj={name:"erf",category:"Special",syntax:["erf(x)"],description:"Compute the erf function of a value using a rational Chebyshev approximations for different intervals of x",examples:["erf(0.2)","erf(-0.5)","erf(4)"],seealso:[]},sj={name:"mad",category:"Statistics",syntax:["mad(a, b, c, ...)","mad(A)"],description:"Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.",examples:["mad(10, 20, 30)","mad([1, 2, 3])"],seealso:["mean","median","std","abs"]},lj={name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dimension)"],description:"Compute the maximum value of a list of values.",examples:["max(2, 3, 4, 1)","max([2, 3, 4, 1])","max([2, 5; 4, 3])","max([2, 5; 4, 3], 1)","max([2, 5; 4, 3], 2)","max(2.7, 7.1, -4.5, 2.0, 4.1)","min(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["mean","median","min","prod","std","sum","variance"]},uj={name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dimension)"],description:"Compute the arithmetic mean of a list of values.",examples:["mean(2, 3, 4, 1)","mean([2, 3, 4, 1])","mean([2, 5; 4, 3])","mean([2, 5; 4, 3], 1)","mean([2, 5; 4, 3], 2)","mean([1.0, 2.7, 3.2, 4.0])"],seealso:["max","median","min","prod","std","sum","variance"]},fj={name:"median",category:"Statistics",syntax:["median(a, b, c, ...)","median(A)"],description:"Compute the median of all values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned.",examples:["median(5, 2, 7)","median([3, -1, 5, 7])"],seealso:["max","mean","min","prod","std","sum","variance","quantileSeq"]},cj={name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dimension)"],description:"Compute the minimum value of a list of values.",examples:["min(2, 3, 4, 1)","min([2, 3, 4, 1])","min([2, 5; 4, 3])","min([2, 5; 4, 3], 1)","min([2, 5; 4, 3], 2)","min(2.7, 7.1, -4.5, 2.0, 4.1)","max(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["max","mean","median","prod","std","sum","variance"]},hj={name:"mode",category:"Statistics",syntax:["mode(a, b, c, ...)","mode(A)","mode(A, a, b, B, c, ...)"],description:"Computes the mode of all values as an array. In case mode being more than one, multiple values are returned in an array.",examples:["mode(2, 1, 4, 3, 1)","mode([1, 2.7, 3.2, 4, 2.7])","mode(1, 4, 6, 1, 6)"],seealso:["max","mean","min","median","prod","std","sum","variance"]},vj={name:"prod",category:"Statistics",syntax:["prod(a, b, c, ...)","prod(A)"],description:"Compute the product of all values.",examples:["prod(2, 3, 4)","prod([2, 3, 4])","prod([2, 5; 4, 3])"],seealso:["max","mean","min","median","min","std","sum","variance"]},dj={name:"quantileSeq",category:"Statistics",syntax:["quantileSeq(A, prob[, sorted])","quantileSeq(A, [prob1, prob2, ...][, sorted])","quantileSeq(A, N[, sorted])"],description:`Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. Supported types of sequence values are: Number, BigNumber, Unit Supported types of probablity are: Number, BigNumber. + +In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]},pj={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]},gj={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]},mj={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]},yj={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]},xj={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]},bj={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]},wj={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]},Aj={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]},Tj={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]},Mj={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]},Sj={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]},Ej={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]},Cj={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]},Dj={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]},Lj={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]},Pj={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]},Nj={name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]},Rj={name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]},Fj={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]},Ij={name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]},_j={name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]},Oj={name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]},zj={name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]},kj={name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]},Bj={name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]},Uj={name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]},Hj={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]},Vj={name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]},Gj={name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]},Wj={name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]},Yj={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]},Zj={name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables,and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]},Xj={name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]},jj={name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]},$j={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]},Kj={name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]},Jj={name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero"]},Qj={name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]},qj={name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue"]},e$={name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},t$={name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},r$={name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]},n$={name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "BigNumber")','numeric("4", "Fraction)','numeric(4, "Fraction")','numeric(fraction(2, 5), "number)'],seealso:["number","fraction","bignumber","string","format"]},a$={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]},i$={name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $0, $1, $2", [6, 9, 4])'],seealso:["format"]},o$={name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]},s$={bignumber:rY,boolean:nY,complex:aY,createUnit:iY,fraction:oY,index:sY,matrix:lY,number:uY,sparse:fY,splitUnit:cY,string:hY,unit:vY,e:UM,E:UM,false:HW,i:VW,Infinity:GW,LN2:YW,LN10:WW,LOG2E:XW,LOG10E:ZW,NaN:jW,null:$W,pi:HM,PI:HM,phi:KW,SQRT1_2:JW,SQRT2:QW,tau:qW,true:eY,version:tY,speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant",examples:["coulomb"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Borh magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Borh radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:mY,lsolve:xY,lsolveAll:bY,lup:wY,lusolve:AY,leafCount:yY,polynomialRoot:TY,resolve:EY,simplify:CY,simplifyConstant:DY,simplifyCore:LY,symbolicEqual:NY,rationalize:SY,slu:PY,usolve:RY,usolveAll:FY,qr:MY,abs:IY,add:_Y,cbrt:OY,ceil:zY,cube:kY,divide:BY,dotDivide:UY,dotMultiply:HY,dotPow:VY,exp:GY,expm:WY,expm1:YY,fix:ZY,floor:XY,gcd:jY,hypot:$Y,lcm:JY,log:QY,log2:tZ,log1p:eZ,log10:qY,mod:rZ,multiply:nZ,norm:aZ,nthRoot:iZ,nthRoots:oZ,pow:sZ,round:lZ,sign:uZ,sqrt:fZ,sqrtm:cZ,square:pZ,subtract:gZ,unaryMinus:mZ,unaryPlus:yZ,xgcd:xZ,invmod:KY,bitAnd:bZ,bitNot:wZ,bitOr:AZ,bitXor:TZ,leftShift:MZ,rightArithShift:SZ,rightLogShift:EZ,bellNumbers:CZ,catalan:DZ,composition:LZ,stirlingS2:PZ,config:dY,import:pY,typed:gY,arg:NZ,conj:RZ,re:IZ,im:FZ,evaluate:_Z,help:OZ,distance:zZ,intersect:kZ,and:BZ,not:UZ,or:HZ,xor:VZ,concat:WZ,count:YZ,cross:ZZ,column:GZ,ctranspose:XZ,det:jZ,diag:$Z,diff:KZ,dot:JZ,getMatrixDataType:rX,identity:nX,filter:qZ,flatten:eX,forEach:tX,inv:aX,pinv:iX,eigs:QZ,kron:oX,matrixFromFunction:uX,matrixFromRows:fX,matrixFromColumns:lX,map:sX,ones:cX,partitionSelect:hX,range:vX,resize:pX,reshape:dX,rotate:gX,rotationMatrix:mX,row:yX,size:xX,sort:bX,squeeze:wX,subset:AX,trace:TX,transpose:MX,zeros:SX,fft:EX,ifft:CX,sylvester:hZ,schur:vZ,lyap:dZ,combinations:DX,combinationsWithRep:LX,factorial:PX,gamma:NX,kldivergence:FX,lgamma:RX,multinomial:IX,permutations:_X,pickRandom:OX,random:zX,randomInt:kX,compare:BX,compareNatural:UX,compareText:HX,deepEqual:VX,equal:GX,equalText:WX,larger:YX,largerEq:ZX,smaller:XX,smallerEq:jX,unequal:$X,setCartesian:KX,setDifference:JX,setDistinct:QX,setIntersect:qX,setIsSubset:ej,setMultiplicity:tj,setPowerset:rj,setSize:nj,setSymDifference:aj,setUnion:ij,erf:oj,cumsum:gj,mad:sj,max:lj,mean:uj,median:fj,min:cj,mode:hj,prod:vj,quantileSeq:dj,std:pj,sum:mj,variance:yj,acos:xj,acosh:bj,acot:wj,acoth:Aj,acsc:Tj,acsch:Mj,asec:Sj,asech:Ej,asin:Cj,asinh:Dj,atan:Lj,atanh:Nj,atan2:Pj,cos:Rj,cosh:Fj,cot:Ij,coth:_j,csc:Oj,csch:zj,sec:kj,sech:Bj,sin:Uj,sinh:Hj,tan:Vj,tanh:Gj,to:Wj,clone:Zj,format:Xj,bin:Yj,oct:a$,hex:$j,isNaN:Jj,isInteger:Kj,isNegative:Qj,isNumeric:qj,hasNumericValue:jj,isPositive:e$,isPrime:t$,isZero:r$,print:i$,typeOf:o$,numeric:n$},VM="help",l$=["typed","mathWithTransform","Help"],u$=Lr(VM,l$,T=>{var{typed:N,mathWithTransform:V,Help:Y}=T;return N(VM,{any:function(J){var R,F=J;if(typeof J!="string"){for(R in V)if(ka(V,R)&&J===V[R]){F=R;break}}var e=lf(s$,F);if(!e){var i=typeof F=="function"?F.name:F;throw new Error('No documentation found on "'+i+'"')}return new Y(e)}})}),GM="chain",f$=["typed","Chain"],c$=Lr(GM,f$,T=>{var{typed:N,Chain:V}=T;return N(GM,{"":function(){return new V},any:function(X){return new V(X)}})}),WM="det",h$=["typed","matrix","subtract","multiply","divideScalar","isZero","unaryMinus"],v$=Lr(WM,h$,T=>{var{typed:N,matrix:V,subtract:Y,multiply:X,divideScalar:J,isZero:R,unaryMinus:F}=T;return N(WM,{any:function(m){return ei(m)},"Array | Matrix":function(m){var t;switch(Qa(m)?t=m.size():Array.isArray(m)?(m=V(m),t=m.size()):t=[],t.length){case 0:return ei(m);case 1:if(t[0]===1)return ei(m.valueOf()[0]);if(t[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+vi(t)+")");case 2:{var y=t[0],p=t[1];if(y===p)return e(m.clone().valueOf(),y);if(p===0)return 1;throw new RangeError("Matrix must be square (size: "+vi(t)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+vi(t)+")")}}});function e(i,m,t){if(m===1)return ei(i[0][0]);if(m===2)return Y(X(i[0][0],i[1][1]),X(i[1][0],i[0][1]));for(var y=!1,p=new Array(m).fill(0).map((b,g)=>g),l=0;l{var{typed:N,matrix:V,divideScalar:Y,addScalar:X,multiply:J,unaryMinus:R,det:F,identity:e,abs:i}=T;return N(YM,{"Array | Matrix":function(y){var p=Qa(y)?y.size():Si(y);switch(p.length){case 1:if(p[0]===1)return Qa(y)?V([Y(1,y.valueOf()[0])]):[Y(1,y[0])];throw new RangeError("Matrix must be square (size: "+vi(p)+")");case 2:{var l=p[0],d=p[1];if(l===d)return Qa(y)?V(m(y.valueOf(),l,d),y.storage()):m(y,l,d);throw new RangeError("Matrix must be square (size: "+vi(p)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+vi(p)+")")}},any:function(y){return Y(1,y)}});function m(t,y,p){var l,d,r,n,u;if(y===1){if(n=t[0][0],n===0)throw Error("Cannot calculate inverse, determinant is zero");return[[Y(1,n)]]}else if(y===2){var a=F(t);if(a===0)throw Error("Cannot calculate inverse, determinant is zero");return[[Y(t[1][1],a),Y(R(t[0][1]),a)],[Y(R(t[1][0]),a),Y(t[0][0],a)]]}else{var o=t.concat();for(l=0;lb&&(b=i(o[l][s]),g=l),l++;if(b===0)throw Error("Cannot calculate inverse, determinant is zero");l=g,l!==s&&(u=o[s],o[s]=o[l],o[l]=u,u=c[s],c[s]=c[l],c[l]=u);var A=o[s],v=c[s];for(l=0;l{var{typed:N,matrix:V,inv:Y,deepEqual:X,equal:J,dotDivide:R,dot:F,ctranspose:e,divideScalar:i,multiply:m,add:t,Complex:y}=T;return N(ZM,{"Array | Matrix":function(a){var o=Qa(a)?a.size():Si(a);switch(o.length){case 1:return n(a)?e(a):o[0]===1?Y(a):R(e(a),F(a,a));case 2:{if(n(a))return e(a);var c=o[0],s=o[1];if(c===s)try{return Y(a)}catch(b){if(!(b instanceof Error&&b.message.match(/Cannot calculate inverse, determinant is zero/)))throw b}return Qa(a)?V(p(a.valueOf(),c,s),a.storage()):p(a,c,s)}default:throw new RangeError("Matrix must be two dimensional (size: "+vi(o)+")")}},any:function(a){return J(a,0)?ei(a):i(1,a)}});function p(u,a,o){var{C:c,F:s}=d(u,a,o),b=m(Y(m(e(c),c)),e(c)),g=m(e(s),Y(m(s,e(s))));return m(g,b)}function l(u,a,o){for(var c=ei(u),s=0,b=0;bg.filter((v,h)=>h!r(F(c[A],c[A])));return{C:s,F:b}}function r(u){return J(t(u,y(1,1)),t(0,y(1,1)))}function n(u){return X(t(u,y(1,1)),t(m(u,0),y(1,1)))}});function y$(T){var{addScalar:N,subtract:V,flatten:Y,multiply:X,multiplyScalar:J,divideScalar:R,sqrt:F,abs:e,bignumber:i,diag:m,inv:t,qr:y,usolve:p,usolveAll:l,equal:d,complex:r,larger:n,smaller:u,matrixFromColumns:a,dot:o}=T;function c(P,E,k,O,G){G===void 0&&(G=!0);var z=s(P,E,k,O,G);b(P,E,k,O,G,z);var{values:U,C:H}=g(P,E,k,O,G),B;return G&&(B=A(P,E,H,z,U,k,O),B=a(...B)),{values:U,vectors:B}}function s(P,E,k,O,G){var z=O==="BigNumber",U=O==="Complex",H=z?i(0):0,B=z?i(1):U?r(1):1,W=z?i(1):1,q=z?i(10):2,re=J(q,q),ie;G&&(ie=Array(E).fill(B));for(var le=!1;!le;){le=!0;for(var he=0;he1&&(le=m(Array(q-1).fill(H)))),q-=1,B.pop();for(var fe=0;fe2&&(le=m(Array(q-2).fill(H)))),q-=2,B.pop(),B.pop();for(var ne=0;ne+V(e(de),e(we))),he>100){var ce=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+W.join(", "));throw ce.values=W,ce.vectors=[],ce}var oe=G?X(ie,C(re,E)):void 0;return{values:W,C:oe}}function A(P,E,k,O,G,z,U){var H=t(k),B=X(H,P,k),W=U==="BigNumber",q=U==="Complex",re=W?i(0):q?r(0):0,ie=W?i(1):q?r(1):1,le=[],he=[];for(var $ of G){var Z=D(le,$,d);Z===-1?(le.push($),he.push(1)):he[Z]+=1}for(var K=[],Q=le.length,ae=Array(E).fill(re),fe=m(Array(E).fill(ie)),te=[],ne=function(){var we=le[ce],Se=V(B,X(we,fe)),Te=l(Se,ae);for(Te.shift();Te.lengthX(Ie,Me)),K.push(...Te.map(Me=>Y(Me)))},ce=0;ce=5)return null;for(H=0;;){var B=p(P,U);if(u(S(M(U,[B])),O))break;if(++H>=10)return null;U=f(B)}return U}function w(P,E,k){var O=k==="BigNumber",G=k==="Complex",z=Array(P).fill(0).map(U=>2*Math.random()-1);return O&&(z=z.map(U=>i(U))),G&&(z=z.map(U=>r(U))),z=M(z,E),f(z,k)}function M(P,E){for(var k of E)P=V(P,X(R(o(k,P),o(k,k)),k));return P}function S(P){return e(F(o(P,P)))}function f(P,E){var k=E==="BigNumber",O=E==="Complex",G=k?i(1):O?r(1):1;return X(R(G,S(P)),P)}return c}function x$(T){var{config:N,addScalar:V,subtract:Y,abs:X,atan:J,cos:R,sin:F,multiplyScalar:e,inv:i,bignumber:m,multiply:t,add:y}=T;function p(v,h){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:N.epsilon,C=arguments.length>3?arguments[3]:void 0;if(C==="number")return l(v,x);if(C==="BigNumber")return d(v,x);throw TypeError("Unsupported data type: "+C)}function l(v,h){for(var x=v.length,C=Math.abs(h/x),D,L=new Array(x),w=0;w=Math.abs(C);){var S=M[0][0],f=M[0][1];D=r(v[S][S],v[f][f],v[S][f]),v=c(v,D,S,f),L=u(L,D,S,f),M=s(v)}for(var P=A(x,0),E=0;E=X(C);){var S=M[0][0],f=M[0][1];D=n(v[S][S],v[f][f],v[S][f]),v=o(v,D,S,f),L=a(L,D,S,f),M=b(v)}for(var P=A(x,0),E=0;E{var{config:N,typed:V,matrix:Y,addScalar:X,subtract:J,equal:R,abs:F,atan:e,cos:i,sin:m,multiplyScalar:t,divideScalar:y,inv:p,bignumber:l,multiply:d,add:r,larger:n,column:u,flatten:a,number:o,complex:c,sqrt:s,diag:b,qr:g,usolve:A,usolveAll:v,im:h,re:x,smaller:C,matrixFromColumns:D,dot:L}=T,w=x$({config:N,addScalar:X,subtract:J,column:u,flatten:a,equal:R,abs:F,atan:e,cos:i,sin:m,multiplyScalar:t,inv:p,bignumber:l,complex:c,multiply:d,add:r}),M=y$({config:N,addScalar:X,subtract:J,multiply:d,multiplyScalar:t,flatten:a,divideScalar:y,sqrt:s,abs:F,bignumber:l,diag:b,qr:g,inv:p,usolve:A,usolveAll:v,equal:R,complex:c,larger:n,smaller:C,matrixFromColumns:D,dot:L});return V("eigs",{Array:function(G){var z=Y(G);return S(z)},"Array, number|BigNumber":function(G,z){var U=Y(G);return S(U,z)},Matrix:function(G){var{values:z,vectors:U}=S(G);return{values:Y(z),vectors:Y(U)}},"Matrix, number|BigNumber":function(G,z){var{values:U,vectors:H}=S(G,z);return{values:Y(U),vectors:Y(H)}}});function S(O,G){G===void 0&&(G=N.epsilon);var z=O.size();if(z.length!==2||z[0]!==z[1])throw new RangeError("Matrix must be square (size: "+vi(z)+")");var U=O.toArray(),H=z[0];if(P(U,H,G)&&(E(U,H),f(U,H,G))){var B=k(O,U,H);return w(U,H,G,B)}var W=k(O,U,H);return M(U,H,G,W)}function f(O,G,z){for(var U=0;U{var{typed:N,abs:V,add:Y,identity:X,inv:J,multiply:R}=T;return N(XM,{Matrix:function(t){var y=t.size();if(y.length!==2||y[0]!==y[1])throw new RangeError("Matrix must be square (size: "+vi(y)+")");for(var p=y[0],l=1e-15,d=F(t),r=e(d,l),n=r.q,u=r.j,a=R(t,Math.pow(2,-u)),o=X(p),c=X(p),s=1,b=a,g=-1,A=1;A<=n;A++)A>1&&(b=R(b,a),g=-g),s=s*(n-A+1)/((2*n-A+1)*A),o=Y(o,R(s,b)),c=Y(c,R(s*g,b));for(var v=R(J(c),o),h=0;h{var{typed:N,abs:V,add:Y,multiply:X,map:J,sqrt:R,subtract:F,inv:e,size:i,max:m,identity:t}=T,y=1e3,p=1e-6;function l(d){var r,n=0,u=d,a=t(i(d));do{var o=u;if(u=X(.5,Y(o,e(a))),a=X(.5,Y(a,e(o))),r=m(V(F(u,o))),r>p&&++n>y)throw new Error("computing square root of matrix: iterative method could not converge")}while(r>p);return u}return N(jM,{"Array | Matrix":function(r){var n=Qa(r)?r.size():Si(r);switch(n.length){case 1:if(n[0]===1)return J(r,R);throw new RangeError("Matrix must be square (size: "+vi(n)+")");case 2:{var u=n[0],a=n[1];if(u===a)return l(r);throw new RangeError("Matrix must be square (size: "+vi(n)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+vi(n)+")")}}})}),$M="sylvester",C$=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],D$=Lr($M,C$,T=>{var{typed:N,schur:V,matrixFromColumns:Y,matrix:X,multiply:J,range:R,concat:F,transpose:e,index:i,subset:m,add:t,subtract:y,identity:p,lusolve:l,abs:d}=T;return N($M,{"Matrix, Matrix, Matrix":r,"Array, Matrix, Matrix":function(u,a,o){return r(X(u),a,o)},"Array, Array, Matrix":function(u,a,o){return r(X(u),X(a),o)},"Array, Matrix, Array":function(u,a,o){return r(X(u),a,X(o))},"Matrix, Array, Matrix":function(u,a,o){return r(u,X(a),o)},"Matrix, Array, Array":function(u,a,o){return r(u,X(a),X(o))},"Matrix, Matrix, Array":function(u,a,o){return r(u,a,X(o))},"Array, Array, Array":function(u,a,o){return r(X(u),X(a),X(o)).toArray()}});function r(n,u,a){for(var o=u.size()[0],c=n.size()[0],s=V(n),b=s.T,g=s.U,A=V(J(-1,u)),v=A.T,h=A.U,x=J(J(e(g),a),h),C=R(0,c),D=[],L=(ie,le)=>F(ie,le,1),w=(ie,le)=>F(ie,le,0),M=0;M1e-5){for(var S=w(m(x,i(C,M)),m(x,i(C,M+1))),f=0;f{var{typed:N,matrix:V,identity:Y,multiply:X,qr:J,norm:R,subtract:F}=T;return N(KM,{Array:function(m){var t=e(V(m));return{U:t.U.valueOf(),T:t.T.valueOf()}},Matrix:function(m){return e(m)}});function e(i){var m=i.size()[0],t=i,y=Y(m),p=0,l;do{l=t;var d=J(t),r=d.Q,n=d.R;if(t=X(n,r),y=X(y,r),p++>100)break}while(R(F(t,l))>1e-4);return{U:y,T:t}}}),JM="lyap",N$=["typed","matrix","sylvester","multiply","transpose"],R$=Lr(JM,N$,T=>{var{typed:N,matrix:V,sylvester:Y,multiply:X,transpose:J}=T;return N(JM,{"Matrix, Matrix":function(F,e){return Y(F,J(F),X(-1,e))},"Array, Matrix":function(F,e){return Y(V(F),J(V(F)),X(-1,e))},"Matrix, Array":function(F,e){return Y(F,J(V(F)),V(X(-1,e)))},"Array, Array":function(F,e){return Y(V(F),J(V(F)),V(X(-1,e))).toArray()}})}),F$="divide",I$=["typed","matrix","multiply","equalScalar","divideScalar","inv"],_$=Lr(F$,I$,T=>{var{typed:N,matrix:V,multiply:Y,equalScalar:X,divideScalar:J,inv:R}=T,F=qs({typed:N,equalScalar:X}),e=Jf({typed:N});return N("divide",n8({"Array | Matrix, Array | Matrix":function(m,t){return Y(m,R(t))},"DenseMatrix, any":function(m,t){return e(m,t,J,!1)},"SparseMatrix, any":function(m,t){return F(m,t,J,!1)},"Array, any":function(m,t){return e(V(m),t,J,!1).valueOf()},"any, Array | Matrix":function(m,t){return Y(m,R(t))}},J.signatures))}),QM="distance",O$=["typed","addScalar","subtract","divideScalar","multiplyScalar","unaryMinus","sqrt","abs"],z$=Lr(QM,O$,T=>{var{typed:N,addScalar:V,subtract:Y,multiplyScalar:X,divideScalar:J,unaryMinus:R,sqrt:F,abs:e}=T;return N(QM,{"Array, Array, Array":function(c,s,b){if(c.length===2&&s.length===2&&b.length===2){if(!m(c))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!m(s))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!m(b))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");var g=J(Y(b[1],b[0]),Y(s[1],s[0])),A=X(X(g,g),s[0]),v=R(X(g,s[0])),h=c[1];return r(c[0],c[1],A,v,h)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(c,s,b){if(Object.keys(c).length===2&&Object.keys(s).length===2&&Object.keys(b).length===2){if(!m(c))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!m(s))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!m(b))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if("pointX"in c&&"pointY"in c&&"lineOnePtX"in s&&"lineOnePtY"in s&&"lineTwoPtX"in b&&"lineTwoPtY"in b){var g=J(Y(b.lineTwoPtY,b.lineTwoPtX),Y(s.lineOnePtY,s.lineOnePtX)),A=X(X(g,g),s.lineOnePtX),v=R(X(g,s.lineOnePtX)),h=c.pointX;return r(c.pointX,c.pointY,A,v,h)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(c,s){if(c.length===2&&s.length===3){if(!m(c))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!t(s))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return r(c[0],c[1],s[0],s[1],s[2])}else if(c.length===3&&s.length===6){if(!t(c))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!p(s))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return n(c[0],c[1],c[2],s[0],s[1],s[2],s[3],s[4],s[5])}else if(c.length===s.length&&c.length>0){if(!y(c))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!y(s))throw new TypeError("All values of an array should be numbers or BigNumbers");return u(c,s)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(c,s){if(Object.keys(c).length===2&&Object.keys(s).length===3){if(!m(c))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!t(s))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in c&&"pointY"in c&&"xCoeffLine"in s&&"yCoeffLine"in s&&"constant"in s)return r(c.pointX,c.pointY,s.xCoeffLine,s.yCoeffLine,s.constant);throw new TypeError("Key names do not match")}else if(Object.keys(c).length===3&&Object.keys(s).length===6){if(!t(c))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!p(s))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in c&&"pointY"in c&&"x0"in s&&"y0"in s&&"z0"in s&&"a"in s&&"b"in s&&"c"in s)return n(c.pointX,c.pointY,c.pointZ,s.x0,s.y0,s.z0,s.a,s.b,s.c);throw new TypeError("Key names do not match")}else if(Object.keys(c).length===2&&Object.keys(s).length===2){if(!m(c))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!m(s))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in c&&"pointOneY"in c&&"pointTwoX"in s&&"pointTwoY"in s)return u([c.pointOneX,c.pointOneY],[s.pointTwoX,s.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(c).length===3&&Object.keys(s).length===3){if(!t(c))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!t(s))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in c&&"pointOneY"in c&&"pointOneZ"in c&&"pointTwoX"in s&&"pointTwoY"in s&&"pointTwoZ"in s)return u([c.pointOneX,c.pointOneY,c.pointOneZ],[s.pointTwoX,s.pointTwoY,s.pointTwoZ]);throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},Array:function(c){if(!d(c))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return a(c)}});function i(o){return typeof o=="number"||Ei(o)}function m(o){return o.constructor!==Array&&(o=l(o)),i(o[0])&&i(o[1])}function t(o){return o.constructor!==Array&&(o=l(o)),i(o[0])&&i(o[1])&&i(o[2])}function y(o){return Array.isArray(o)||(o=l(o)),o.every(i)}function p(o){return o.constructor!==Array&&(o=l(o)),i(o[0])&&i(o[1])&&i(o[2])&&i(o[3])&&i(o[4])&&i(o[5])}function l(o){for(var c=Object.keys(o),s=[],b=0;bc.length!==2||!i(c[0])||!i(c[1])))return!1}else if(o[0].length===3&&i(o[0][0])&&i(o[0][1])&&i(o[0][2])){if(o.some(c=>c.length!==3||!i(c[0])||!i(c[1])||!i(c[2])))return!1}else return!1;return!0}function r(o,c,s,b,g){var A=e(V(V(X(s,o),X(b,c)),g)),v=F(V(X(s,s),X(b,b)));return J(A,v)}function n(o,c,s,b,g,A,v,h,x){var C=[Y(X(Y(g,c),x),X(Y(A,s),h)),Y(X(Y(A,s),v),X(Y(b,o),x)),Y(X(Y(b,o),h),X(Y(g,c),v))];C=F(V(V(X(C[0],C[0]),X(C[1],C[1])),X(C[2],C[2])));var D=F(V(V(X(v,v),X(h,h)),X(x,x)));return J(C,D)}function u(o,c){for(var s=o.length,b=0,g=0,A=0;A{var{typed:N,config:V,abs:Y,add:X,addScalar:J,matrix:R,multiply:F,multiplyScalar:e,divideScalar:i,subtract:m,smaller:t,equalScalar:y,flatten:p,isZero:l,isNumeric:d}=T;return N("intersect",{"Array, Array, Array":r,"Array, Array, Array, Array":n,"Matrix, Matrix, Matrix":function(h,x,C){var D=r(h.valueOf(),x.valueOf(),C.valueOf());return D===null?null:R(D)},"Matrix, Matrix, Matrix, Matrix":function(h,x,C,D){var L=n(h.valueOf(),x.valueOf(),C.valueOf(),D.valueOf());return L===null?null:R(L)}});function r(v,h,x){if(v=u(v),h=u(h),x=u(x),!o(v))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!o(h))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!c(x))throw new TypeError("Array with 4 numbers expected as third argument");return A(v[0],v[1],v[2],h[0],h[1],h[2],x[0],x[1],x[2],x[3])}function n(v,h,x,C){if(v=u(v),h=u(h),x=u(x),C=u(C),v.length===2){if(!a(v))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!a(h))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!a(x))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!a(C))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return s(v,h,x,C)}else if(v.length===3){if(!o(v))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!o(h))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!o(x))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!o(C))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return g(v[0],v[1],v[2],h[0],h[1],h[2],x[0],x[1],x[2],C[0],C[1],C[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function u(v){return v.length===1?v[0]:v.length>1&&Array.isArray(v[0])&&v.every(h=>Array.isArray(h)&&h.length===1)?p(v):v}function a(v){return v.length===2&&d(v[0])&&d(v[1])}function o(v){return v.length===3&&d(v[0])&&d(v[1])&&d(v[2])}function c(v){return v.length===4&&d(v[0])&&d(v[1])&&d(v[2])&&d(v[3])}function s(v,h,x,C){var D=v,L=x,w=m(D,h),M=m(L,C),S=m(e(w[0],M[1]),e(M[0],w[1]));if(l(S)||t(Y(S),V.epsilon))return null;var f=e(M[0],D[1]),P=e(M[1],D[0]),E=e(M[0],L[1]),k=e(M[1],L[0]),O=i(J(m(m(f,P),E),k),S);return X(F(w,O),D)}function b(v,h,x,C,D,L,w,M,S,f,P,E){var k=e(m(v,h),m(x,C)),O=e(m(D,L),m(w,M)),G=e(m(S,f),m(P,E));return J(J(k,O),G)}function g(v,h,x,C,D,L,w,M,S,f,P,E){var k=b(v,w,f,w,h,M,P,M,x,S,E,S),O=b(f,w,C,v,P,M,D,h,E,S,L,x),G=b(v,w,C,v,h,M,D,h,x,S,L,x),z=b(f,w,f,w,P,M,P,M,E,S,E,S),U=b(C,v,C,v,D,h,D,h,L,x,L,x),H=m(e(k,O),e(G,z)),B=m(e(U,z),e(O,O));if(l(B))return null;var W=i(H,B),q=i(J(k,e(W,O)),z),re=J(v,e(W,m(C,v))),ie=J(h,e(W,m(D,h))),le=J(x,e(W,m(L,x))),he=J(w,e(q,m(f,w))),$=J(M,e(q,m(P,M))),Z=J(S,e(q,m(E,S)));return y(re,he)&&y(ie,$)&&y(le,Z)?[re,ie,le]:null}function A(v,h,x,C,D,L,w,M,S,f){var P=e(v,w),E=e(C,w),k=e(h,M),O=e(D,M),G=e(x,S),z=e(L,S),U=m(m(m(f,P),k),G),H=m(m(m(J(J(E,O),z),P),k),G),B=i(U,H),W=J(v,e(B,m(C,v))),q=J(h,e(B,m(D,h))),re=J(x,e(B,m(L,x)));return[W,q,re]}}),qM="sum",H$=["typed","config","add","numeric"],YC=Lr(qM,H$,T=>{var{typed:N,config:V,add:Y,numeric:X}=T;return N(qM,{"Array | Matrix":J,"Array | Matrix, number | BigNumber":R,"...":function(e){if(g0(e))throw new TypeError("Scalar values expected in function sum");return J(e)}});function J(F){var e;return Rh(F,function(i){try{e=e===void 0?i:Y(e,i)}catch(m){throw Bl(m,"sum",i)}}),e===void 0&&(e=X(0,V.number)),typeof e=="string"&&(e=X(e,V.number)),e}function R(F,e){try{var i=V1(F,e,Y);return i}catch(m){throw Bl(m,"sum")}}}),vy="cumsum",V$=["typed","add","unaryPlus"],ZC=Lr(vy,V$,T=>{var{typed:N,add:V,unaryPlus:Y}=T;return N(vy,{Array:X,Matrix:function(i){return i.create(X(i.valueOf()))},"Array, number | BigNumber":R,"Matrix, number | BigNumber":function(i,m){return i.create(R(i.valueOf(),m))},"...":function(i){if(g0(i))throw new TypeError("All values expected to be scalar in function cumsum");return X(i)}});function X(e){try{return J(e)}catch(i){throw Bl(i,vy)}}function J(e){if(e.length===0)return[];for(var i=[Y(e[0])],m=1;m=m.length)throw new $f(i,m.length);try{return F(e,i)}catch(t){throw Bl(t,vy)}}function F(e,i){var m,t,y;if(i<=0){var p=e[0][0];if(Array.isArray(p)){for(y=P8(e),t=[],m=0;m{var{typed:N,add:V,divide:Y}=T;return N(eS,{"Array | Matrix":J,"Array | Matrix, number | BigNumber":X,"...":function(F){if(g0(F))throw new TypeError("Scalar values expected in function mean");return J(F)}});function X(R,F){try{var e=V1(R,F,V),i=Array.isArray(R)?Si(R):R.size();return Y(e,i[F])}catch(m){throw Bl(m,"mean")}}function J(R){var F,e=0;if(Rh(R,function(i){try{F=F===void 0?i:V(F,i),e++}catch(m){throw Bl(m,"mean",i)}}),e===0)throw new Error("Cannot calculate the mean of an empty array");return Y(F,e)}}),tS="median",W$=["typed","add","divide","compare","partitionSelect"],Y$=Lr(tS,W$,T=>{var{typed:N,add:V,divide:Y,compare:X,partitionSelect:J}=T;function R(i){try{i=Ui(i.valueOf());var m=i.length;if(m===0)throw new Error("Cannot calculate median of an empty array");if(m%2===0){for(var t=m/2-1,y=J(i,t+1),p=i[t],l=0;l0&&(p=i[l]);return e(p,y)}else{var d=J(i,(m-1)/2);return F(d)}}catch(r){throw Bl(r,"median")}}var F=N({"number | BigNumber | Complex | Unit":function(m){return m}}),e=N({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(m,t){return Y(V(m,t),2)}});return N(tS,{"Array | Matrix":R,"Array | Matrix, number | BigNumber":function(m,t){throw new Error("median(A, dim) is not yet supported")},"...":function(m){if(g0(m))throw new TypeError("Scalar values expected in function median");return R(m)}})}),rS="mad",Z$=["typed","abs","map","median","subtract"],X$=Lr(rS,Z$,T=>{var{typed:N,abs:V,map:Y,median:X,subtract:J}=T;return N(rS,{"Array | Matrix":R,"...":function(e){return R(e)}});function R(F){if(F=Ui(F.valueOf()),F.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var e=X(F);return X(Y(F,function(i){return V(J(i,e))}))}catch(i){throw i instanceof TypeError&&i.message.indexOf("median")!==-1?new TypeError(i.message.replace("median","mad")):Bl(i,"mad")}}}),h2="unbiased",nS="variance",j$=["typed","add","subtract","multiply","divide","apply","isNaN"],jC=Lr(nS,j$,T=>{var{typed:N,add:V,subtract:Y,multiply:X,divide:J,apply:R,isNaN:F}=T;return N(nS,{"Array | Matrix":function(t){return e(t,h2)},"Array | Matrix, string":e,"Array | Matrix, number | BigNumber":function(t,y){return i(t,y,h2)},"Array | Matrix, number | BigNumber, string":i,"...":function(t){return e(t,h2)}});function e(m,t){var y,p=0;if(m.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(Rh(m,function(r){try{y=y===void 0?r:V(y,r),p++}catch(n){throw Bl(n,"variance",r)}}),p===0)throw new Error("Cannot calculate variance of an empty array");var l=J(y,p);if(y=void 0,Rh(m,function(r){var n=Y(r,l);y=y===void 0?X(n,n):V(y,X(n,n))}),F(y))return y;switch(t){case"uncorrected":return J(y,p);case"biased":return J(y,p+1);case"unbiased":{var d=Ei(y)?y.mul(0):0;return p===1?d:J(y,p-1)}default:throw new Error('Unknown normalization "'+t+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function i(m,t,y){try{if(m.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return R(m,t,p=>e(p,y))}catch(p){throw Bl(p,"variance")}}}),$$="quantileSeq",K$=["typed","add","multiply","partitionSelect","compare"],J$=Lr($$,K$,T=>{var{typed:N,add:V,multiply:Y,partitionSelect:X,compare:J}=T;function R(i,m,t){var y,p,l;if(arguments.length<2||arguments.length>3)throw new SyntaxError("Function quantileSeq requires two or three parameters");if(Lc(i)){if(t=t||!1,typeof t=="boolean"){if(p=i.valueOf(),Ni(m)){if(m<0)throw new Error("N/prob must be non-negative");if(m<=1)return F(p,m,t);if(m>1){if(!Ya(m))throw new Error("N must be a positive integer");var d=m+1;y=new Array(m);for(var r=0;r4294967295)throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var a=new n(u+1);y=new Array(u);for(var o=0;o1)throw new Error("Probability must be between 0 and 1, inclusive")}else if(Ei(b)){if(l=new b.constructor(1),b.isNegative()||b.gt(l))throw new Error("Probability must be between 0 and 1, inclusive")}else throw new TypeError("Unexpected type of argument in function quantileSeq");y[s]=F(p,b,t)}return y}throw new TypeError("Unexpected type of argument in function quantileSeq")}throw new TypeError("Unexpected type of argument in function quantileSeq")}throw new TypeError("Unexpected type of argument in function quantileSeq")}function F(i,m,t){var y=Ui(i),p=y.length;if(p===0)throw new Error("Cannot calculate quantile of an empty sequence");if(Ni(m)){var l=m*(p-1),d=l%1;if(d===0){var r=t?y[l]:X(y,l);return e(r),r}var n=Math.floor(l),u,a;if(t)u=y[n],a=y[n+1];else{a=X(y,n+1),u=y[n];for(var o=0;o0&&(u=y[o])}return e(u),e(a),V(Y(u,1-d),Y(a,d))}var c=m.times(p-1);if(c.isInteger()){c=c.toNumber();var s=t?y[c]:X(y,c);return e(s),s}var b=c.floor(),g=c.minus(b),A=b.toNumber(),v,h;if(t)v=y[A],h=y[A+1];else{h=X(y,A+1),v=y[A];for(var x=0;x0&&(v=y[x])}e(v),e(h);var C=new g.constructor(1);return V(Y(v,C.minus(g)),Y(h,g))}var e=N({"number | BigNumber | Unit":function(m){return m}});return R}),aS="std",Q$=["typed","map","sqrt","variance"],$C=Lr(aS,Q$,T=>{var{typed:N,map:V,sqrt:Y,variance:X}=T;return N(aS,{"Array | Matrix":J,"Array | Matrix, string":J,"Array | Matrix, number | BigNumber":J,"Array | Matrix, number | BigNumber, string":J,"...":function(F){return J(F)}});function J(R,F){if(R.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var e=X.apply(null,arguments);return Lc(e)?V(e,Y):Y(e)}catch(i){throw i instanceof TypeError&&i.message.indexOf(" variance")!==-1?new TypeError(i.message.replace(" variance"," std")):i}}}),iS="combinations",q$=["typed"],eK=Lr(iS,q$,T=>{var{typed:N}=T;return N(iS,{"number, number":eC,"BigNumber, BigNumber":function(Y,X){var J=Y.constructor,R,F,e=Y.minus(X),i=new J(1);if(!oS(Y)||!oS(X))throw new TypeError("Positive integer value expected in function combinations");if(X.gt(Y))throw new TypeError("k must be less than n in function combinations");if(R=i,X.lt(e))for(F=i;F.lte(e);F=F.plus(i))R=R.times(X.plus(F)).dividedBy(F);else for(F=i;F.lte(X);F=F.plus(i))R=R.times(e.plus(F)).dividedBy(F);return R}})});function oS(T){return T.isInteger()&&T.gte(0)}var sS="combinationsWithRep",tK=["typed"],rK=Lr(sS,tK,T=>{var{typed:N}=T;return N(sS,{"number, number":function(Y,X){if(!Ya(Y)||Y<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!Ya(X)||X<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(Y<1)throw new TypeError("k must be less than or equal to n + k - 1");if(X{var{typed:N,config:V,multiplyScalar:Y,pow:X,BigNumber:J,Complex:R}=T;function F(i){if(i.im===0)return i1(i.re);if(i.re<.5){var m=new R(1-i.re,-i.im),t=new R(Math.PI*i.re,Math.PI*i.im);return new R(Math.PI).div(t.sin()).div(F(m))}i=new R(i.re-1,i.im);for(var y=new R(Jp[0],0),p=1;p2;)y-=2,l+=y,p=p.times(l);return new J(p.toPrecision(J.precision))}}),fS="lgamma",iK=["Complex","typed"],oK=Lr(fS,iK,T=>{var{Complex:N,typed:V}=T,Y=7,X=7,J=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return V(fS,{number:o1,Complex:R,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function R(i){var m=6.283185307179586,t=1.1447298858494002,y=.1;if(i.isNaN())return new N(NaN,NaN);if(i.im===0)return new N(o1(i.re),0);if(i.re>=Y||Math.abs(i.im)>=X)return F(i);if(i.re<=y){var p=uF(m,i.im)*Math.floor(.5*i.re+.25),l=i.mul(Math.PI).sin().log(),d=R(new N(1-i.re,-i.im));return new N(t,p).sub(l).sub(d)}else return i.im>=0?e(i):e(i.conjugate()).conjugate()}function F(i){for(var m=i.sub(.5).mul(i.log()).sub(i).add(oC),t=new N(1,0).div(i),y=t.div(i),p=J[0],l=J[1],d=2*y.re,r=y.re*y.re+y.im*y.im,n=2;n<8;n++){var u=l;l=-r*p+J[n],p=d*p+u}var a=t.mul(y.mul(p).add(l));return m.add(a)}function e(i){var m=0,t=0,y=i;for(i=i.add(1);i.re<=Y;){y=y.mul(i);var p=y.im<0?1:0;p!==0&&t===0&&m++,t=p,i=i.add(1)}return F(i).sub(y.log()).sub(new N(0,m*2*Math.PI*1))}}),cS="factorial",sK=["typed","gamma"],lK=Lr(cS,sK,T=>{var{typed:N,gamma:V}=T;return N(cS,{number:function(X){if(X<0)throw new Error("Value must be non-negative");return V(X+1)},BigNumber:function(X){if(X.isNegative())throw new Error("Value must be non-negative");return V(X.plus(1))},"Array | Matrix":N.referToSelf(Y=>X=>wi(X,Y))})}),hS="kldivergence",uK=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],fK=Lr(hS,uK,T=>{var{typed:N,matrix:V,divide:Y,sum:X,multiply:J,map:R,dotDivide:F,log:e,isNumeric:i}=T;return N(hS,{"Array, Array":function(y,p){return m(V(y),V(p))},"Matrix, Array":function(y,p){return m(y,V(p))},"Array, Matrix":function(y,p){return m(V(y),p)},"Matrix, Matrix":function(y,p){return m(y,p)}});function m(t,y){var p=y.size().length,l=t.size().length;if(p>1)throw new Error("first object must be one dimensional");if(l>1)throw new Error("second object must be one dimensional");if(p!==l)throw new Error("Length of two vectors must be equal");var d=X(t);if(d===0)throw new Error("Sum of elements in first object must be non zero");var r=X(y);if(r===0)throw new Error("Sum of elements in second object must be non zero");var n=Y(t,X(t)),u=Y(y,X(y)),a=X(J(n,R(F(n,u),o=>e(o))));return i(a)?a:Number.NaN}}),vS="multinomial",cK=["typed","add","divide","multiply","factorial","isInteger","isPositive"],hK=Lr(vS,cK,T=>{var{typed:N,add:V,divide:Y,multiply:X,factorial:J,isInteger:R,isPositive:F}=T;return N(vS,{"Array | Matrix":function(i){var m=0,t=1;return Rh(i,function(y){if(!R(y)||!F(y))throw new TypeError("Positive integer value expected in function multinomial");m=V(m,y),t=X(t,J(y))}),Y(J(m),t)}})}),dS="permutations",vK=["typed","factorial"],dK=Lr(dS,vK,T=>{var{typed:N,factorial:V}=T;return N(dS,{"number | BigNumber":V,"number, number":function(X,J){if(!Ya(X)||X<0)throw new TypeError("Positive integer value expected in function permutations");if(!Ya(J)||J<0)throw new TypeError("Positive integer value expected in function permutations");if(J>X)throw new TypeError("second argument k must be less than or equal to first argument n");return Th(X-J+1,X)},"BigNumber, BigNumber":function(X,J){var R,F;if(!pS(X)||!pS(J))throw new TypeError("Positive integer value expected in function permutations");if(J.gt(X))throw new TypeError("second argument k must be less than or equal to first argument n");var e=X.mul(0).add(1);for(R=e,F=X.minus(J).plus(1);F.lte(X);F=F.plus(1))R=R.times(F);return R}})});function pS(T){return T.isInteger()&&T.gte(0)}var KC={exports:{}};(function(T){(function(N,V,Y){function X(e){var i=this,m=F();i.next=function(){var t=2091639*i.s0+i.c*23283064365386963e-26;return i.s0=i.s1,i.s1=i.s2,i.s2=t-(i.c=t|0)},i.c=1,i.s0=m(" "),i.s1=m(" "),i.s2=m(" "),i.s0-=m(e),i.s0<0&&(i.s0+=1),i.s1-=m(e),i.s1<0&&(i.s1+=1),i.s2-=m(e),i.s2<0&&(i.s2+=1),m=null}function J(e,i){return i.c=e.c,i.s0=e.s0,i.s1=e.s1,i.s2=e.s2,i}function R(e,i){var m=new X(e),t=i&&i.state,y=m.next;return y.int32=function(){return m.next()*4294967296|0},y.double=function(){return y()+(y()*2097152|0)*11102230246251565e-32},y.quick=y,t&&(typeof t=="object"&&J(t,m),y.state=function(){return J(m,{})}),y}function F(){var e=4022871197,i=function(m){m=String(m);for(var t=0;t>>0,y-=e,y*=e,e=y>>>0,y-=e,e+=y*4294967296}return(e>>>0)*23283064365386963e-26};return i}V&&V.exports?V.exports=R:Y&&Y.amd?Y(function(){return R}):this.alea=R})(Bd,T,!1)})(KC);var JC={exports:{}};(function(T){(function(N,V,Y){function X(F){var e=this,i="";e.x=0,e.y=0,e.z=0,e.w=0,e.next=function(){var t=e.x^e.x<<11;return e.x=e.y,e.y=e.z,e.z=e.w,e.w^=e.w>>>19^t^t>>>8},F===(F|0)?e.x=F:i+=F;for(var m=0;m>>0)/4294967296};return t.double=function(){do var y=i.next()>>>11,p=(i.next()>>>0)/4294967296,l=(y+p)/(1<<21);while(l===0);return l},t.int32=i.next,t.quick=t,m&&(typeof m=="object"&&J(m,i),t.state=function(){return J(i,{})}),t}V&&V.exports?V.exports=R:Y&&Y.amd?Y(function(){return R}):this.xor128=R})(Bd,T,!1)})(JC);var QC={exports:{}};(function(T){(function(N,V,Y){function X(F){var e=this,i="";e.next=function(){var t=e.x^e.x>>>2;return e.x=e.y,e.y=e.z,e.z=e.w,e.w=e.v,(e.d=e.d+362437|0)+(e.v=e.v^e.v<<4^(t^t<<1))|0},e.x=0,e.y=0,e.z=0,e.w=0,e.v=0,F===(F|0)?e.x=F:i+=F;for(var m=0;m>>4),e.next()}function J(F,e){return e.x=F.x,e.y=F.y,e.z=F.z,e.w=F.w,e.v=F.v,e.d=F.d,e}function R(F,e){var i=new X(F),m=e&&e.state,t=function(){return(i.next()>>>0)/4294967296};return t.double=function(){do var y=i.next()>>>11,p=(i.next()>>>0)/4294967296,l=(y+p)/(1<<21);while(l===0);return l},t.int32=i.next,t.quick=t,m&&(typeof m=="object"&&J(m,i),t.state=function(){return J(i,{})}),t}V&&V.exports?V.exports=R:Y&&Y.amd?Y(function(){return R}):this.xorwow=R})(Bd,T,!1)})(QC);var qC={exports:{}};(function(T){(function(N,V,Y){function X(F){var e=this;e.next=function(){var m=e.x,t=e.i,y,p;return y=m[t],y^=y>>>7,p=y^y<<24,y=m[t+1&7],p^=y^y>>>10,y=m[t+3&7],p^=y^y>>>3,y=m[t+4&7],p^=y^y<<7,y=m[t+7&7],y=y^y<<13,p^=y^y<<9,m[t]=p,e.i=t+1&7,p};function i(m,t){var y,p=[];if(t===(t|0))p[0]=t;else for(t=""+t,y=0;y0;--y)m.next()}i(e,F)}function J(F,e){return e.x=F.x.slice(),e.i=F.i,e}function R(F,e){F==null&&(F=+new Date);var i=new X(F),m=e&&e.state,t=function(){return(i.next()>>>0)/4294967296};return t.double=function(){do var y=i.next()>>>11,p=(i.next()>>>0)/4294967296,l=(y+p)/(1<<21);while(l===0);return l},t.int32=i.next,t.quick=t,m&&(m.x&&J(m,i),t.state=function(){return J(i,{})}),t}V&&V.exports?V.exports=R:Y&&Y.amd?Y(function(){return R}):this.xorshift7=R})(Bd,T,!1)})(qC);var eD={exports:{}};(function(T){(function(N,V,Y){function X(F){var e=this;e.next=function(){var m=e.w,t=e.X,y=e.i,p,l;return e.w=m=m+1640531527|0,l=t[y+34&127],p=t[y=y+1&127],l^=l<<13,p^=p<<17,l^=l>>>15,p^=p>>>12,l=t[y]=l^p,e.i=y,l+(m^m>>>16)|0};function i(m,t){var y,p,l,d,r,n=[],u=128;for(t===(t|0)?(p=t,t=null):(t=t+"\0",p=0,u=Math.max(u,t.length)),l=0,d=-32;d>>15,p^=p<<4,p^=p>>>13,d>=0&&(r=r+1640531527|0,y=n[d&127]^=p+r,l=y==0?l+1:0);for(l>=128&&(n[(t&&t.length||0)&127]=-1),l=127,d=4*128;d>0;--d)p=n[l+34&127],y=n[l=l+1&127],p^=p<<13,y^=y<<17,p^=p>>>15,y^=y>>>12,n[l]=p^y;m.w=r,m.X=n,m.i=l}i(e,F)}function J(F,e){return e.i=F.i,e.w=F.w,e.X=F.X.slice(),e}function R(F,e){F==null&&(F=+new Date);var i=new X(F),m=e&&e.state,t=function(){return(i.next()>>>0)/4294967296};return t.double=function(){do var y=i.next()>>>11,p=(i.next()>>>0)/4294967296,l=(y+p)/(1<<21);while(l===0);return l},t.int32=i.next,t.quick=t,m&&(m.X&&J(m,i),t.state=function(){return J(i,{})}),t}V&&V.exports?V.exports=R:Y&&Y.amd?Y(function(){return R}):this.xor4096=R})(Bd,T,!1)})(eD);var tD={exports:{}};(function(T){(function(N,V,Y){function X(F){var e=this,i="";e.next=function(){var t=e.b,y=e.c,p=e.d,l=e.a;return t=t<<25^t>>>7^y,y=y-p|0,p=p<<24^p>>>8^l,l=l-t|0,e.b=t=t<<20^t>>>12^y,e.c=y=y-p|0,e.d=p<<16^y>>>16^l,e.a=l-t|0},e.a=0,e.b=0,e.c=-1640531527,e.d=1367130551,F===Math.floor(F)?(e.a=F/4294967296|0,e.b=F|0):i+=F;for(var m=0;m>>0)/4294967296};return t.double=function(){do var y=i.next()>>>11,p=(i.next()>>>0)/4294967296,l=(y+p)/(1<<21);while(l===0);return l},t.int32=i.next,t.quick=t,m&&(typeof m=="object"&&J(m,i),t.state=function(){return J(i,{})}),t}V&&V.exports?V.exports=R:Y&&Y.amd?Y(function(){return R}):this.tychei=R})(Bd,T,!1)})(tD);var rD={exports:{}};const pK={},gK=Object.freeze(Object.defineProperty({__proto__:null,default:pK},Symbol.toStringTag,{value:"Module"})),mK=$L(gK);(function(T){(function(N,V,Y){var X=256,J=6,R=52,F="random",e=Y.pow(X,J),i=Y.pow(2,R),m=i*2,t=X-1,y;function p(o,c,s){var b=[];c=c==!0?{entropy:!0}:c||{};var g=n(r(c.entropy?[o,a(V)]:o==null?u():o,3),b),A=new l(b),v=function(){for(var h=A.g(J),x=e,C=0;h=m;)h/=2,x/=2,C>>>=1;return(h+C)/x};return v.int32=function(){return A.g(4)|0},v.quick=function(){return A.g(4)/4294967296},v.double=v,n(a(A.S),V),(c.pass||s||function(h,x,C,D){return D&&(D.S&&d(D,A),h.state=function(){return d(A,{})}),C?(Y[F]=h,x):h})(v,g,"global"in c?c.global:this==Y,c.state)}function l(o){var c,s=o.length,b=this,g=0,A=b.i=b.j=0,v=b.S=[];for(s||(o=[s++]);g{var{typed:N,config:V,on:Y}=T,X=f0(V.randomSeed);return Y&&Y("config",function(R,F){R.randomSeed!==F.randomSeed&&(X=f0(R.randomSeed))}),N(gS,{"Array | Matrix":function(F){return J(F,{})},"Array | Matrix, Object":function(F,e){return J(F,e)},"Array | Matrix, number":function(F,e){return J(F,{number:e})},"Array | Matrix, Array | Matrix":function(F,e){return J(F,{weights:e})},"Array | Matrix, Array | Matrix, number":function(F,e,i){return J(F,{number:i,weights:e})},"Array | Matrix, number, Array | Matrix":function(F,e,i){return J(F,{number:e,weights:i})}});function J(R,F){var{number:e,weights:i,elementWise:m=!0}=F,t=typeof e>"u";t&&(e=1);var y=Qa(R)?R.create:Qa(i)?i.create:null;R=R.valueOf(),i&&(i=i.valueOf()),m===!0&&(R=Ui(R),i=Ui(i));var p=0;if(typeof i<"u"){if(i.length!==R.length)throw new Error("Weights must have the same length as possibles");for(var l=0,d=i.length;l"u")u=R[Math.floor(X()*r)];else for(var a=X()*p,o=0,c=R.length;o1)for(var Y=0,X=T.shift();Y{var{typed:N,config:V,on:Y}=T,X=f0(V.randomSeed);return Y&&Y("config",function(F,e){F.randomSeed!==e.randomSeed&&(X=f0(F.randomSeed))}),N(mS,{"":()=>R(0,1),number:F=>R(0,F),"number, number":(F,e)=>R(F,e),"Array | Matrix":F=>J(F,0,1),"Array | Matrix, number":(F,e)=>J(F,0,e),"Array | Matrix, number, number":(F,e,i)=>J(F,e,i)});function J(F,e,i){var m=I3(F.valueOf(),()=>R(e,i));return Qa(F)?F.create(m):m}function R(F,e){return F+X()*(e-F)}}),yS="randomInt",LK=["typed","config","?on"],PK=Lr(yS,LK,T=>{var{typed:N,config:V,on:Y}=T,X=f0(V.randomSeed);return Y&&Y("config",function(F,e){F.randomSeed!==e.randomSeed&&(X=f0(F.randomSeed))}),N(yS,{"":()=>R(0,1),number:F=>R(0,F),"number, number":(F,e)=>R(F,e),"Array | Matrix":F=>J(F,0,1),"Array | Matrix, number":(F,e)=>J(F,0,e),"Array | Matrix, number, number":(F,e,i)=>J(F,e,i)});function J(F,e,i){var m=I3(F.valueOf(),()=>R(e,i));return Qa(F)?F.create(m):m}function R(F,e){return Math.floor(F+X()*(e-F))}}),xS="stirlingS2",NK=["typed","addScalar","subtract","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],RK=Lr(xS,NK,T=>{var{typed:N,addScalar:V,subtract:Y,multiplyScalar:X,divideScalar:J,pow:R,factorial:F,combinations:e,isNegative:i,isInteger:m,number:t,bignumber:y,larger:p}=T,l=[],d=[];return N(xS,{"number | BigNumber, number | BigNumber":function(n,u){if(!m(n)||i(n)||!m(u)||i(u))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(p(u,n))throw new TypeError("k must be less than or equal to n in function stirlingS2");var a=!(Ni(n)&&Ni(u)),o=a?d:l,c=a?y:t,s=t(n),b=t(u);if(o[s]&&o[s].length>b)return o[s][b];for(var g=0;g<=s;++g)if(o[g]||(o[g]=[c(g===0?1:0)]),g!==0)for(var A=o[g],v=o[g-1],h=A.length;h<=g&&h<=b;++h)h===g?A[h]=1:A[h]=V(X(c(h),v[h]),v[h-1]);return o[s][b]}})}),bS="bellNumbers",FK=["typed","addScalar","isNegative","isInteger","stirlingS2"],IK=Lr(bS,FK,T=>{var{typed:N,addScalar:V,isNegative:Y,isInteger:X,stirlingS2:J}=T;return N(bS,{"number | BigNumber":function(F){if(!X(F)||Y(F))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var e=0,i=0;i<=F;i++)e=V(e,J(F,i));return e}})}),wS="catalan",_K=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],OK=Lr(wS,_K,T=>{var{typed:N,addScalar:V,divideScalar:Y,multiplyScalar:X,combinations:J,isNegative:R,isInteger:F}=T;return N(wS,{"number | BigNumber":function(i){if(!F(i)||R(i))throw new TypeError("Non-negative integer value expected in function catalan");return Y(J(X(i,2),i),V(i,1))}})}),AS="composition",zK=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],kK=Lr(AS,zK,T=>{var{typed:N,addScalar:V,combinations:Y,isPositive:X,isNegative:J,isInteger:R,larger:F}=T;return N(AS,{"number | BigNumber, number | BigNumber":function(i,m){if(!R(i)||!X(i)||!R(m)||!X(m))throw new TypeError("Positive integer value expected in function composition");if(F(m,i))throw new TypeError("k must be less than or equal to n in function composition");return Y(V(i,-1),V(m,-1))}})}),TS="leafCount",BK=["parse","typed"],UK=Lr(TS,BK,T=>{var{parse:N,typed:V}=T;function Y(X){var J=0;return X.forEach(R=>{J+=Y(R)}),J||1}return V(TS,{Node:function(J){return Y(J)}})});function MS(T){return Bi(T)||ds(T)&&T.isUnary()&&Bi(T.args[0])}function g1(T){return!!(Bi(T)||(_v(T)||ds(T))&&T.args.every(g1)||Nh(T)&&g1(T.content))}function SS(T,N){var V=Object.keys(T);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(T);N&&(Y=Y.filter(function(X){return Object.getOwnPropertyDescriptor(T,X).enumerable})),V.push.apply(V,Y)}return V}function v2(T){for(var N=1;N{var{FunctionNode:N,OperatorNode:V,SymbolNode:Y}=T,X=!0,J=!1,R="defaultF",F={add:{trivial:X,total:X,commutative:X,associative:X},unaryPlus:{trivial:X,total:X,commutative:X,associative:X},subtract:{trivial:J,total:X,commutative:J,associative:J},multiply:{trivial:X,total:X,commutative:X,associative:X},divide:{trivial:J,total:X,commutative:J,associative:J},paren:{trivial:X,total:X,commutative:X,associative:J},defaultF:{trivial:J,total:X,commutative:J,associative:J}},e={divide:{total:J},log:{total:J}},i={subtract:{total:J},abs:{trivial:X},log:{total:X}};function m(a,o){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:F,s=R;if(typeof a=="string"?s=a:ds(a)?s=a.fn.toString():_v(a)?s=a.name:Nh(a)&&(s="paren"),ka(c,s)){var b=c[s];if(ka(b,o))return b[o];if(ka(F,s))return F[s][o]}if(ka(c,R)){var g=c[R];return ka(g,o)?g[o]:F[R][o]}if(ka(F,s)){var A=F[s];if(ka(A,o))return A[o]}return F[R][o]}function t(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:F;return m(a,"commutative",o)}function y(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:F;return m(a,"associative",o)}function p(a,o){var c=v2({},a);for(var s in o)ka(a,s)?c[s]=v2(v2({},o[s]),a[s]):c[s]=o[s];return c}function l(a,o){if(!a.args||a.args.length===0)return a;a.args=d(a,o);for(var c=0;c2&&y(a,o)){for(var g=a.args.pop();a.args.length>0;)g=c([a.args.pop(),g]);a.args=g.args}}}function n(a,o){if(!(!a.args||a.args.length===0)){for(var c=u(a),s=a.args.length,b=0;b2&&y(a,o)){for(var g=a.args.shift();a.args.length>0;)g=c([g,a.args.shift()]);a.args=g.args}}}function u(a){return ds(a)?function(o){try{return new V(a.op,a.fn,o,a.implicit)}catch(c){return console.error(c),[]}}:function(o){return new N(new Y(a.name),o)}}return{createMakeNodeFunction:u,hasProperty:m,isCommutative:t,isAssociative:y,mergeContext:p,flatten:l,allChildren:d,unflattenr:r,unflattenl:n,defaultContext:F,realContext:e,positiveContext:i}}),GK="simplify",WK=["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","resolve","simplifyConstant","simplifyCore","?fraction","?bignumber","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],YK=Lr(GK,WK,T=>{var{config:N,typed:V,parse:Y,add:X,subtract:J,multiply:R,divide:F,pow:e,isZero:i,equal:m,resolve:t,simplifyConstant:y,simplifyCore:p,fraction:l,bignumber:d,mathWithTransform:r,matrix:n,AccessorNode:u,ArrayNode:a,ConstantNode:o,FunctionNode:c,IndexNode:s,ObjectNode:b,OperatorNode:g,ParenthesisNode:A,SymbolNode:v}=T,{hasProperty:h,isCommutative:x,isAssociative:C,mergeContext:D,flatten:L,unflattenr:w,unflattenl:M,createMakeNodeFunction:S,defaultContext:f,realContext:P,positiveContext:E}=_3({FunctionNode:c,OperatorNode:g,SymbolNode:v});V.addConversion({from:"Object",to:"Map",convert:Kp});var k=V("simplify",{Node:W,"Node, Map":(Q,ae)=>W(Q,!1,ae),"Node, Map, Object":(Q,ae,fe)=>W(Q,!1,ae,fe),"Node, Array":W,"Node, Array, Map":W,"Node, Array, Map, Object":W});V.removeConversion({from:"Object",to:"Map",convert:Kp}),k.defaultContext=f,k.realContext=P,k.positiveContext=E;function O(Q){return Q.transform(function(ae,fe,te){return Nh(ae)?O(ae.content):ae})}var G={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};k.rules=[p,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(cl*v) -> v * (-cl)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(cl*v) -> (-cl) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*cl) -> v * (-cl)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" vd * ( vd * n1 + n2)",r:"vd^2 * n1 + vd * n2"},{s:" vd * (vd^n4 * n1 + n2) -> vd^(1+n4) * n1 + vd * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * ( vd * n1 + n2) -> vd^(n3+1) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * (vd^n4 * n1 + n2) -> vd^(n3+n4) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},y,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"vd*n + vd",r:"vd*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 + n3 * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*vd + vd -> (n+1)*vd",assuming:{multiply:{commutative:!1}}},{s:"vd + n*vd -> (1+n)*vd",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n^n1 * n -> n^(n1+1)",assuming:{divide:{total:!0},multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*cd + cd",r:"(n+1)*cd"},{s:"cd*n + cd -> cd*(n+1)",assuming:{multiply:{commutative:!1}}},{s:"cd + cd*n -> cd*(1+n)",assuming:{multiply:{commutative:!1}}},y,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"ce+ve -> ve+ce",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"vd*cd -> cd*vd",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];function z(Q,ae){var fe={};if(Q.s){var te=Q.s.split("->");if(te.length===2)fe.l=te[0],fe.r=te[1];else throw SyntaxError("Could not parse rule: "+Q.s)}else fe.l=Q.l,fe.r=Q.r;fe.l=O(Y(fe.l)),fe.r=O(Y(fe.r));for(var ne of["imposeContext","repeat","assuming"])ne in Q&&(fe[ne]=Q[ne]);if(Q.evaluate&&(fe.evaluate=Y(Q.evaluate)),C(fe.l,ae)){var ce=!x(fe.l,ae),oe;ce&&(oe=B());var de=S(fe.l),we=B();fe.expanded={},fe.expanded.l=de([fe.l,we]),L(fe.expanded.l,ae),w(fe.expanded.l,ae),fe.expanded.r=de([fe.r,we]),ce&&(fe.expandedNC1={},fe.expandedNC1.l=de([oe,fe.l]),fe.expandedNC1.r=de([oe,fe.r]),fe.expandedNC2={},fe.expandedNC2.l=de([oe,fe.expanded.l]),fe.expandedNC2.r=de([oe,fe.expanded.r]))}return fe}function U(Q,ae){for(var fe=[],te=0;te2&&arguments[2]!==void 0?arguments[2]:l0(),te=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},ne=te.consoleDebug;ae=U(ae||k.rules,te.context);var ce=t(Q,fe);ce=O(ce);for(var oe={},de=ce.toString({parenthesis:"all"});!oe[de];){oe[de]=!0,H=0;var we=de;ne&&console.log("Working on: ",de);for(var Se=0;Se ").concat(ae[Se].r.toString()))),ne){var Fe=ce.toString({parenthesis:"all"});Fe!==we&&(console.log("Applying",Te,"produced",Fe),we=Fe)}M(ce,te.context)}de=ce.toString({parenthesis:"all"})}return ce}function q(Q,ae,fe){var te=Q;if(Q)for(var ne=0;ne1&&(we=ce(Q.args.slice(0,de))),ne=Q.args.slice(de),te=ne.length===1?ne[0]:ce(ne),fe.push(ce([we,te]))}return fe}function le(Q,ae){var fe={placeholders:{}};if(!Q.placeholders&&!ae.placeholders)return fe;if(Q.placeholders){if(!ae.placeholders)return Q}else return ae;for(var te in Q.placeholders)if(ka(Q.placeholders,te)&&(fe.placeholders[te]=Q.placeholders[te],ka(ae.placeholders,te)&&!K(Q.placeholders[te],ae.placeholders[te])))return null;for(var ne in ae.placeholders)ka(ae.placeholders,ne)&&(fe.placeholders[ne]=ae.placeholders[ne]);return fe}function he(Q,ae){var fe=[];if(Q.length===0||ae.length===0)return fe;for(var te,ne=0;ne2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var we=Z(Q.args[0],ae.args[1],fe);if(we.length===0)return[];var Se=Z(Q.args[1],ae.args[0],fe);if(Se.length===0)return[];ce=[we,Se]}ne=$(ce)}else if(ae.args.length>=2&&Q.args.length===2){for(var Te=ie(ae,fe),Fe=[],Ie=0;Ie2)throw Error("Unexpected non-binary associative function: "+Q.toString());return[]}}else if(Q instanceof v){if(Q.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if(G[Q.name]){if(Q.name!==ae.name)return[]}else switch(Q.name[1]>="a"&&Q.name[1]<="z"?Q.name.substring(0,2):Q.name[0]){case"n":case"_p":ne[0].placeholders[Q.name]=ae;break;case"c":case"cl":if(Bi(ae))ne[0].placeholders[Q.name]=ae;else return[];break;case"v":if(!Bi(ae))ne[0].placeholders[Q.name]=ae;else return[];break;case"vl":if(_s(ae))ne[0].placeholders[Q.name]=ae;else return[];break;case"cd":if(MS(ae))ne[0].placeholders[Q.name]=ae;else return[];break;case"vd":if(!MS(ae))ne[0].placeholders[Q.name]=ae;else return[];break;case"ce":if(g1(ae))ne[0].placeholders[Q.name]=ae;else return[];break;case"ve":if(!g1(ae))ne[0].placeholders[Q.name]=ae;else return[];break;default:throw new Error("Invalid symbol in rule: "+Q.name)}}else if(Q instanceof o){if(!m(Q.value,ae.value))return[]}else return[];return ne}function K(Q,ae){if(Q instanceof o&&ae instanceof o){if(!m(Q.value,ae.value))return!1}else if(Q instanceof v&&ae instanceof v){if(Q.name!==ae.name)return!1}else if(Q instanceof g&&ae instanceof g||Q instanceof c&&ae instanceof c){if(Q instanceof g){if(Q.op!==ae.op||Q.fn!==ae.fn)return!1}else if(Q instanceof c&&Q.name!==ae.name)return!1;if(Q.args.length!==ae.args.length)return!1;for(var fe=0;fe{var{typed:N,config:V,mathWithTransform:Y,matrix:X,fraction:J,bignumber:R,AccessorNode:F,ArrayNode:e,ConstantNode:i,FunctionNode:m,IndexNode:t,ObjectNode:y,OperatorNode:p,SymbolNode:l}=T,{isCommutative:d,isAssociative:r,allChildren:n,createMakeNodeFunction:u}=_3({FunctionNode:m,OperatorNode:p,SymbolNode:l}),a=N("simplifyConstant",{Node:L=>b(D(L,{})),"Node, Object":function(w,M){return b(D(w,M))}});function o(L){return $g(L)?L.valueOf():L instanceof Array?L.map(o):Qa(L)?X(o(L.valueOf())):L}function c(L,w,M){try{return Y[L].apply(null,w)}catch{return w=w.map(o),A(Y[L].apply(null,w),M)}}var s=N({Fraction:h,number:function(w){return w<0?v(new i(-w)):new i(w)},BigNumber:function(w){return w<0?v(new i(-w)):new i(w)},Complex:function(w){throw new Error("Cannot convert Complex number to Node")},string:function(w){return new i(w)},Matrix:function(w){return new e(w.valueOf().map(M=>s(M)))}});function b(L){return no(L)?L:s(L)}function g(L,w){var M=w&&w.exactFractions!==!1;if(M&&isFinite(L)&&J){var S=J(L),f=w&&typeof w.fractionsLimit=="number"?w.fractionsLimit:1/0;if(S.valueOf()===L&&S.n0;)if(Bi(S[0])&&typeof S[0].value!="string"){var f=A(S.shift().value,M);Qu(L)?L=L.items[f-1]:(L=L.valueOf()[f-1],L instanceof Array&&(L=X(L)))}else if(S.length>1&&Bi(S[1])&&typeof S[1].value!="string"){var P=A(S[1].value,M),E=[],k=Qu(L)?L.items:L.valueOf();for(var O of k)if(Qu(O))E.push(O.items[P-1]);else if(Qa(L))E.push(O[P-1]);else break;if(E.length===k.length)Qu(L)?L=new e(E):L=X(E),S.splice(1,1);else break}else break;return S.length===w.dimensions.length?new F(b(L),w):S.length>0?(w=new t(S),new F(b(L),w)):L}if(_1(L)&&w.dimensions.length===1&&Bi(w.dimensions[0])){var G=w.dimensions[0].value;return G in L.properties?L.properties[G]:new i}return new F(b(L),w)}function C(L,w,M,S){var f=w.shift(),P=w.reduce((E,k)=>{if(!no(k)){var O=E.pop();if(no(O))return[O,k];try{return E.push(c(L,[O,k],S)),E}catch{E.push(O)}}E.push(b(E.pop()));var G=E.length===1?E[0]:M(E);return[M([G,b(k)])]},[f]);return P.length===1?P[0]:M([P[0],s(P[1])])}function D(L,w){switch(L.type){case"SymbolNode":return L;case"ConstantNode":switch(typeof L.value){case"number":return A(L.value,w);case"string":return L.value;default:if(!isNaN(L.value))return A(L.value,w)}return L;case"FunctionNode":if(Y[L.name]&&Y[L.name].rawArgs)return L;{var M=["add","multiply"];if(M.indexOf(L.name)===-1){var S=L.args.map(re=>D(re,w));if(!S.some(no))try{return c(L.name,S,w)}catch{}if(L.name==="size"&&S.length===1&&Qu(S[0])){for(var f=[],P=S[0];Qu(P);)f.push(P.items.length),P=P.items[0];return X(f)}return new m(L.name,S.map(b))}}case"OperatorNode":{var E=L.fn.toString(),k,O,G=u(L);if(ds(L)&&L.isUnary())k=[D(L.args[0],w)],no(k[0])?O=G(k):O=c(E,k,w);else if(r(L,w.context))if(k=n(L,w.context),k=k.map(re=>D(re,w)),d(E,w.context)){for(var z=[],U=[],H=0;H1?(O=C(E,z,G,w),U.unshift(O),O=C(E,U,G,w)):O=C(E,k,G,w)}else O=C(E,k,G,w);else k=L.args.map(re=>D(re,w)),O=C(E,k,G,w);return O}case"ParenthesisNode":return D(L.content,w);case"AccessorNode":return x(D(L.object,w),D(L.index,w),w);case"ArrayNode":{var B=L.items.map(re=>D(re,w));return B.some(no)?new e(B.map(b)):X(B)}case"IndexNode":return new t(L.dimensions.map(re=>a(re,w)));case"ObjectNode":{var W={};for(var q in L.properties)W[q]=a(L.properties[q],w);return new y(W)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(L.type))}}return a}),ES="simplifyCore",$K=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],KK=Lr(ES,$K,T=>{var{typed:N,parse:V,equal:Y,isZero:X,add:J,subtract:R,multiply:F,divide:e,pow:i,AccessorNode:m,ArrayNode:t,ConstantNode:y,FunctionNode:p,IndexNode:l,ObjectNode:d,OperatorNode:r,ParenthesisNode:n,SymbolNode:u}=T,a=new y(0),o=new y(1),c=new y(!0),s=new y(!1);function b(h){return ds(h)&&["and","not","or"].includes(h.op)}var{hasProperty:g,isCommutative:A}=_3({FunctionNode:p,OperatorNode:r,SymbolNode:u});function v(h){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=x?x.context:void 0;if(g(h,"trivial",C)){if(_v(h)&&h.args.length===1)return v(h.args[0],x);var D=!1,L=0;if(h.forEach(U=>{++L,L===1&&(D=v(U,x))}),L===1)return D}var w=h;if(_v(w)){var M=hG(w.name);if(M){if(w.args.length>2&&g(w,"associative",C))for(;w.args.length>2;){var S=w.args.pop(),f=w.args.pop();w.args.push(new r(M,w.name,[S,f]))}w=new r(M,w.name,w.args)}else return new p(v(w.fn),w.args.map(U=>v(U,x)))}if(ds(w)&&w.isUnary()){var P=v(w.args[0],x);if(w.op==="~"&&ds(P)&&P.isUnary()&&P.op==="~"||w.op==="not"&&ds(P)&&P.isUnary()&&P.op==="not"&&b(P.args[0]))return P.args[0];var E=!0;if(w.op==="-"&&ds(P)&&(P.isBinary()&&P.fn==="subtract"&&(w=new r("-","subtract",[P.args[1],P.args[0]]),E=!1),P.isUnary()&&P.op==="-"))return P.args[0];if(E)return new r(w.op,w.fn,[P])}if(ds(w)&&w.isBinary()){var k=v(w.args[0],x),O=v(w.args[1],x);if(w.op==="+"){if(Bi(k)&&X(k.value))return O;if(Bi(O)&&X(O.value))return k;ds(O)&&O.isUnary()&&O.op==="-"&&(O=O.args[0],w=new r("-","subtract",[k,O]))}if(w.op==="-")return ds(O)&&O.isUnary()&&O.op==="-"?v(new r("+","add",[k,O.args[0]]),x):Bi(k)&&X(k.value)?v(new r("-","unaryMinus",[O])):Bi(O)&&X(O.value)?k:new r(w.op,w.fn,[k,O]);if(w.op==="*"){if(Bi(k)){if(X(k.value))return a;if(Y(k.value,1))return O}if(Bi(O)){if(X(O.value))return a;if(Y(O.value,1))return k;if(A(w,C))return new r(w.op,w.fn,[O,k],w.implicit)}return new r(w.op,w.fn,[k,O],w.implicit)}if(w.op==="/")return Bi(k)&&X(k.value)?a:Bi(O)&&Y(O.value,1)?k:new r(w.op,w.fn,[k,O]);if(w.op==="^"&&Bi(O)){if(X(O.value))return o;if(Y(O.value,1))return k}if(w.op==="and"){if(Bi(k))if(k.value){if(b(O))return O}else return s;if(Bi(O))if(O.value){if(b(k))return k}else return s}if(w.op==="or"){if(Bi(k)){if(k.value)return c;if(b(O))return O}if(Bi(O)){if(O.value)return c;if(b(k))return k}}return new r(w.op,w.fn,[k,O])}if(ds(w))return new r(w.op,w.fn,w.args.map(U=>v(U,x)));if(Qu(w))return new t(w.items.map(U=>v(U,x)));if(kd(w))return new m(v(w.object,x),v(w.index,x));if(p0(w))return new l(w.dimensions.map(U=>v(U,x)));if(_1(w)){var G={};for(var z in w.properties)G[z]=v(w.properties[z],x);return new d(G)}return w}return N(ES,{Node:v,"Node,Object":v})}),JK="resolve",QK=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],qK=Lr(JK,QK,T=>{var{typed:N,parse:V,ConstantNode:Y,FunctionNode:X,OperatorNode:J,ParenthesisNode:R}=T;function F(e,i){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!i)return e;if(_s(e)){if(m.has(e.name)){var t=Array.from(m).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(t,"}"))}var y=i.get(e.name);if(no(y)){var p=new Set(m);return p.add(e.name),F(y,i,p)}else return typeof y=="number"?V(String(y)):y!==void 0?new Y(y):e}else if(ds(e)){var l=e.args.map(function(r){return F(r,i,m)});return new J(e.op,e.fn,l,e.implicit)}else{if(Nh(e))return new R(F(e.content,i,m));if(_v(e)){var d=e.args.map(function(r){return F(r,i,m)});return new X(e.name,d)}}return e.map(r=>F(r,i,m))}return N("resolve",{Node:F,"Node, Map | null | undefined":F,"Node, Object":(e,i)=>F(e,Kp(i)),"Array | Matrix":N.referToSelf(e=>i=>i.map(m=>e(m))),"Array | Matrix, null | undefined":N.referToSelf(e=>i=>i.map(m=>e(m))),"Array, Object":N.referTo("Array,Map",e=>(i,m)=>e(i,Kp(m))),"Matrix, Object":N.referTo("Matrix,Map",e=>(i,m)=>e(i,Kp(m))),"Array | Matrix, Map":N.referToSelf(e=>(i,m)=>i.map(t=>e(t,m)))})}),CS="symbolicEqual",eJ=["parse","simplify","typed","OperatorNode"],tJ=Lr(CS,eJ,T=>{var{parse:N,simplify:V,typed:Y,OperatorNode:X}=T;function J(R,F){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=new X("-","subtract",[R,F]),m=V(i,{},e);return Bi(m)&&!m.value}return Y(CS,{"Node, Node":J,"Node, Node, Object":J})}),DS="derivative",rJ=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],nJ=Lr(DS,rJ,T=>{var{typed:N,config:V,parse:Y,simplify:X,equal:J,isZero:R,numeric:F,ConstantNode:e,FunctionNode:i,OperatorNode:m,ParenthesisNode:t,SymbolNode:y}=T;function p(o,c){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},b={};r(b,o,c.name);var g=n(o,b);return s.simplify?X(g):g}N.addConversion({from:"identifier",to:"SymbolNode",convert:Y});var l=N(DS,{"Node, SymbolNode":p,"Node, SymbolNode, Object":p});N.removeConversion({from:"identifier",to:"SymbolNode",convert:Y}),l._simplify=!0,l.toTex=function(o){return d.apply(null,o.args)};var d=N("_derivTex",{"Node, SymbolNode":function(c,s){return Bi(c)&&wo(c.value)==="string"?d(Y(c.value).toString(),s.toString(),1):d(c.toTex(),s.toString(),1)},"Node, ConstantNode":function(c,s){if(wo(s.value)==="string")return d(c,Y(s.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(c,s,b){return d(c.toString(),s.name,b.value)},"string, string, number":function(c,s,b){var g;return b===1?g="{d\\over d"+s+"}":g="{d^{"+b+"}\\over d"+s+"^{"+b+"}}",g+"\\left[".concat(c,"\\right]")}}),r=N("constTag",{"Object, ConstantNode, string":function(c,s){return c[s]=!0,!0},"Object, SymbolNode, string":function(c,s,b){return s.name!==b?(c[s]=!0,!0):!1},"Object, ParenthesisNode, string":function(c,s,b){return r(c,s.content,b)},"Object, FunctionAssignmentNode, string":function(c,s,b){return s.params.indexOf(b)===-1?(c[s]=!0,!0):r(c,s.expr,b)},"Object, FunctionNode | OperatorNode, string":function(c,s,b){if(s.args.length>0){for(var g=r(c,s.args[0],b),A=1;A0){var g=c.args.filter(function(w){return s[w]===void 0}),A=g.length===1?g[0]:new m("*","multiply",g),v=b.concat(n(A,s));return new m("*","multiply",v)}return new m("+","add",c.args.map(function(w){return new m("*","multiply",c.args.map(function(M){return M===w?n(M,s):M.clone()}))}))}if(c.op==="/"&&c.isBinary()){var h=c.args[0],x=c.args[1];return s[x]!==void 0?new m("/","divide",[n(h,s),x]):s[h]!==void 0?new m("*","multiply",[new m("-","unaryMinus",[h]),new m("/","divide",[n(x,s),new m("^","pow",[x.clone(),a(2)])])]):new m("/","divide",[new m("-","subtract",[new m("*","multiply",[n(h,s),x.clone()]),new m("*","multiply",[h.clone(),n(x,s)])]),new m("^","pow",[x.clone(),a(2)])])}if(c.op==="^"&&c.isBinary()){var C=c.args[0],D=c.args[1];if(s[C]!==void 0)return Bi(C)&&(R(C.value)||J(C.value,1))?a(0):new m("*","multiply",[c,new m("*","multiply",[new i("log",[C.clone()]),n(D.clone(),s)])]);if(s[D]!==void 0){if(Bi(D)){if(R(D.value))return a(0);if(J(D.value,1))return n(C,s)}var L=new m("^","pow",[C.clone(),new m("-","subtract",[D,a(1)])]);return new m("*","multiply",[D.clone(),new m("*","multiply",[n(C,s),L])])}return new m("*","multiply",[new m("^","pow",[C.clone(),D.clone()]),new m("+","add",[new m("*","multiply",[n(C,s),new m("/","divide",[D.clone(),C.clone()])]),new m("*","multiply",[n(D,s),new i("log",[C.clone()])])])])}throw new Error('Operator "'+c.op+'" is not supported by derivative, or a wrong number of arguments is passed')}});function u(o){if(!((o.name==="log"||o.name==="nthRoot"||o.name==="pow")&&o.args.length===2)){for(var c=0;c{var{config:N,typed:V,equal:Y,isZero:X,add:J,subtract:R,multiply:F,divide:e,pow:i,parse:m,simplifyConstant:t,simplifyCore:y,simplify:p,fraction:l,bignumber:d,mathWithTransform:r,matrix:n,AccessorNode:u,ArrayNode:a,ConstantNode:o,FunctionNode:c,IndexNode:s,ObjectNode:b,OperatorNode:g,SymbolNode:A,ParenthesisNode:v}=T;function h(w){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,f=C(),P=x(w,M,!0,f.firstRules),E=P.variables.length,k={exactFractions:!1},O={exactFractions:!0};if(w=P.expression,E>=1){w=D(w);var G,z,U=!0,H=!1;w=p(w,f.firstRules,{},k);for(var B;z=U?f.distrDivRules:f.sucDivRules,w=p(w,z,{},O),U=!U,B=w.toString(),B!==G;)H=!0,G=B;H&&(w=p(w,f.firstRulesAgain,{},k)),w=p(w,f.finalRules,{},k)}var W=[],q={};return w.type==="OperatorNode"&&w.isBinary()&&w.op==="/"?(E===1&&(w.args[0]=L(w.args[0],W),w.args[1]=L(w.args[1])),S&&(q.numerator=w.args[0],q.denominator=w.args[1])):(E===1&&(w=L(w,W)),S&&(q.numerator=w,q.denominator=null)),S?(q.coefficients=W,q.variables=P.variables,q.expression=w,q):w}return V(LS,{Node:h,"Node, boolean":(w,M)=>h(w,{},M),"Node, Object":h,"Node, Object, boolean":h});function x(w,M,S,f){var P=[],E=p(w,f,M,{exactFractions:!1});S=!!S;var k="+-*"+(S?"/":"");G(E);var O={};return O.expression=E,O.variables=P,O;function G(z){var U=z.type;if(U==="FunctionNode")throw new Error("There is an unsolved function call");if(U==="OperatorNode")if(z.op==="^"){if(z.args[1].type!=="ConstantNode"||!Ya(parseFloat(z.args[1].value)))throw new Error("There is a non-integer exponent");G(z.args[0])}else{if(k.indexOf(z.op)===-1)throw new Error("Operator "+z.op+" invalid in polynomial expression");for(var H=0;H1;if(f==="OperatorNode"&&w.isBinary()){var E=!1,k;if(w.op==="^"&&(w.args[0].type==="ParenthesisNode"||w.args[0].type==="OperatorNode")&&w.args[1].type==="ConstantNode"&&(k=parseFloat(w.args[1].value),E=k>=2&&Ya(k)),E){if(k>2){var O=w.args[0],G=new g("^","pow",[w.args[0].cloneDeep(),new o(k-1)]);w=new g("*","multiply",[O,G])}else w=new g("*","multiply",[w.args[0],w.args[0].cloneDeep()]);P&&(S==="content"?M.content=w:M.args[S]=w)}}if(f==="ParenthesisNode")D(w.content,w,"content");else if(f!=="ConstantNode"&&f!=="SymbolNode")for(var z=0;z=0;O--)if(M[O]!==0){var G=new o(E?M[O]:Math.abs(M[O])),z=M[O]<0?"-":"+";if(O>0){var U=new A(P);if(O>1){var H=new o(O);U=new g("^","pow",[U,H])}M[O]===-1&&E?G=new g("-","unaryMinus",[U]):Math.abs(M[O])===1?G=U:G=new g("*","multiply",[G,U])}E?k=G:z==="+"?k=new g("+","add",[k,G]):k=new g("-","subtract",[k,G]),E=!1}if(E)return new o(0);return k;function B(W,q,re){var ie=W.type;if(ie==="FunctionNode")throw new Error("There is an unsolved function call");if(ie==="OperatorNode"){if("+-*^".indexOf(W.op)===-1)throw new Error("Operator "+W.op+" invalid");if(q!==null){if((W.fn==="unaryMinus"||W.fn==="pow")&&q.fn!=="add"&&q.fn!=="subtract"&&q.fn!=="multiply")throw new Error("Invalid "+W.op+" placing");if((W.fn==="subtract"||W.fn==="add"||W.fn==="multiply")&&q.fn!=="add"&&q.fn!=="subtract")throw new Error("Invalid "+W.op+" placing");if((W.fn==="subtract"||W.fn==="add"||W.fn==="unaryMinus")&&re.noFil!==0)throw new Error("Invalid "+W.op+" placing")}(W.op==="^"||W.op==="*")&&(re.fire=W.op);for(var le=0;lef&&(M[he]=0),M[he]+=re.cte*(re.oper==="+"?1:-1),f=Math.max(he,f);return}re.cte=he,re.fire===""&&(M[0]+=re.cte*(re.oper==="+"?1:-1))}else throw new Error("Type "+ie+" is not allowed")}}}),oJ="reviver",sJ=["classes"],lJ=Lr(oJ,sJ,T=>{var{classes:N}=T;return function(Y,X){var J=N[X&&X.mathjs];return J&&typeof J.fromJSON=="function"?J.fromJSON(X):X}}),uJ="replacer",fJ=[],cJ=Lr(uJ,fJ,()=>function(N,V){return typeof V=="number"&&(!isFinite(V)||isNaN(V))?{mathjs:"number",value:String(V)}:V}),hJ="11.8.0",vJ=Lr("true",[],()=>!0),dJ=Lr("false",[],()=>!1),pJ=Lr("null",[],()=>null),gJ=Nu("Infinity",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(1/0):1/0}),mJ=Nu("NaN",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(NaN):NaN}),yJ=Nu("pi",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?F3(V):$I}),xJ=Nu("tau",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?gH(V):KI}),bJ=Nu("e",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?dH(V):JI}),wJ=Nu("phi",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?pH(V):QI}),AJ=Nu("LN2",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(2).ln():Math.LN2}),TJ=Nu("LN10",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(10).ln():Math.LN10}),MJ=Nu("LOG2E",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(1).div(new V(2).ln()):Math.LOG2E}),SJ=Nu("LOG10E",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(1).div(new V(10).ln()):Math.LOG10E}),EJ=Nu("SQRT1_2",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V("0.5").sqrt():Math.SQRT1_2}),CJ=Nu("SQRT2",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(2).sqrt():Math.SQRT2}),DJ=Nu("i",["Complex"],T=>{var{Complex:N}=T;return N.I}),LJ=Lr("version",[],()=>hJ);function Nu(T,N,V){return Lr(T,N,V,{recreateOnConfigChange:!0})}var PJ=oi("speedOfLight","299792458","m s^-1"),NJ=oi("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),RJ=oi("planckConstant","6.62607015e-34","J s"),FJ=oi("reducedPlanckConstant","1.0545718176461565e-34","J s"),IJ=oi("magneticConstant","1.25663706212e-6","N A^-2"),_J=oi("electricConstant","8.8541878128e-12","F m^-1"),OJ=oi("vacuumImpedance","376.730313667","ohm"),zJ=oi("coulomb","8.987551792261171e9","N m^2 C^-2"),kJ=oi("elementaryCharge","1.602176634e-19","C"),BJ=oi("bohrMagneton","9.2740100783e-24","J T^-1"),UJ=oi("conductanceQuantum","7.748091729863649e-5","S"),HJ=oi("inverseConductanceQuantum","12906.403729652257","ohm"),VJ=oi("magneticFluxQuantum","2.0678338484619295e-15","Wb"),GJ=oi("nuclearMagneton","5.0507837461e-27","J T^-1"),WJ=oi("klitzing","25812.807459304513","ohm"),YJ=oi("bohrRadius","5.29177210903e-11","m"),ZJ=oi("classicalElectronRadius","2.8179403262e-15","m"),XJ=oi("electronMass","9.1093837015e-31","kg"),jJ=oi("fermiCoupling","1.1663787e-5","GeV^-2"),$J=X1("fineStructure",.0072973525693),KJ=oi("hartreeEnergy","4.3597447222071e-18","J"),JJ=oi("protonMass","1.67262192369e-27","kg"),QJ=oi("deuteronMass","3.3435830926e-27","kg"),qJ=oi("neutronMass","1.6749271613e-27","kg"),eQ=oi("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),tQ=oi("rydberg","10973731.568160","m^-1"),rQ=oi("thomsonCrossSection","6.6524587321e-29","m^2"),nQ=X1("weakMixingAngle",.2229),aQ=X1("efimovFactor",22.7),iQ=oi("atomicMass","1.66053906660e-27","kg"),oQ=oi("avogadro","6.02214076e23","mol^-1"),sQ=oi("boltzmann","1.380649e-23","J K^-1"),lQ=oi("faraday","96485.33212331001","C mol^-1"),uQ=oi("firstRadiation","3.7417718521927573e-16","W m^2"),fQ=oi("loschmidt","2.686780111798444e25","m^-3"),cQ=oi("gasConstant","8.31446261815324","J K^-1 mol^-1"),hQ=oi("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),vQ=oi("molarVolume","0.022413969545014137","m^3 mol^-1"),dQ=X1("sackurTetrode",-1.16487052358),pQ=oi("secondRadiation","0.014387768775039337","m K"),gQ=oi("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),mQ=oi("wienDisplacement","2.897771955e-3","m K"),yQ=oi("molarMass","0.99999999965e-3","kg mol^-1"),xQ=oi("molarMassC12","11.9999999958e-3","kg mol^-1"),bQ=oi("gravity","9.80665","m s^-2"),wQ=oi("planckLength","1.616255e-35","m"),AQ=oi("planckMass","2.176435e-8","kg"),TQ=oi("planckTime","5.391245e-44","s"),MQ=oi("planckCharge","1.87554603778e-18","C"),SQ=oi("planckTemperature","1.416785e+32","K");function oi(T,N,V){var Y=["config","Unit","BigNumber"];return Lr(T,Y,X=>{var{config:J,Unit:R,BigNumber:F}=X,e=J.number==="BigNumber"?new F(N):parseFloat(N),i=new R(e,V);return i.fixPrefix=!0,i})}function X1(T,N){var V=["config","BigNumber"];return Lr(T,V,Y=>{var{config:X,BigNumber:J}=Y;return X.number==="BigNumber"?new J(N):N})}var EQ="apply",CQ=["typed","isInteger"],DQ=Lr(EQ,CQ,T=>{var{typed:N,isInteger:V}=T,Y=CC({typed:N,isInteger:V});return N("apply",{"...any":function(J){var R=J[1];Ni(R)?J[1]=R-1:Ei(R)&&(J[1]=R.minus(1));try{return Y.apply(null,J)}catch(F){throw Gl(F)}}})},{isTransformFunction:!0}),LQ="column",PQ=["typed","Index","matrix","range"],NQ=Lr(LQ,PQ,T=>{var{typed:N,Index:V,matrix:Y,range:X}=T,J=NC({typed:N,Index:V,matrix:Y,range:X});return N("column",{"...any":function(F){var e=F.length-1,i=F[e];Ni(i)&&(F[e]=i-1);try{return J.apply(null,F)}catch(m){throw Gl(m)}}})},{isTransformFunction:!0});function O3(T,N,V){var Y=T.filter(function(F){return _s(F)&&!(F.name in N)&&!V.has(F.name)})[0];if(!Y)throw new Error('No undefined variable found in inline expression "'+T+'"');var X=Y.name,J=hg(V),R=T.compile();return function(e){return J.set(X,e),R.evaluate(J)}}var RQ="filter",FQ=["typed"],IQ=Lr(RQ,FQ,T=>{var{typed:N}=T;function V(X,J,R){var F,e;return X[0]&&(F=X[0].compile().evaluate(R)),X[1]&&(_s(X[1])||Kg(X[1])?e=X[1].compile().evaluate(R):e=O3(X[1],J,R)),Y(F,e)}V.rawArgs=!0;var Y=N("filter",{"Array, function":PS,"Matrix, function":function(J,R){return J.create(PS(J.toArray(),R))},"Array, RegExp":qy,"Matrix, RegExp":function(J,R){return J.create(qy(J.toArray(),R))}});return V},{isTransformFunction:!0});function PS(T,N){var V=Vv(N);return d8(T,function(Y,X,J){return V===1?N(Y):V===2?N(Y,[X+1]):N(Y,[X+1],J)})}var _Q="forEach",OQ=["typed"],zQ=Lr(_Q,OQ,T=>{var{typed:N}=T;function V(X,J,R){var F,e;return X[0]&&(F=X[0].compile().evaluate(R)),X[1]&&(_s(X[1])||Kg(X[1])?e=X[1].compile().evaluate(R):e=O3(X[1],J,R)),Y(F,e)}V.rawArgs=!0;var Y=N("forEach",{"Array | Matrix, function":function(J,R){var F=Vv(R),e=function i(m,t){Array.isArray(m)?k1(m,function(y,p){i(y,t.concat(p+1))}):F===1?R(m):F===2?R(m,t):R(m,t,J)};e(J.valueOf(),[])}});return V},{isTransformFunction:!0}),kQ="index",BQ=["Index"],UQ=Lr(kQ,BQ,T=>{var{Index:N}=T;return function(){for(var Y=[],X=0,J=arguments.length;X0?0:2;else if(R&&R.isSet===!0)R=R.map(function(e){return e-1});else if(ro(R)||Qa(R))R=R.map(function(e){return e-1});else if(Ni(R))R--;else if(Ei(R))R=R.toNumber()-1;else if(typeof R!="string")throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");Y[X]=R}var F=new N;return N.apply(F,Y),F}},{isTransformFunction:!0}),HQ="map",VQ=["typed"],GQ=Lr(HQ,VQ,T=>{var{typed:N}=T;function V(X,J,R){var F,e;return X[0]&&(F=X[0].compile().evaluate(R)),X[1]&&(_s(X[1])||Kg(X[1])?e=X[1].compile().evaluate(R):e=O3(X[1],J,R)),Y(F,e)}V.rawArgs=!0;var Y=N("map",{"Array, function":function(J,R){return NS(J,R,J)},"Matrix, function":function(J,R){return J.create(NS(J.valueOf(),R,J))}});return V},{isTransformFunction:!0});function NS(T,N,V){var Y=Vv(N);function X(J,R){return Array.isArray(J)?Eh(J,function(F,e){return X(F,R.concat(e+1))}):Y===1?N(J):Y===2?N(J,R):N(J,R,V)}return X(T,[])}function Zd(T){if(T.length===2&&Lc(T[0])){T=T.slice();var N=T[1];Ni(N)?T[1]=N-1:Ei(N)&&(T[1]=N.minus(1))}return T}var WQ="max",YQ=["typed","config","numeric","larger"],ZQ=Lr(WQ,YQ,T=>{var{typed:N,config:V,numeric:Y,larger:X}=T,J=kC({typed:N,config:V,numeric:Y,larger:X});return N("max",{"...any":function(F){F=Zd(F);try{return J.apply(null,F)}catch(e){throw Gl(e)}}})},{isTransformFunction:!0}),XQ="mean",jQ=["typed","add","divide"],$Q=Lr(XQ,jQ,T=>{var{typed:N,add:V,divide:Y}=T,X=XC({typed:N,add:V,divide:Y});return N("mean",{"...any":function(R){R=Zd(R);try{return X.apply(null,R)}catch(F){throw Gl(F)}}})},{isTransformFunction:!0}),KQ="min",JQ=["typed","config","numeric","smaller"],QQ=Lr(KQ,JQ,T=>{var{typed:N,config:V,numeric:Y,smaller:X}=T,J=BC({typed:N,config:V,numeric:Y,smaller:X});return N("min",{"...any":function(F){F=Zd(F);try{return J.apply(null,F)}catch(e){throw Gl(e)}}})},{isTransformFunction:!0}),qQ="range",eq=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq"],tq=Lr(qQ,eq,T=>{var{typed:N,config:V,matrix:Y,bignumber:X,smaller:J,smallerEq:R,larger:F,largerEq:e}=T,i=_C({typed:N,config:V,matrix:Y,bignumber:X,smaller:J,smallerEq:R,larger:F,largerEq:e});return N("range",{"...any":function(t){var y=t.length-1,p=t[y];return typeof p!="boolean"&&t.push(!0),i.apply(null,t)}})},{isTransformFunction:!0}),rq="row",nq=["typed","Index","matrix","range"],aq=Lr(rq,nq,T=>{var{typed:N,Index:V,matrix:Y,range:X}=T,J=OC({typed:N,Index:V,matrix:Y,range:X});return N("row",{"...any":function(F){var e=F.length-1,i=F[e];Ni(i)&&(F[e]=i-1);try{return J.apply(null,F)}catch(m){throw Gl(m)}}})},{isTransformFunction:!0}),iq="subset",oq=["typed","matrix"],sq=Lr(iq,oq,T=>{var{typed:N,matrix:V}=T,Y=zC({typed:N,matrix:V});return N("subset",{"...any":function(J){try{return Y.apply(null,J)}catch(R){throw Gl(R)}}})},{isTransformFunction:!0}),lq="concat",uq=["typed","matrix","isInteger"],fq=Lr(lq,uq,T=>{var{typed:N,matrix:V,isInteger:Y}=T,X=LC({typed:N,matrix:V,isInteger:Y});return N("concat",{"...any":function(R){var F=R.length-1,e=R[F];Ni(e)?R[F]=e-1:Ei(e)&&(R[F]=e.minus(1));try{return X.apply(null,R)}catch(i){throw Gl(i)}}})},{isTransformFunction:!0}),RS="diff",cq=["typed","matrix","subtract","number","bignumber"],hq=Lr(RS,cq,T=>{var{typed:N,matrix:V,subtract:Y,number:X,bignumber:J}=T,R=RC({typed:N,matrix:V,subtract:Y,number:X,bignumber:J});return N(RS,{"...any":function(e){e=Zd(e);try{return R.apply(null,e)}catch(i){throw Gl(i)}}})},{isTransformFunction:!0}),vq="std",dq=["typed","map","sqrt","variance"],pq=Lr(vq,dq,T=>{var{typed:N,map:V,sqrt:Y,variance:X}=T,J=$C({typed:N,map:V,sqrt:Y,variance:X});return N("std",{"...any":function(F){F=Zd(F);try{return J.apply(null,F)}catch(e){throw Gl(e)}}})},{isTransformFunction:!0}),FS="sum",gq=["typed","config","add","numeric"],mq=Lr(FS,gq,T=>{var{typed:N,config:V,add:Y,numeric:X}=T,J=YC({typed:N,config:V,add:Y,numeric:X});return N(FS,{"...any":function(F){F=Zd(F);try{return J.apply(null,F)}catch(e){throw Gl(e)}}})},{isTransformFunction:!0}),IS="cumsum",yq=["typed","add","unaryPlus"],xq=Lr(IS,yq,T=>{var{typed:N,add:V,unaryPlus:Y}=T,X=ZC({typed:N,add:V,unaryPlus:Y});return N(IS,{"...any":function(R){if(R.length===2&&Lc(R[0])){var F=R[1];Ni(F)?R[1]=F-1:Ei(F)&&(R[1]=F.minus(1))}try{return X.apply(null,R)}catch(e){throw Gl(e)}}})},{isTransformFunction:!0}),_S="variance",bq=["typed","add","subtract","multiply","divide","apply","isNaN"],wq=Lr(_S,bq,T=>{var{typed:N,add:V,subtract:Y,multiply:X,divide:J,apply:R,isNaN:F}=T,e=jC({typed:N,add:V,subtract:Y,multiply:X,divide:J,apply:R,isNaN:F});return N(_S,{"...any":function(m){m=Zd(m);try{return e.apply(null,m)}catch(t){throw Gl(t)}}})},{isTransformFunction:!0}),ma=EI({config:jn}),To=LI({}),OS=bJ({BigNumber:ma,config:jn}),Aq=dJ({}),Tq=$J({BigNumber:ma,config:jn}),Xd=RI({}),aD=DJ({Complex:To}),Mq=gJ({BigNumber:ma,config:jn}),Sq=TJ({BigNumber:ma,config:jn}),Eq=SJ({BigNumber:ma,config:jn}),j1=kI({}),Cq=mJ({BigNumber:ma,config:jn}),Dq=pJ({}),Lq=wJ({BigNumber:ma,config:jn}),Pq=_I({}),iD=PF({}),Nq=EJ({BigNumber:ma,config:jn}),Rq=dQ({BigNumber:ma,config:jn}),oD=xJ({BigNumber:ma,config:jn}),Fq=vJ({}),Iq=LJ({}),di=VI({Matrix:j1}),_q=aQ({BigNumber:ma,config:jn}),Oq=AJ({BigNumber:ma,config:jn}),zS=yJ({BigNumber:ma,config:jn}),zq=cJ({}),kq=CJ({BigNumber:ma,config:jn}),$r=EF({BigNumber:ma,Complex:To,DenseMatrix:di,Fraction:Xd}),z3=q_({BigNumber:ma,config:jn,typed:$r}),Bq=nQ({BigNumber:ma,config:jn}),uu=tO({typed:$r}),Uq=CH({Complex:To,config:jn,typed:$r}),Hq=NH({BigNumber:ma,typed:$r}),Vq=_H({BigNumber:ma,Complex:To,config:jn,typed:$r}),gs=iO({typed:$r}),Gq=jz({typed:$r}),Wq=HH({BigNumber:ma,Complex:To,config:jn,typed:$r}),Yq=ZH({typed:$r}),sD=$H({typed:$r}),Zq=qH({Complex:To,config:jn,typed:$r}),Rc=F_({BigNumber:ma,typed:$r}),Xq=Uz({typed:$r}),jq=P_({typed:$r}),$q=WI({typed:$r}),$1=eK({typed:$r}),K1=O_({Complex:To,typed:$r}),jd=Kz({typed:$r}),Kq=nV({typed:$r}),Jq=sV({BigNumber:ma,typed:$r}),Qq=uV({BigNumber:ma,typed:$r}),qq=yO({typed:$r}),Ri=y_({config:jn,typed:$r}),eee=vB({typed:$r}),lD=bO({typed:$r}),tee=AO({Complex:To,typed:$r}),ree=mk({typed:$r}),nee=wk({typed:$r}),qg=AB({typed:$r}),aee=Mk({typed:$r}),iee=DB({format:qg,typed:$r}),k3=Qz({typed:$r}),uf=ZI({typed:$r}),b0=n_({typed:$r}),J1=u_({typed:$r}),qf=c_({typed:$r}),oee=MJ({BigNumber:ma,config:jn}),see=oK({Complex:To,typed:$r}),lee=qO({Complex:To,config:jn,typed:$r}),uD=tz({Complex:To,config:jn,typed:$r}),w0=Pk({typed:$r}),qo=fz({typed:$r}),fD=rk({typed:$r}),Wv=E_({typed:$r}),uee=EB({format:qg,typed:$r}),fee=EK({config:jn,typed:$r}),cee=PB({typed:$r}),hee=DK({config:jn,typed:$r}),B3=ek({typed:$r}),vee=vV({BigNumber:ma,typed:$r}),cD=gz({BigNumber:ma,Fraction:Xd,complex:K1,typed:$r}),U3=mV({typed:$r}),Ih=w_({Matrix:j1,equalScalar:Ri,typed:$r}),dee=$_({typed:$r}),pee=wz({typed:$r}),gee=D_({typed:$r}),mee=wV({typed:$r}),hD=p_({typed:$r}),yee=LH({Complex:To,config:jn,typed:$r}),xee=zH({BigNumber:ma,typed:$r}),H3=CC({isInteger:uf,typed:$r}),bee=BH({BigNumber:ma,Complex:To,config:jn,typed:$r}),wee=MB({format:qg,typed:$r}),Aee=rK({typed:$r}),V3=tV({typed:$r}),Tee=cV({BigNumber:ma,typed:$r}),em=v_({typed:$r}),Mee=IB({typed:$r}),See=PK({config:jn,typed:$r}),Eee=pV({BigNumber:ma,typed:$r}),Cee=xV({typed:$r}),Dee=TH({SparseMatrix:Ih,typed:$r}),Ic=xz({Complex:To,config:jn,typed:$r}),Lee=MV({typed:$r}),_c=J_({typed:$r}),Pee=FH({BigNumber:ma,Complex:To,config:jn,typed:$r}),Nee=iV({BigNumber:ma,typed:$r}),A0=B_({Fraction:Xd,typed:$r}),$d=i_({typed:$r}),ba=H_({DenseMatrix:di,Matrix:j1,SparseMatrix:Ih,typed:$r}),Ree=G_({isZero:qf,matrix:ba,typed:$r}),Fee=yB({isNaN:em,isNumeric:$d,typed:$r}),Xf=zB({bignumber:Rc,fraction:A0,number:Wv}),vD=bB({config:jn,multiplyScalar:qo,numeric:Xf,typed:$r}),Iee=kk({isInteger:uf,matrix:ba,typed:$r}),wl=jk({matrix:ba,config:jn,typed:$r}),_ee=Kk({matrix:ba,typed:$r}),Ru=zC({matrix:ba,typed:$r}),tm=rB({matrix:ba,typed:$r}),dD=Sz({BigNumber:ma,config:jn,matrix:ba,typed:$r}),Oc=oB({BigNumber:ma,config:jn,matrix:ba,typed:$r}),Oee=GH({Complex:To,config:jn,typed:$r}),pD=sO({BigNumber:ma,Complex:To,Fraction:Xd,config:jn,isNegative:b0,matrix:ba,typed:$r,unaryMinus:_c}),Ki=LC({isInteger:uf,matrix:ba,typed:$r}),zee=fk({prod:vD,size:wl,typed:$r}),G3=aB({conj:jd,transpose:tm,typed:$r}),gD=dk({DenseMatrix:di,SparseMatrix:Ih,matrix:ba,typed:$r}),_o=BB({numeric:Xf,typed:$r}),rm=qB({DenseMatrix:di,concat:Ki,divideScalar:_o,equalScalar:Ri,matrix:ba,typed:$r}),ec=CU({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),nm=xk({matrix:ba,typed:$r}),kee=YO({BigNumber:ma,DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),Bee=s_({isNumeric:$d,typed:$r}),Yv=Ek({BigNumber:ma,DenseMatrix:di,SparseMatrix:Ih,config:jn,matrix:ba,typed:$r}),Uee=Dk({matrix:ba,multiplyScalar:qo,typed:$r}),Q1=HU({DenseMatrix:di,concat:Ki,config:jn,matrix:ba,typed:$r}),Hee=cU({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r,zeros:Oc}),W3=X_({flatten:nm,matrix:ba,size:wl,typed:$r}),mD=sz({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),Vee=dz({BigNumber:ma,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),Gee=_k({BigNumber:ma,config:jn,matrix:ba,typed:$r}),Wee=Hk({config:jn,matrix:ba}),Yee=vU({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r,zeros:Oc}),q1=GB({BigNumber:ma,DenseMatrix:di,equalScalar:Ri,matrix:ba,typed:$r,zeros:Oc}),ff=RU({DenseMatrix:di,concat:Ki,config:jn,matrix:ba,typed:$r}),Zee=RB({concat:Ki,matrix:ba,typed:$r}),Xee=ZU({DenseMatrix:di,concat:Ki,config:jn,equalScalar:Ri,matrix:ba,typed:$r}),jee=ok({DenseMatrix:di,concat:Ki,matrix:ba,typed:$r}),Ao=ZV({DenseMatrix:di,SparseMatrix:Ih,addScalar:gs,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),$ee=kz({concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),Kee=Zz({DenseMatrix:di,concat:Ki,matrix:ba,typed:$r}),Jee=OK({addScalar:gs,combinations:$1,divideScalar:_o,isInteger:uf,isNegative:b0,multiplyScalar:qo,typed:$r}),T0=xU({BigNumber:ma,DenseMatrix:di,Fraction:Xd,concat:Ki,config:jn,equalScalar:Ri,matrix:ba,typed:$r}),yD=SU({concat:Ki,matrix:ba,typed:$r}),Qee=ZC({add:Ao,typed:$r,unaryPlus:z3}),xD=WU({equal:ec,typed:$r}),ex=QV({addScalar:gs,conj:jd,multiplyScalar:qo,size:wl,typed:$r}),qee=PU({compareText:yD,isZero:qf,typed:$r}),bD=DO({DenseMatrix:di,config:jn,equalScalar:Ri,matrix:ba,round:q1,typed:$r,zeros:Oc}),ete=jV({abs:uu,addScalar:gs,divideScalar:_o,isPositive:J1,multiplyScalar:qo,smaller:ff,sqrt:Ic,typed:$r}),wD=rH({DenseMatrix:di,smaller:ff}),ml=iH({ImmutableDenseMatrix:wD}),tte=Cz({BigNumber:ma,add:Ao,config:jn,equal:ec,isInteger:uf,mod:mD,smaller:ff,typed:$r,xgcd:dD}),cf=kU({DenseMatrix:di,concat:Ki,config:jn,matrix:ba,typed:$r}),Y3=YB({Complex:To,config:jn,divideScalar:_o,typed:$r}),rte=Y_({flatten:nm,matrix:ba,size:wl,typed:$r}),nte=BC({config:jn,numeric:Xf,smaller:ff,typed:$r}),Mo=hz({addScalar:gs,dot:ex,equalScalar:Ri,matrix:ba,multiplyScalar:qo,typed:$r}),ate=$B({Complex:To,config:jn,divideScalar:_o,typed:$r}),ite=ak({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),Z3=$U({compare:T0,isNaN:em,isNumeric:$d,typed:$r}),ote=J$({add:Ao,compare:T0,multiply:Mo,partitionSelect:Z3,typed:$r}),ste=pU({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r,zeros:Oc}),X3=_U({DenseMatrix:di,concat:Ki,config:jn,matrix:ba,typed:$r}),go=Tz({DenseMatrix:di,addScalar:gs,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r,unaryMinus:_c}),lte=tG({add:Ao,matrix:ba,typed:$r}),j3=nU({DenseMatrix:di,divideScalar:_o,equalScalar:Ri,matrix:ba,multiplyScalar:qo,subtract:go,typed:$r}),ute=mU({concat:Ki,equalScalar:Ri,matrix:ba,not:fD,typed:$r,zeros:Oc}),fte=Vz({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),$3=gO({DenseMatrix:di,config:jn,equalScalar:Ri,matrix:ba,round:q1,typed:$r,zeros:Oc}),zc=AU({compare:T0,typed:$r}),cte=kK({addScalar:gs,combinations:$1,isInteger:uf,isNegative:b0,isPositive:J1,larger:cf,typed:$r}),hte=hk({matrix:ba,multiply:Mo,subtract:go,typed:$r}),AD=v$({divideScalar:_o,isZero:qf,matrix:ba,multiply:Mo,subtract:go,typed:$r,unaryMinus:_c}),vte=RC({matrix:ba,number:Wv,subtract:go,typed:$r}),dte=z$({abs:uu,addScalar:gs,divideScalar:_o,multiplyScalar:qo,sqrt:Ic,subtract:go,typed:$r,unaryMinus:_c}),pte=Nz({concat:Ki,equalScalar:Ri,matrix:ba,multiplyScalar:qo,typed:$r}),TD=lH({larger:cf,smaller:ff}),MD=SO({Complex:To,DenseMatrix:di,ceil:$3,equalScalar:Ri,floor:bD,matrix:ba,typed:$r,zeros:Oc}),SD=nG({Index:ml,typed:$r}),gte=U$({abs:uu,add:Ao,addScalar:gs,config:jn,divideScalar:_o,equalScalar:Ri,flatten:nm,isNumeric:$d,isZero:qf,matrix:ba,multiply:Mo,multiplyScalar:qo,smaller:ff,subtract:go,typed:$r}),mte=JO({concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),yte=XB({Complex:To,config:jn,divideScalar:_o,log:Y3,typed:$r}),ED=tU({DenseMatrix:di,divideScalar:_o,equalScalar:Ri,matrix:ba,multiplyScalar:qo,subtract:go,typed:$r}),CD=kC({config:jn,larger:cf,numeric:Xf,typed:$r}),K3=oW({addScalar:gs,complex:K1,conj:jd,divideScalar:_o,equal:ec,identity:Yv,isZero:qf,matrix:ba,multiplyScalar:qo,sign:cD,sqrt:Ic,subtract:go,typed:$r,unaryMinus:_c,zeros:Oc}),c0=_C({bignumber:Rc,matrix:ba,config:jn,larger:cf,largerEq:Q1,smaller:ff,smallerEq:X3,typed:$r}),xte=OC({Index:ml,matrix:ba,range:c0,typed:$r}),bte=EV({DenseMatrix:di,Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),wte=PV({DenseMatrix:di,Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),Ate=IV({Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),Tte=kV({Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),DD=PW({SparseMatrix:Ih,abs:uu,add:Ao,divideScalar:_o,larger:cf,largerEq:Q1,multiply:Mo,subtract:go,transpose:tm,typed:$r}),LD=cH({FibonacciHeap:TD,addScalar:gs,equalScalar:Ri}),PD=YC({add:Ao,config:jn,numeric:Xf,typed:$r}),ND=sU({DenseMatrix:di,divideScalar:_o,equalScalar:Ri,matrix:ba,multiplyScalar:qo,subtract:go,typed:$r}),Mte=JH({BigNumber:ma,DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),RD=NC({Index:ml,matrix:ba,range:c0,typed:$r}),Ste=iU({DenseMatrix:di,divideScalar:_o,equalScalar:Ri,matrix:ba,multiplyScalar:qo,subtract:go,typed:$r}),FD=DV({DenseMatrix:di,Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),Ete=OV({Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),ID=VV({Index:ml,concat:Ki,setDifference:FD,size:wl,subset:Ru,typed:$r}),Cte=JU({compare:T0,compareNatural:zc,matrix:ba,typed:$r}),Kd=p$({abs:uu,addScalar:gs,det:AD,divideScalar:_o,identity:Yv,matrix:ba,multiply:Mo,typed:$r,unaryMinus:_c}),_D=aW({DenseMatrix:di,Spa:LD,SparseMatrix:Ih,abs:uu,addScalar:gs,divideScalar:_o,equalScalar:Ri,larger:cf,matrix:ba,multiplyScalar:qo,subtract:go,typed:$r,unaryMinus:_c}),Dte=m$({Complex:To,add:Ao,ctranspose:G3,deepEqual:xD,divideScalar:_o,dot:ex,dotDivide:rm,equal:ec,inv:Kd,matrix:ba,multiply:Mo,typed:$r}),kc=HB({Complex:To,config:jn,fraction:A0,identity:Yv,inv:Kd,matrix:ba,multiply:Mo,number:Wv,typed:$r}),OD=RV({DenseMatrix:di,Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),Lte=WV({Index:ml,concat:Ki,setIntersect:OD,setSymDifference:ID,size:wl,subset:Ru,typed:$r}),Pte=E$({abs:uu,add:Ao,identity:Yv,inv:Kd,map:w0,max:CD,multiply:Mo,size:wl,sqrt:Ic,subtract:go,typed:$r}),ti=xH({BigNumber:ma,Complex:To,Fraction:Xd,abs:uu,addScalar:gs,config:jn,divideScalar:_o,equal:ec,fix:MD,format:qg,isNumeric:$d,multiplyScalar:qo,number:Wv,pow:kc,round:q1,subtract:go}),Nte=OJ({BigNumber:ma,Unit:ti,config:jn}),Rte=mQ({BigNumber:ma,Unit:ti,config:jn}),Fte=iQ({BigNumber:ma,Unit:ti,config:jn}),Ite=BJ({BigNumber:ma,Unit:ti,config:jn}),_te=sQ({BigNumber:ma,Unit:ti,config:jn}),Ote=UJ({BigNumber:ma,Unit:ti,config:jn}),zte=SH({Unit:ti,typed:$r}),kte=QJ({BigNumber:ma,Unit:ti,config:jn}),Bte=JB({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,pow:kc,typed:$r}),Ute=_J({BigNumber:ma,Unit:ti,config:jn}),Hte=kJ({BigNumber:ma,Unit:ti,config:jn}),Vte=M$({abs:uu,add:Ao,identity:Yv,inv:Kd,multiply:Mo,typed:$r}),Gte=lQ({BigNumber:ma,Unit:ti,config:jn}),zD=lB({addScalar:gs,ceil:$3,conj:jd,divideScalar:_o,dotDivide:rm,exp:lD,i:aD,log2:uD,matrix:ba,multiplyScalar:qo,pow:kc,tau:oD,typed:$r}),kD=aK({BigNumber:ma,Complex:To,config:jn,multiplyScalar:qo,pow:kc,typed:$r}),Wte=NJ({BigNumber:ma,Unit:ti,config:jn}),Yte=KJ({BigNumber:ma,Unit:ti,config:jn}),Zte=fB({conj:jd,dotDivide:rm,fft:zD,typed:$r}),Xte=WJ({BigNumber:ma,Unit:ti,config:jn}),jte=fQ({BigNumber:ma,Unit:ti,config:jn}),$te=IJ({BigNumber:ma,Unit:ti,config:jn}),Kte=yQ({BigNumber:ma,Unit:ti,config:jn}),Jte=hQ({BigNumber:ma,Unit:ti,config:jn}),Qte=qJ({BigNumber:ma,Unit:ti,config:jn}),qte=GJ({BigNumber:ma,Unit:ti,config:jn}),ere=MQ({BigNumber:ma,Unit:ti,config:jn}),tre=wQ({BigNumber:ma,Unit:ti,config:jn}),rre=SQ({BigNumber:ma,Unit:ti,config:jn}),nre=JJ({BigNumber:ma,Unit:ti,config:jn}),are=FJ({BigNumber:ma,Unit:ti,config:jn}),ire=tQ({BigNumber:ma,Unit:ti,config:jn}),ore=pQ({BigNumber:ma,Unit:ti,config:jn}),sre=PJ({BigNumber:ma,Unit:ti,config:jn}),lre=gQ({BigNumber:ma,Unit:ti,config:jn}),ure=rQ({BigNumber:ma,Unit:ti,config:jn}),fre=oQ({BigNumber:ma,Unit:ti,config:jn}),cre=YJ({BigNumber:ma,Unit:ti,config:jn}),hre=zJ({BigNumber:ma,Unit:ti,config:jn}),hf=_$({divideScalar:_o,equalScalar:Ri,inv:Kd,matrix:ba,multiply:Mo,typed:$r}),vre=XJ({BigNumber:ma,Unit:ti,config:jn}),tx=lK({gamma:kD,typed:$r}),dre=uQ({BigNumber:ma,Unit:ti,config:jn}),pre=cQ({BigNumber:ma,Unit:ti,config:jn}),gre=HJ({BigNumber:ma,Unit:ti,config:jn}),BD=RW({DenseMatrix:di,lsolve:ED,lup:_D,matrix:ba,slu:DD,typed:$r,usolve:j3}),mre=VJ({BigNumber:ma,Unit:ti,config:jn}),yre=xQ({BigNumber:ma,Unit:ti,config:jn}),xre=hK({add:Ao,divide:hf,factorial:tx,isInteger:uf,isPositive:J1,multiply:Mo,typed:$r}),bre=dK({factorial:tx,typed:$r}),wre=AQ({BigNumber:ma,Unit:ti,config:jn}),Are=IW({add:Ao,cbrt:pD,divide:hf,equalScalar:Ri,im:k3,isZero:qf,multiply:Mo,re:B3,sqrt:Ic,subtract:go,typeOf:hD,typed:$r,unaryMinus:_c}),Tre=UV({compareNatural:zc,typed:$r}),UD=RK({bignumber:Rc,addScalar:gs,combinations:$1,divideScalar:_o,factorial:tx,isInteger:uf,isNegative:b0,larger:cf,multiplyScalar:qo,number:Wv,pow:kc,subtract:go,typed:$r}),Mre=wH({Unit:ti,typed:$r}),Sre=IK({addScalar:gs,isInteger:uf,isNegative:b0,stirlingS2:UD,typed:$r}),HD=A$({abs:uu,add:Ao,addScalar:gs,atan:sD,bignumber:Rc,column:RD,complex:K1,config:jn,cos:V3,diag:gD,divideScalar:_o,dot:ex,equal:ec,flatten:nm,im:k3,inv:Kd,larger:cf,matrix:ba,matrixFromColumns:W3,multiply:Mo,multiplyScalar:qo,number:Wv,qr:K3,re:B3,sin:U3,smaller:ff,sqrt:Ic,subtract:go,typed:$r,usolve:j3,usolveAll:ND}),Ere=jJ({BigNumber:ma,Unit:ti,config:jn}),Cre=bQ({BigNumber:ma,Unit:ti,config:jn}),Dre=fK({divide:hf,dotDivide:rm,isNumeric:$d,log:Y3,map:w0,matrix:ba,multiply:Mo,sum:PD,typed:$r}),Lre=XC({add:Ao,divide:hf,typed:$r}),Pre=vQ({BigNumber:ma,Unit:ti,config:jn}),Nre=RJ({BigNumber:ma,Unit:ti,config:jn}),Rre=eQ({BigNumber:ma,Unit:ti,config:jn}),J3=jC({add:Ao,apply:H3,divide:hf,isNaN:em,multiply:Mo,subtract:go,typed:$r}),Fre=ZJ({BigNumber:ma,Unit:ti,config:jn}),VD=Y$({add:Ao,compare:T0,divide:hf,partitionSelect:Z3,typed:$r}),Ire=TQ({BigNumber:ma,Unit:ti,config:jn}),_re=$C({map:w0,sqrt:Ic,typed:$r,variance:J3}),Ore=X$({abs:uu,map:w0,median:VD,subtract:go,typed:$r}),Q3=KV({abs:uu,add:Ao,conj:jd,ctranspose:G3,eigs:HD,equalScalar:Ri,larger:cf,matrix:ba,multiply:Mo,pow:kc,smaller:ff,sqrt:Ic,typed:$r}),GD=Yk({BigNumber:ma,DenseMatrix:di,SparseMatrix:Ih,addScalar:gs,config:jn,cos:V3,matrix:ba,multiplyScalar:qo,norm:Q3,sin:U3,typed:$r,unaryMinus:_c}),zre=Gk({multiply:Mo,rotationMatrix:GD,typed:$r}),WD=P$({identity:Yv,matrix:ba,multiply:Mo,norm:Q3,qr:K3,subtract:go,typed:$r}),YD=D$({abs:uu,add:Ao,concat:Ki,identity:Yv,index:SD,lusolve:BD,matrix:ba,matrixFromColumns:W3,multiply:Mo,range:c0,schur:WD,subset:Ru,subtract:go,transpose:tm,typed:$r}),kre=R$({matrix:ba,multiply:Mo,sylvester:YD,transpose:tm,typed:$r}),M0={},S0={},ZD={},Al=oG({mathWithTransform:S0}),E0=RG({Node:Al}),_h=IG({Node:Al}),Jd=OG({Node:Al}),XD=UG({Node:Al}),C0=fG({Node:Al}),jD=gG({Node:Al,ResultSet:iD}),$D=yG({Node:Al}),Zv=EG({Node:Al}),KD=kG({Node:Al}),Bre=lJ({classes:ZD}),q3=UW({math:M0,typed:$r}),JD=DG({Node:Al,typed:$r}),Ure=c$({Chain:q3,typed:$r}),D0=lG({Node:Al,subset:Ru}),L0=PG({Node:Al,size:wl}),QD=dG({matrix:ba,Node:Al,subset:Ru}),Oh=GG({Unit:ti,Node:Al,math:M0}),Xv=YG({Node:Al,SymbolNode:Oh,math:M0}),vf=XG({AccessorNode:D0,ArrayNode:C0,AssignmentNode:QD,BlockNode:jD,ConditionalNode:$D,ConstantNode:Zv,FunctionAssignmentNode:JD,FunctionNode:Xv,IndexNode:L0,ObjectNode:E0,OperatorNode:_h,ParenthesisNode:Jd,RangeNode:KD,RelationalNode:XD,SymbolNode:Oh,config:jn,numeric:Xf,typed:$r}),qD=qK({ConstantNode:Zv,FunctionNode:Xv,OperatorNode:_h,ParenthesisNode:Jd,parse:vf,typed:$r}),ew=jK({bignumber:Rc,fraction:A0,AccessorNode:D0,ArrayNode:C0,ConstantNode:Zv,FunctionNode:Xv,IndexNode:L0,ObjectNode:E0,OperatorNode:_h,SymbolNode:Oh,config:jn,mathWithTransform:S0,matrix:ba,typed:$r}),Hre=$G({parse:vf,typed:$r}),e7=JG({parse:vf,typed:$r}),t7=zW({parse:vf}),r7=eW({evaluate:e7}),tw=KK({AccessorNode:D0,ArrayNode:C0,ConstantNode:Zv,FunctionNode:Xv,IndexNode:L0,ObjectNode:E0,OperatorNode:_h,ParenthesisNode:Jd,SymbolNode:Oh,add:Ao,divide:hf,equal:ec,isZero:qf,multiply:Mo,parse:vf,pow:kc,subtract:go,typed:$r}),Vre=u$({Help:t7,mathWithTransform:S0,typed:$r}),rx=YK({bignumber:Rc,fraction:A0,AccessorNode:D0,ArrayNode:C0,ConstantNode:Zv,FunctionNode:Xv,IndexNode:L0,ObjectNode:E0,OperatorNode:_h,ParenthesisNode:Jd,SymbolNode:Oh,add:Ao,config:jn,divide:hf,equal:ec,isZero:qf,mathWithTransform:S0,matrix:ba,multiply:Mo,parse:vf,pow:kc,resolve:qD,simplifyConstant:ew,simplifyCore:tw,subtract:go,typed:$r}),Gre=tJ({OperatorNode:_h,parse:vf,simplify:rx,typed:$r}),Wre=nJ({ConstantNode:Zv,FunctionNode:Xv,OperatorNode:_h,ParenthesisNode:Jd,SymbolNode:Oh,config:jn,equal:ec,isZero:qf,numeric:Xf,parse:vf,simplify:rx,typed:$r}),Yre=rW({Parser:r7,typed:$r}),Zre=UK({parse:vf,typed:$r}),Xre=iJ({bignumber:Rc,fraction:A0,AccessorNode:D0,ArrayNode:C0,ConstantNode:Zv,FunctionNode:Xv,IndexNode:L0,ObjectNode:E0,OperatorNode:_h,ParenthesisNode:Jd,SymbolNode:Oh,add:Ao,config:jn,divide:hf,equal:ec,isZero:qf,mathWithTransform:S0,matrix:ba,multiply:Mo,parse:vf,pow:kc,simplify:rx,simplifyConstant:ew,simplifyCore:tw,subtract:go,typed:$r});$s(M0,{e:OS,false:Aq,fineStructure:Tq,i:aD,Infinity:Mq,LN10:Sq,LOG10E:Eq,NaN:Cq,null:Dq,phi:Lq,SQRT1_2:Nq,sackurTetrode:Rq,tau:oD,true:Fq,E:OS,version:Iq,efimovFactor:_q,LN2:Oq,pi:zS,replacer:zq,reviver:Bre,SQRT2:kq,typed:$r,unaryPlus:z3,PI:zS,weakMixingAngle:Bq,abs:uu,acos:Uq,acot:Hq,acsc:Vq,addScalar:gs,arg:Gq,asech:Wq,asinh:Yq,atan:sD,atanh:Zq,bignumber:Rc,bitNot:Xq,boolean:jq,clone:$q,combinations:$1,complex:K1,conj:jd,cosh:Kq,coth:Jq,csc:Qq,cube:qq,equalScalar:Ri,erf:eee,exp:lD,expm1:tee,filter:ree,forEach:nee,format:qg,getMatrixDataType:aee,hex:iee,im:k3,isInteger:uf,isNegative:b0,isPositive:J1,isZero:qf,LOG2E:oee,lgamma:see,log10:lee,log2:uD,map:w0,multiplyScalar:qo,not:fD,number:Wv,oct:uee,pickRandom:fee,print:cee,random:hee,re:B3,sec:vee,sign:cD,sin:U3,splitUnit:dee,square:pee,string:gee,tan:mee,typeOf:hD,acosh:yee,acsch:xee,apply:H3,asec:bee,bin:wee,chain:Ure,combinationsWithRep:Aee,cos:V3,csch:Tee,isNaN:em,isPrime:Mee,randomInt:See,sech:Eee,sinh:Cee,sparse:Dee,sqrt:Ic,tanh:Lee,unaryMinus:_c,acoth:Pee,cot:Nee,fraction:A0,isNumeric:$d,matrix:ba,matrixFromFunction:Ree,mode:Fee,numeric:Xf,prod:vD,reshape:Iee,size:wl,squeeze:_ee,subset:Ru,transpose:tm,xgcd:dD,zeros:Oc,asin:Oee,cbrt:pD,concat:Ki,count:zee,ctranspose:G3,diag:gD,divideScalar:_o,dotDivide:rm,equal:ec,flatten:nm,gcd:kee,hasNumericValue:Bee,identity:Yv,kron:Uee,largerEq:Q1,leftShift:Hee,matrixFromColumns:W3,mod:mD,nthRoot:Vee,ones:Gee,resize:Wee,rightArithShift:Yee,round:q1,smaller:ff,to:Zee,unequal:Xee,xor:jee,add:Ao,bitAnd:$ee,bitXor:Kee,catalan:Jee,compare:T0,compareText:yD,cumsum:Qee,deepEqual:xD,dot:ex,equalText:qee,floor:bD,hypot:ete,invmod:tte,larger:cf,log:Y3,matrixFromRows:rte,min:nte,multiply:Mo,nthRoots:ate,or:ite,partitionSelect:Z3,quantileSeq:ote,rightLogShift:ste,smallerEq:X3,subtract:go,trace:lte,usolve:j3,and:ute,bitOr:fte,ceil:$3,compareNatural:zc,composition:cte,cross:hte,det:AD,diff:vte,distance:dte,dotMultiply:pte,fix:MD,index:SD,intersect:gte,lcm:mte,log1p:yte,lsolve:ED,max:CD,qr:K3,range:c0,row:xte,setCartesian:bte,setDistinct:wte,setIsSubset:Ate,setPowerset:Tte,slu:DD,sum:PD,usolveAll:ND,atan2:Mte,column:RD,lsolveAll:Ste,setDifference:FD,setMultiplicity:Ete,setSymDifference:ID,sort:Cte,inv:Kd,lup:_D,pinv:Dte,pow:kc,setIntersect:OD,setUnion:Lte,sqrtm:Pte,vacuumImpedance:Nte,wienDisplacement:Rte,atomicMass:Fte,bohrMagneton:Ite,boltzmann:_te,conductanceQuantum:Ote,createUnit:zte,deuteronMass:kte,dotPow:Bte,electricConstant:Ute,elementaryCharge:Hte,expm:Vte,faraday:Gte,fft:zD,gamma:kD,gravitationConstant:Wte,hartreeEnergy:Yte,ifft:Zte,klitzing:Xte,loschmidt:jte,magneticConstant:$te,molarMass:Kte,molarPlanckConstant:Jte,neutronMass:Qte,nuclearMagneton:qte,planckCharge:ere,planckLength:tre,planckTemperature:rre,protonMass:nre,reducedPlanckConstant:are,rydberg:ire,secondRadiation:ore,speedOfLight:sre,stefanBoltzmann:lre,thomsonCrossSection:ure,avogadro:fre,bohrRadius:cre,coulomb:hre,divide:hf,electronMass:vre,factorial:tx,firstRadiation:dre,gasConstant:pre,inverseConductanceQuantum:gre,lusolve:BD,magneticFluxQuantum:mre,molarMassC12:yre,multinomial:xre,permutations:bre,planckMass:wre,polynomialRoot:Are,setSize:Tre,stirlingS2:UD,unit:Mre,bellNumbers:Sre,eigs:HD,fermiCoupling:Ere,gravity:Cre,kldivergence:Dre,mean:Lre,molarVolume:Pre,planckConstant:Nre,quantumOfCirculation:Rre,variance:J3,classicalElectronRadius:Fre,median:VD,parse:vf,planckTime:Ire,resolve:qD,simplifyConstant:ew,std:_re,compile:Hre,evaluate:e7,mad:Ore,simplifyCore:tw,help:Vre,norm:Q3,rotationMatrix:GD,simplify:rx,symbolicEqual:Gre,derivative:Wre,parser:Yre,rotate:zre,leafCount:Zre,rationalize:Xre,schur:WD,sylvester:YD,lyap:kre,config:jn});$s(S0,M0,{filter:IQ({typed:$r}),forEach:zQ({typed:$r}),map:GQ({typed:$r}),apply:DQ({isInteger:uf,typed:$r}),subset:sq({matrix:ba,typed:$r}),concat:fq({isInteger:uf,matrix:ba,typed:$r}),max:ZQ({config:jn,larger:cf,numeric:Xf,typed:$r}),sum:mq({add:Ao,config:jn,numeric:Xf,typed:$r}),min:QQ({config:jn,numeric:Xf,smaller:ff,typed:$r}),cumsum:xq({add:Ao,typed:$r,unaryPlus:z3}),diff:hq({bignumber:Rc,matrix:ba,number:Wv,subtract:go,typed:$r}),index:UQ({Index:ml}),range:tq({bignumber:Rc,matrix:ba,config:jn,larger:cf,largerEq:Q1,smaller:ff,smallerEq:X3,typed:$r}),row:aq({Index:ml,matrix:ba,range:c0,typed:$r}),column:NQ({Index:ml,matrix:ba,range:c0,typed:$r}),mean:$Q({add:Ao,divide:hf,typed:$r}),variance:wq({add:Ao,apply:H3,divide:hf,isNaN:em,multiply:Mo,subtract:go,typed:$r}),std:pq({map:w0,sqrt:Ic,typed:$r,variance:J3})});$s(ZD,{BigNumber:ma,Complex:To,Fraction:Xd,Matrix:j1,Node:Al,ObjectNode:E0,OperatorNode:_h,ParenthesisNode:Jd,Range:Pq,RelationalNode:XD,ResultSet:iD,ArrayNode:C0,BlockNode:jD,ConditionalNode:$D,ConstantNode:Zv,DenseMatrix:di,RangeNode:KD,Chain:q3,FunctionAssignmentNode:JD,SparseMatrix:Ih,AccessorNode:D0,IndexNode:L0,AssignmentNode:QD,ImmutableDenseMatrix:wD,Index:ml,FibonacciHeap:TD,Spa:LD,Unit:ti,SymbolNode:Oh,FunctionNode:Xv,Help:t7,Parser:r7});q3.createProxy(M0);const jre=()=>{const[T,N]=nf.exports.useState(),[V,Y]=nf.exports.useContext(F1),X=J=>{const R="abcdefghijklmnopqrstuvwxyz".split(""),F={},e=vf(J).transform(function(m){if(m.isConstantNode){const t=R.shift();return F[t]=m.value,new Oh(t)}else return m}),i={asciimathExpr:J,currentScope:F,nodeExpr:e};Y([...V,i])};return nf.exports.useEffect(()=>{async function J(R){try{await fetch("https://api.mathpix.com/v3/text",{method:"POST",headers:{"content-type":"application/json",app_key:"API KEY!"},body:JSON.stringify({src:R,formats:["text","data","html"],data_options:{include_asciimath:!0,include_latex:!0}})}).then(F=>F.json()).then(F=>{console.log(F),X(F.data[0].value.split("=")[1])})}catch(F){console.log(F.message)}}T&&J(T)},[T]),Qo("div",{className:"ast-ctrls-expr-upload-container flex w-1/2 justify-evenly",children:[ni(CR,{setImage:N}),ni(DR,{}),ni(LR,{})]})},$re=()=>Qo("div",{className:"ast-ctrls-expr-analyze-container flex w-1/2 justify-evenly",children:[Qo("div",{className:"ast-ea-icon m-auto text-center",children:[ni("span",{className:"fa-solid fa-calculator","aria-hidden":"true"}),ni("span",{className:"sr-only",children:"Calculator"})]}),Qo("div",{className:"ast-ea-icon m-auto text-center",children:[ni("span",{className:"fa-solid fa-sliders","aria-hidden":"true"}),ni("span",{className:"sr-only",children:"Parametric Analysis"})]}),Qo("div",{className:"ast-ea-icon m-auto text-center",children:[ni("span",{className:"fa-solid fa-wrench","aria-hidden":"true"}),ni("span",{className:"sr-only",children:"Build Functions"})]})]}),Kre=()=>Qo("div",{className:"ast-ctrls-container flex h-9",children:[ni(jre,{}),ni($re,{})]}),Jre=()=>{const[T,N]=nf.exports.useContext(F1);return ni("div",{className:"ast-expr-container flex w-full sm:flex-wrap",children:T?T.map(V=>Qo("div",{className:"ast-expression mt-2 ml-2 w-full font-bold text-black",children:[ni("h2",{className:"text-center text-xl",children:V.asciimathExpr}),ni("p",{children:V.nodeExpr.toString()}),ni("div",{children:Object.keys(V.currentScope).map(Y=>Qo("div",{children:[Qo("label",{htmlFor:Y,children:[Y,": "]}),ni("input",{className:"w-12 rounded-sm border-solid bg-asm_lbrown",id:Y,type:"number",defaultValue:V.currentScope[Y].toString(),onChange:X=>{T.find(J=>J.asciimathExpr===V.asciimathExpr).currentScope[Y]=X.target.value,N([...T])}})]},Y))}),ni("div",{className:"h-1 w-full bg-asm_dgreen"},V.asciimathExpr)]},V.asciimathExpr)):ni("p",{children:"Upload math expression"})})},Qre=()=>Qo("div",{className:"ast-ctrlpnl-container block h-24 w-full bg-asm_lbrown text-sm sm:h-full sm:w-1/4 sm:max-w-xs",children:[ni(Kre,{}),ni(Jre,{})]}),qre=()=>{const T=nf.exports.useState([]);return ni("div",{className:"ast-app-container flex h-full w-full flex-wrap sm:flex-nowrap sm:justify-end",children:Qo(F1.Provider,{value:T,children:[ni(SR,{}),ni(Qre,{})]})})},ene=()=>Qo("div",{className:"flex h-full flex-col",children:[ni("div",{className:"flex-initial",children:ni(xR,{})}),ni("div",{className:"flex-auto",children:ni(qre,{})})]}),tne=document.getElementById("root"),rne=d2.createRoot(tne);rne.render(ni(ene,{})); diff --git a/src/dist/index.html b/src/dist/index.html new file mode 100644 index 0000000..4bc5d10 --- /dev/null +++ b/src/dist/index.html @@ -0,0 +1,19 @@ + + + + + + ASpaceMath + + + + + + +
Not rendered
+ + + From fb40be973257a56f8682bf8bc045ec2a7a4627cd Mon Sep 17 00:00:00 2001 From: Raziel Melchor Date: Sun, 24 Sep 2023 16:42:25 -0700 Subject: [PATCH 11/13] add api key --- src/ExpressionLoader.jsx | 2 +- src/ImageProcessor.jsx | 2 +- vite.config.js | 9 +-------- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/ExpressionLoader.jsx b/src/ExpressionLoader.jsx index 19d3e7a..9cb979e 100644 --- a/src/ExpressionLoader.jsx +++ b/src/ExpressionLoader.jsx @@ -39,7 +39,7 @@ const ExpressionLoader = () => { method: "POST", headers: { "content-type": "application/json", - app_key: "API KEY!" + app_key: "c1a441f711d68478ff8292e7b98ca7a555891fc6012b175ce2ef11618edeeb87" }, body: JSON.stringify({ src: img, diff --git a/src/ImageProcessor.jsx b/src/ImageProcessor.jsx index d68a5cf..60cad91 100644 --- a/src/ImageProcessor.jsx +++ b/src/ImageProcessor.jsx @@ -15,7 +15,7 @@ const ImageProcessor = () => { method: "POST", headers: { "content-type": "application/json", - app_key: "API KEY!", + app_key: "c1a441f711d68478ff8292e7b98ca7a555891fc6012b175ce2ef11618edeeb87", }, body: JSON.stringify({ src: img, diff --git a/vite.config.js b/vite.config.js index 8afdb31..395ecae 100644 --- a/vite.config.js +++ b/vite.config.js @@ -4,12 +4,5 @@ import react from "@vitejs/plugin-react"; export default defineConfig({ plugins: [react()], root: "src", - server: { - proxy: { - "/api/health": { - target: "http://localhost:80", - secure: false, - }, - }, - }, + base: "/ASpaceTech/", }); From 80d531f22164a58337c382984e9246e7b6aa2e56 Mon Sep 17 00:00:00 2001 From: Raziel Melchor Date: Sun, 24 Sep 2023 16:46:05 -0700 Subject: [PATCH 12/13] Adding dist --- src/dist/assets/{index.d06b90c2.js => index.7683ab04.js} | 2 +- src/dist/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/dist/assets/{index.d06b90c2.js => index.7683ab04.js} (99%) diff --git a/src/dist/assets/index.d06b90c2.js b/src/dist/assets/index.7683ab04.js similarity index 99% rename from src/dist/assets/index.d06b90c2.js rename to src/dist/assets/index.7683ab04.js index 136079e..4ee0ef8 100644 --- a/src/dist/assets/index.d06b90c2.js +++ b/src/dist/assets/index.7683ab04.js @@ -3708,4 +3708,4 @@ q: `+this.q.toString():"")+` `),Y.seealso&&Y.seealso.length&&(X+="See also: "+Y.seealso.join(", ")+` `),X},V.prototype.toJSON=function(){var Y=ei(this.doc);return Y.mathjs="Help",Y},V.fromJSON=function(Y){var X={};return Object.keys(Y).filter(J=>J!=="mathjs").forEach(J=>{X[J]=Y[J]}),new V(X)},V.prototype.valueOf=V.prototype.toString,V},{isClass:!0}),kW="Chain",BW=["?on","math","typed"],UW=Lr(kW,BW,T=>{var{on:N,math:V,typed:Y}=T;function X(i){if(!(this instanceof X))throw new SyntaxError("Constructor must be called with the new operator");r8(i)?this.value=i.value:this.value=i}X.prototype.type="Chain",X.prototype.isChain=!0,X.prototype.done=function(){return this.value},X.prototype.valueOf=function(){return this.value},X.prototype.toString=function(){return vi(this.value)},X.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},X.fromJSON=function(i){return new X(i.value)};function J(i,m){typeof m=="function"&&(X.prototype[i]=F(m))}function R(i,m){GR(X.prototype,i,function(){var y=m();if(typeof y=="function")return F(y)})}function F(i){return function(){if(arguments.length===0)return new X(i(this.value));for(var m=[this.value],t=0;ti[l])};for(var y in i)t(y)}};var e={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return X.createProxy(V),N&&N("import",function(i,m,t){t||R(i,m)}),X},{isClass:!0}),UM={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]},HW={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]},VW={name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]},GW={name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]},WW={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]},YW={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]},ZW={name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]},XW={name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]},jW={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]},$W={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]},KW={name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as `(1 + sqrt(5)) / 2` and is approximately 1.618034...",examples:["phi"],seealso:[]},HM={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]},JW={name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]},QW={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]},qW={name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]},eY={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]},tY={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]},rY={name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",examples:["0.1 + 0.2","bignumber(0.1) + bignumber(0.2)",'bignumber("7.2")','bignumber("7.2e500")',"bignumber([0.1, 0.2, 0.3])"],seealso:["boolean","complex","fraction","index","matrix","string","unit"]},nY={name:"boolean",category:"Construction",syntax:["x","boolean(x)"],description:"Convert a string or number into a boolean.",examples:["boolean(0)","boolean(1)","boolean(3)",'boolean("true")','boolean("false")',"boolean([1, 0, 1, 1])"],seealso:["bignumber","complex","index","matrix","number","string","unit"]},aY={name:"complex",category:"Construction",syntax:["complex()","complex(re, im)","complex(string)"],description:"Create a complex number.",examples:["complex()","complex(2, 3)",'complex("7 - 2i")'],seealso:["bignumber","boolean","index","matrix","number","string","unit"]},iY={name:"createUnit",category:"Construction",syntax:["createUnit(definitions)","createUnit(name, definition)"],description:"Create a user-defined unit and register it with the Unit type.",examples:['createUnit("foo")','createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})','createUnit("mph", "1 mile/hour")'],seealso:["unit","splitUnit"]},oY={name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(matrix)","fraction(num,den)","fraction({n: num, d: den})"],description:"Create a fraction from a number or from integer numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)","fraction({n: 333, d: 53})","fraction([sqrt(9), sqrt(10), sqrt(11)])"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]},sY={name:"index",category:"Construction",syntax:["[start]","[start:end]","[start:step:end]","[start1, start 2, ...]","[start1:end1, start2:end2, ...]","[start1:step1:end1, start2:step2:end2, ...]"],description:"Create an index to get or replace a subset of a matrix",examples:["[1, 2, 3]","A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[1:2, 1:2] = ones(2, 2)"],seealso:["bignumber","boolean","complex","matrix,","number","range","string","unit"]},lY={name:"matrix",category:"Construction",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()",'matrix("dense")',"matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])",'matrix([3, 4; 5, 6], "sparse")','matrix([3, 4; 5, 6], "sparse", "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","sparse"]},uY={name:"number",category:"Construction",syntax:["x","number(x)","number(unit, valuelessUnit)"],description:"Create a number or convert a string or boolean into a number.",examples:["2","2e3","4.05","number(2)",'number("7.2")',"number(true)","number([true, false, true, true])",'number(unit("52cm"), "m")'],seealso:["bignumber","boolean","complex","fraction","index","matrix","string","unit"]},fY={name:"sparse",category:"Construction",syntax:["sparse()","sparse([a1, b1, ...; a1, b2, ...])",'sparse([a1, b1, ...; a1, b2, ...], "number")'],description:"Create a sparse matrix.",examples:["sparse()","sparse([3, 4; 5, 6])",'sparse([3, 0; 5, 0], "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","matrix"]},cY={name:"splitUnit",category:"Construction",syntax:["splitUnit(unit: Unit, parts: Unit[])"],description:"Split a unit in an array of units whose sum is equal to the original unit.",examples:['splitUnit(1 m, ["feet", "inch"])'],seealso:["unit","createUnit"]},hY={name:"string",category:"Construction",syntax:['"text"',"string(x)"],description:"Create a string or convert a value to a string",examples:['"Hello World!"',"string(4.2)","string(3 + 2i)"],seealso:["bignumber","boolean","complex","index","matrix","number","unit"]},vY={name:"unit",category:"Construction",syntax:["value unit","unit(value, unit)","unit(string)"],description:"Create a unit.",examples:["5.5 mm","3 inch",'unit(7.1, "kilogram")','unit("23 deg")'],seealso:["bignumber","boolean","complex","index","matrix","number","string"]},dY={name:"config",category:"Core",syntax:["config()","config(options)"],description:"Get configuration or change configuration.",examples:["config()","1/3 + 1/4",'config({number: "Fraction"})',"1/3 + 1/4"],seealso:[]},pY={name:"import",category:"Core",syntax:["import(functions)","import(functions, options)"],description:"Import functions or constants from an object.",examples:["import({myFn: f(x)=x^2, myConstant: 32 })","myFn(2)","myConstant"],seealso:[]},gY={name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number": f(x)=x+x })',"double(2)",'double("hello")'],seealso:[]},mY={name:"derivative",category:"Algebra",syntax:["derivative(expr, variable)","derivative(expr, variable, {simplify: boolean})"],description:"Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.",examples:['derivative("2x^3", "x")','derivative("2x^3", "x", {simplify: false})','derivative("2x^2 + 3x + 4", "x")','derivative("sin(2x)", "x")','f = parse("x^2 + x")','x = parse("x")',"df = derivative(f, x)","df.evaluate({x: 3})"],seealso:["simplify","parse","evaluate"]},yY={name:"leafCount",category:"Algebra",syntax:["leafCount(expr)"],description:"Computes the number of leaves in the parse tree of the given expression",examples:['leafCount("e^(i*pi)-1")','leafCount(parse("{a: 22/7, b: 10^(1/2)}"))'],seealso:["simplify"]},xY={name:"lsolve",category:"Algebra",syntax:["x=lsolve(L, b)"],description:"Finds one solution of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolveAll","lup","lusolve","usolve","matrix","sparse"]},bY={name:"lsolveAll",category:"Algebra",syntax:["x=lsolveAll(L, b)"],description:"Finds all solutions of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolve","lup","lusolve","usolve","matrix","sparse"]},wY={name:"lup",category:"Algebra",syntax:["lup(m)"],description:"Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U",examples:["lup([[2, 1], [1, 4]])","lup(matrix([[2, 1], [1, 4]]))","lup(sparse([[2, 1], [1, 4]]))"],seealso:["lusolve","lsolve","usolve","matrix","sparse","slu","qr"]},AY={name:"lusolve",category:"Algebra",syntax:["x=lusolve(A, b)","x=lusolve(lu, b)"],description:"Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lusolve(a, b)"],seealso:["lup","slu","lsolve","usolve","matrix","sparse"]},TY={name:"polynomialRoot",category:"Algebra",syntax:["x=polynomialRoot(-6, 3)","x=polynomialRoot(4, -4, 1)","x=polynomialRoot(-8, 12, -6, 1)"],description:"Finds the roots of a univariate polynomial given by its coefficients starting from constant, linear, and so on, increasing in degree.",examples:["a = polynomialRoot(-6, 11, -6 1)"],seealso:["cbrt","sqrt"]},MY={name:"qr",category:"Algebra",syntax:["qr(A)"],description:"Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.",examples:["qr([[1, -1, 4], [1, 4, -2], [1, 4, 2], [1, -1, 0]])"],seealso:["lup","slu","matrix"]},SY={name:"rationalize",category:"Algebra",syntax:["rationalize(expr)","rationalize(expr, scope)","rationalize(expr, scope, detailed)"],description:"Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.",examples:['rationalize("2x/y - y/(x+1)")','rationalize("2x/y - y/(x+1)", true)'],seealso:["simplify"]},EY={name:"resolve",category:"Algebra",syntax:["resolve(node, scope)"],description:"Recursively substitute variables in an expression tree.",examples:['resolve(parse("1 + x"), { x: 7 })','resolve(parse("size(text)"), { text: "Hello World" })','resolve(parse("x + y"), { x: parse("3z") })','resolve(parse("3x"), { x: parse("y+z"), z: parse("w^y") })'],seealso:["simplify","evaluate"],mayThrow:["ReferenceError"]},CY={name:"simplify",category:"Algebra",syntax:["simplify(expr)","simplify(expr, rules)"],description:"Simplify an expression tree.",examples:['simplify("3 + 2 / 4")','simplify("2x + x")','f = parse("x * (x + 2 + x)")',"simplified = simplify(f)","simplified.evaluate({x: 2})"],seealso:["simplifyCore","derivative","evaluate","parse","rationalize","resolve"]},DY={name:"simplifyConstant",category:"Algebra",syntax:["simplifyConstant(expr)","simplifyConstant(expr, options)"],description:"Replace constant subexpressions of node with their values.",examples:['simplifyConatant("(3-3)*x")','simplifyConstant(parse("z-cos(tau/8)"))'],seealso:["simplify","simplifyCore","evaluate"]},LY={name:"simplifyCore",category:"Algebra",syntax:["simplifyCore(node)"],description:"Perform simple one-pass simplifications on an expression tree.",examples:['simplifyCore(parse("0*x"))','simplifyCore(parse("(x+0)*2"))'],seealso:["simplify","simplifyConstant","evaluate"]},PY={name:"slu",category:"Algebra",syntax:["slu(A, order, threshold)"],description:"Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U",examples:["slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)"],seealso:["lusolve","lsolve","usolve","matrix","sparse","lup","qr"]},NY={name:"symbolicEqual",category:"Algebra",syntax:["symbolicEqual(expr1, expr2)","symbolicEqual(expr1, expr2, options)"],description:"Returns true if the difference of the expressions simplifies to 0",examples:['symbolicEqual("x*y","y*x")','symbolicEqual("abs(x^2)", "x^2")','symbolicEqual("abs(x)", "x", {context: {abs: {trivial: true}}})'],seealso:["simplify","evaluate"]},RY={name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds one solution of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolveAll","lup","lusolve","lsolve","matrix","sparse"]},FY={name:"usolveAll",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds all solutions of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolve","lup","lusolve","lsolve","matrix","sparse"]},IY={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]},_Y={name:"add",category:"Operators",syntax:["x + y","add(x, y)"],description:"Add two values.",examples:["a = 2.1 + 3.6","a - 3.6","3 + 2i","3 cm + 2 inch",'"2.3" + "4"'],seealso:["subtract"]},OY={name:"cbrt",category:"Arithmetic",syntax:["cbrt(x)","cbrt(x, allRoots)"],description:"Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:["cbrt(64)","cube(4)","cbrt(-8)","cbrt(2 + 3i)","cbrt(8i)","cbrt(8i, true)","cbrt(27 m^3)"],seealso:["square","sqrt","cube","multiply"]},zY={name:"ceil",category:"Arithmetic",syntax:["ceil(x)"],description:"Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.",examples:["ceil(3.2)","ceil(3.8)","ceil(-4.2)"],seealso:["floor","fix","round"]},kY={name:"cube",category:"Arithmetic",syntax:["cube(x)"],description:"Compute the cube of a value. The cube of x is x * x * x.",examples:["cube(2)","2^3","2 * 2 * 2"],seealso:["multiply","square","pow"]},BY={name:"divide",category:"Operators",syntax:["x / y","divide(x, y)"],description:"Divide two values.",examples:["a = 2 / 3","a * 3","4.5 / 2","3 + 4 / 2","(3 + 4) / 2","18 km / 4.5"],seealso:["multiply"]},UY={name:"dotDivide",category:"Operators",syntax:["x ./ y","dotDivide(x, y)"],description:"Divide two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a ./ b"],seealso:["multiply","dotMultiply","divide"]},HY={name:"dotMultiply",category:"Operators",syntax:["x .* y","dotMultiply(x, y)"],description:"Multiply two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a .* b"],seealso:["multiply","divide","dotDivide"]},VY={name:"dotPow",category:"Operators",syntax:["x .^ y","dotPow(x, y)"],description:"Calculates the power of x to y element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","a .^ 2"],seealso:["pow"]},GY={name:"exp",category:"Arithmetic",syntax:["exp(x)"],description:"Calculate the exponent of a value.",examples:["exp(1.3)","e ^ 1.3","log(exp(1.3))","x = 2.4","(exp(i*x) == cos(x) + i*sin(x)) # Euler's formula"],seealso:["expm","expm1","pow","log"]},WY={name:"expm",category:"Arithmetic",syntax:["exp(x)"],description:"Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.",examples:["expm([[0,2],[0,0]])"],seealso:["exp"]},YY={name:"expm1",category:"Arithmetic",syntax:["expm1(x)"],description:"Calculate the value of subtracting 1 from the exponential value.",examples:["expm1(2)","pow(e, 2) - 1","log(expm1(2) + 1)"],seealso:["exp","pow","log"]},ZY={name:"fix",category:"Arithmetic",syntax:["fix(x)"],description:"Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.",examples:["fix(3.2)","fix(3.8)","fix(-4.2)","fix(-4.8)"],seealso:["ceil","floor","round"]},XY={name:"floor",category:"Arithmetic",syntax:["floor(x)"],description:"Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.",examples:["floor(3.2)","floor(3.8)","floor(-4.2)"],seealso:["ceil","fix","round"]},jY={name:"gcd",category:"Arithmetic",syntax:["gcd(a, b)","gcd(a, b, c, ...)"],description:"Compute the greatest common divisor.",examples:["gcd(8, 12)","gcd(-4, 6)","gcd(25, 15, -10)"],seealso:["lcm","xgcd"]},$Y={name:"hypot",category:"Arithmetic",syntax:["hypot(a, b, c, ...)","hypot([a, b, c, ...])"],description:"Calculate the hypotenusa of a list with values. ",examples:["hypot(3, 4)","sqrt(3^2 + 4^2)","hypot(-2)","hypot([3, 4, 5])"],seealso:["abs","norm"]},KY={name:"invmod",category:"Arithmetic",syntax:["invmod(a, b)"],description:"Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax \u2263 1 (mod b)",examples:["invmod(8, 12)=NaN","invmod(7, 13)=2","invmod(15151, 15122)=10429"],seealso:["gcd","xgcd"]},JY={name:"lcm",category:"Arithmetic",syntax:["lcm(x, y)"],description:"Compute the least common multiple.",examples:["lcm(4, 6)","lcm(6, 21)","lcm(6, 21, 5)"],seealso:["gcd"]},QY={name:"log",category:"Arithmetic",syntax:["log(x)","log(x, base)"],description:"Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",examples:["log(3.5)","a = log(2.4)","exp(a)","10 ^ 4","log(10000, 10)","log(10000) / log(10)","b = log(1024, 2)","2 ^ b"],seealso:["exp","log1p","log2","log10"]},qY={name:"log10",category:"Arithmetic",syntax:["log10(x)"],description:"Compute the 10-base logarithm of a value.",examples:["log10(0.00001)","log10(10000)","10 ^ 4","log(10000) / log(10)","log(10000, 10)"],seealso:["exp","log"]},eZ={name:"log1p",category:"Arithmetic",syntax:["log1p(x)","log1p(x, base)"],description:"Calculate the logarithm of a `value+1`",examples:["log1p(2.5)","exp(log1p(1.4))","pow(10, 4)","log1p(9999, 10)","log1p(9999) / log(10)"],seealso:["exp","log","log2","log10"]},tZ={name:"log2",category:"Arithmetic",syntax:["log2(x)"],description:"Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`.",examples:["log2(0.03125)","log2(16)","log2(16) / log2(2)","pow(2, 4)"],seealso:["exp","log1p","log","log10"]},rZ={name:"mod",category:"Operators",syntax:["x % y","x mod y","mod(x, y)"],description:"Calculates the modulus, the remainder of an integer division.",examples:["7 % 3","11 % 2","10 mod 4","isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divide"]},nZ={name:"multiply",category:"Operators",syntax:["x * y","multiply(x, y)"],description:"multiply two values.",examples:["a = 2.1 * 3.4","a / 3.4","2 * 3 + 4","2 * (3 + 4)","3 * 2.1 km"],seealso:["divide"]},aZ={name:"norm",category:"Arithmetic",syntax:["norm(x)","norm(x, p)"],description:"Calculate the norm of a number, vector or matrix.",examples:["abs(-3.5)","norm(-3.5)","norm(3 - 4i)","norm([1, 2, -3], Infinity)","norm([1, 2, -3], -Infinity)","norm([3, 4], 2)","norm([[1, 2], [3, 4]], 1)",'norm([[1, 2], [3, 4]], "inf")','norm([[1, 2], [3, 4]], "fro")']},iZ={name:"nthRoot",category:"Arithmetic",syntax:["nthRoot(a)","nthRoot(a, root)"],description:'Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".',examples:["4 ^ 3","nthRoot(64, 3)","nthRoot(9, 2)","sqrt(9)"],seealso:["nthRoots","pow","sqrt"]},oZ={name:"nthRoots",category:"Arithmetic",syntax:["nthRoots(A)","nthRoots(A, root)"],description:'Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values.',examples:["nthRoots(1)","nthRoots(1, 3)"],seealso:["sqrt","pow","nthRoot"]},sZ={name:"pow",category:"Operators",syntax:["x ^ y","pow(x, y)"],description:"Calculates the power of x to y, x^y.",examples:["2^3","2*2*2","1 + e ^ (pi * i)","pow([[1, 2], [4, 3]], 2)","pow([[1, 2], [4, 3]], -1)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]},lZ={name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)"],description:"round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.",examples:["round(3.2)","round(3.8)","round(-4.2)","round(-4.8)","round(pi, 3)","round(123.45678, 2)"],seealso:["ceil","floor","fix"]},uZ={name:"sign",category:"Arithmetic",syntax:["sign(x)"],description:"Compute the sign of a value. The sign of a value x is 1 when x>1, -1 when x<0, and 0 when x=0.",examples:["sign(3.5)","sign(-4.2)","sign(0)"],seealso:["abs"]},fZ={name:"sqrt",category:"Arithmetic",syntax:["sqrt(x)"],description:"Compute the square root value. If x = y * y, then y is the square root of x.",examples:["sqrt(25)","5 * 5","sqrt(-1)"],seealso:["square","sqrtm","multiply","nthRoot","nthRoots","pow"]},cZ={name:"sqrtm",category:"Arithmetic",syntax:["sqrtm(x)"],description:"Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.",examples:["sqrtm([[33, 24], [48, 57]])"],seealso:["sqrt","abs","square","multiply"]},hZ={name:"sylvester",category:"Matrix",syntax:["sylvester(A,B,C)"],description:"Solves the real-valued Sylvester equation AX+XB=C for X",examples:["sylvester([[-1, -2], [1, 1]], [[-2, 1], [-1, 2]], [[-3, 2], [3, 0]])","sylvester(A,B,C)"],seealso:["schur","lyap"]},vZ={name:"schur",category:"Matrix",syntax:["schur(A)"],description:"Performs a real Schur decomposition of the real matrix A = UTU'",examples:["schur([[1, 0], [-4, 3]])","schur(A)"],seealso:["lyap","sylvester"]},dZ={name:"lyap",category:"Matrix",syntax:["lyap(A,Q)"],description:"Solves the Continuous-time Lyapunov equation AP+PA'+Q=0 for P",examples:["lyap([[-2, 0], [1, -4]], [[3, 1], [1, 3]])","lyap(A,Q)"],seealso:["schur","sylvester"]},pZ={name:"square",category:"Arithmetic",syntax:["square(x)"],description:"Compute the square of a value. The square of x is x * x.",examples:["square(3)","sqrt(9)","3^2","3 * 3"],seealso:["multiply","pow","sqrt","cube"]},gZ={name:"subtract",category:"Operators",syntax:["x - y","subtract(x, y)"],description:"subtract two values.",examples:["a = 5.3 - 2","a + 2","2/3 - 1/6","2 * 3 - 3","2.1 km - 500m"],seealso:["add"]},mZ={name:"unaryMinus",category:"Operators",syntax:["-x","unaryMinus(x)"],description:"Inverse the sign of a value. Converts booleans and strings to numbers.",examples:["-4.5","-(-5.6)",'-"22"'],seealso:["add","subtract","unaryPlus"]},yZ={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]},xZ={name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]},bZ={name:"bitAnd",category:"Bitwise",syntax:["x & y","bitAnd(x, y)"],description:"Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0",examples:["5 & 3","bitAnd(53, 131)","[1, 12, 31] & 42"],seealso:["bitNot","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},wZ={name:"bitNot",category:"Bitwise",syntax:["~x","bitNot(x)"],description:"Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.",examples:["~1","~2","bitNot([2, -3, 4])"],seealso:["bitAnd","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},AZ={name:"bitOr",category:"Bitwise",syntax:["x | y","bitOr(x, y)"],description:"Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.",examples:["5 | 3","bitOr([1, 2, 3], 4)"],seealso:["bitAnd","bitNot","bitXor","leftShift","rightArithShift","rightLogShift"]},TZ={name:"bitXor",category:"Bitwise",syntax:["bitXor(x, y)"],description:"Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.",examples:["bitOr(1, 2)","bitXor([2, 3, 4], 4)"],seealso:["bitAnd","bitNot","bitOr","leftShift","rightArithShift","rightLogShift"]},MZ={name:"leftShift",category:"Bitwise",syntax:["x << y","leftShift(x, y)"],description:"Bitwise left logical shift of a value x by y number of bits.",examples:["4 << 1","8 >> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]},SZ={name:"rightArithShift",category:"Bitwise",syntax:["x >> y","rightArithShift(x, y)"],description:"Bitwise right arithmetic shift of a value x by y number of bits.",examples:["8 >> 1","4 << 1","-12 >> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightLogShift"]},EZ={name:"rightLogShift",category:"Bitwise",syntax:["x >>> y","rightLogShift(x, y)"],description:"Bitwise right logical shift of a value x by y number of bits.",examples:["8 >>> 1","4 << 1","-12 >>> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightArithShift"]},CZ={name:"bellNumbers",category:"Combinatorics",syntax:["bellNumbers(n)"],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. `bellNumbers` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]},DZ={name:"catalan",category:"Combinatorics",syntax:["catalan(n)"],description:"The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["catalan(3)","catalan(8)"],seealso:["bellNumbers"]},LZ={name:"composition",category:"Combinatorics",syntax:["composition(n, k)"],description:"The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.",examples:["composition(5, 3)"],seealso:["combinations"]},PZ={name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2(n, k)"],description:"he Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. `stirlingS2` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:["stirlingS2(5, 3)"],seealso:["bellNumbers"]},NZ={name:"arg",category:"Complex",syntax:["arg(x)"],description:"Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).",examples:["arg(2 + 2i)","atan2(3, 2)","arg(2 + 3i)"],seealso:["re","im","conj","abs"]},RZ={name:"conj",category:"Complex",syntax:["conj(x)"],description:"Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.",examples:["conj(2 + 3i)","conj(2 - 3i)","conj(-5.2i)"],seealso:["re","im","abs","arg"]},FZ={name:"im",category:"Complex",syntax:["im(x)"],description:"Get the imaginary part of a complex number.",examples:["im(2 + 3i)","re(2 + 3i)","im(-5.2i)","im(2.4)"],seealso:["re","conj","abs","arg"]},IZ={name:"re",category:"Complex",syntax:["re(x)"],description:"Get the real part of a complex number.",examples:["re(2 + 3i)","im(2 + 3i)","re(-5.2i)","re(2.4)"],seealso:["im","conj","abs","arg"]},_Z={name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate([expr1, expr2, expr3, ...])"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(" + 4 + ")")'],seealso:[]},OZ={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]},zZ={name:"distance",category:"Geometry",syntax:["distance([x1, y1], [x2, y2])","distance([[x1, y1], [x2, y2]])"],description:"Calculates the Euclidean distance between two points.",examples:["distance([0,0], [4,4])","distance([[0,0], [4,4]])"],seealso:[]},kZ={name:"intersect",category:"Geometry",syntax:["intersect(expr1, expr2, expr3, expr4)","intersect(expr1, expr2, expr3)"],description:"Computes the intersection point of lines and/or planes.",examples:["intersect([0, 0], [10, 10], [10, 0], [0, 10])","intersect([1, 0, 1], [4, -2, 2], [1, 1, 1, 6])"],seealso:[]},BZ={name:"and",category:"Logical",syntax:["x and y","and(x, y)"],description:"Logical and. Test whether two values are both defined with a nonzero/nonempty value.",examples:["true and false","true and true","2 and 4"],seealso:["not","or","xor"]},UZ={name:"not",category:"Logical",syntax:["not x","not(x)"],description:"Logical not. Flips the boolean value of given argument.",examples:["not true","not false","not 2","not 0"],seealso:["and","or","xor"]},HZ={name:"or",category:"Logical",syntax:["x or y","or(x, y)"],description:"Logical or. Test if at least one value is defined with a nonzero/nonempty value.",examples:["true or false","false or false","0 or 4"],seealso:["not","and","xor"]},VZ={name:"xor",category:"Logical",syntax:["x xor y","xor(x, y)"],description:"Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.",examples:["true xor false","false xor false","true xor true","0 xor 4"],seealso:["not","and","or"]},GZ={name:"column",category:"Matrix",syntax:["column(x, index)"],description:"Return a column from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","column(A, 1)","column(A, 2)"],seealso:["row","matrixFromColumns"]},WZ={name:"concat",category:"Matrix",syntax:["concat(A, B, C, ...)","concat(A, B, C, ..., dim)"],description:"Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.",examples:["A = [1, 2; 5, 6]","B = [3, 4; 7, 8]","concat(A, B)","concat(A, B, 1)","concat(A, B, 2)"],seealso:["det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},YZ={name:"count",category:"Matrix",syntax:["count(x)"],description:"Count the number of elements of a matrix, array or string.",examples:["a = [1, 2; 3, 4; 5, 6]","count(a)","size(a)",'count("hello world")'],seealso:["size"]},ZZ={name:"cross",category:"Matrix",syntax:["cross(A, B)"],description:"Calculate the cross product for two vectors in three dimensional space.",examples:["cross([1, 1, 0], [0, 1, 1])","cross([3, -3, 1], [4, 9, 2])","cross([2, 3, 4], [5, 6, 7])"],seealso:["multiply","dot"]},XZ={name:"ctranspose",category:"Matrix",syntax:["x'","ctranspose(x)"],description:"Complex Conjugate and Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","ctranspose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},jZ={name:"det",category:"Matrix",syntax:["det(x)"],description:"Calculate the determinant of a matrix",examples:["det([1, 2; 3, 4])","det([-2, 2, 3; -1, 1, 3; 2, 0, -1])"],seealso:["concat","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},$Z={name:"diag",category:"Matrix",syntax:["diag(x)","diag(x, k)"],description:"Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.",examples:["diag(1:3)","diag(1:3, 1)","a = [1, 2, 3; 4, 5, 6; 7, 8, 9]","diag(a)"],seealso:["concat","det","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},KZ={name:"diff",category:"Matrix",syntax:["diff(arr)","diff(arr, dim)"],description:["Create a new matrix or array with the difference of the passed matrix or array.","Dim parameter is optional and used to indicant the dimension of the array/matrix to apply the difference","If no dimension parameter is passed it is assumed as dimension 0","Dimension is zero-based in javascript and one-based in the parser","Arrays must be 'rectangular' meaning arrays like [1, 2]","If something is passed as a matrix it will be returned as a matrix but other than that all matrices are converted to arrays"],examples:["diff([1, 2, 4, 7, 0])","diff([1, 2, 4, 7, 0], 0)","diff(matrix([1, 2, 4, 7, 0]))","diff([[1, 2], [3, 4]])","diff([[1, 2], [3, 4]], 0)","diff([[1, 2], [3, 4]], 1)","diff([[1, 2], [3, 4]], bignumber(1))","diff(matrix([[1, 2], [3, 4]]), 1)","diff([[1, 2], matrix([3, 4])], 1)"],seealso:["subtract","partitionSelect"]},JZ={name:"dot",category:"Matrix",syntax:["dot(A, B)","A * B"],description:"Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn",examples:["dot([2, 4, 1], [2, 2, 3])","[2, 4, 1] * [2, 2, 3]"],seealso:["multiply","cross"]},QZ={name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and eigenvectors of a real symmetric matrix",examples:["eigs([[5, 2.3], [2.3, 1]])"],seealso:["inv"]},qZ={name:"filter",category:"Matrix",syntax:["filter(x, test)"],description:"Filter items in a matrix.",examples:["isPositive(x) = x > 0","filter([6, -2, -1, 4, 3], isPositive)","filter([6, -2, 0, 1, 0], x != 0)"],seealso:["sort","map","forEach"]},eX={name:"flatten",category:"Matrix",syntax:["flatten(x)"],description:"Flatten a multi dimensional matrix into a single dimensional matrix.",examples:["a = [1, 2, 3; 4, 5, 6]","size(a)","b = flatten(a)","size(b)"],seealso:["concat","resize","size","squeeze"]},tX={name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["numberOfPets = {}","addPet(n) = numberOfPets[n] = (numberOfPets[n] ? numberOfPets[n]:0 ) + 1;",'forEach(["Dog","Cat","Cat"], addPet)',"numberOfPets"],seealso:["map","sort","filter"]},rX={name:"getMatrixDataType",category:"Matrix",syntax:["getMatrixDataType(x)"],description:'Find the data type of all elements in a matrix or array, for example "number" if all items are a number and "Complex" if all values are complex numbers. If a matrix contains more than one data type, it will return "mixed".',examples:["getMatrixDataType([1, 2, 3])","getMatrixDataType([[5 cm], [2 inch]])",'getMatrixDataType([1, "text"])',"getMatrixDataType([1, bignumber(4)])"],seealso:["matrix","sparse","typeOf"]},nX={name:"identity",category:"Matrix",syntax:["identity(n)","identity(m, n)","identity([m, n])"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["identity(3)","identity(3, 5)","a = [1, 2, 3; 4, 5, 6]","identity(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},aX={name:"inv",category:"Matrix",syntax:["inv(x)"],description:"Calculate the inverse of a matrix",examples:["inv([1, 2; 3, 4])","inv(4)","1 / 4"],seealso:["concat","det","diag","identity","ones","range","size","squeeze","subset","trace","transpose","zeros"]},iX={name:"pinv",category:"Matrix",syntax:["pinv(x)"],description:"Calculate the Moore\u2013Penrose inverse of a matrix",examples:["pinv([1, 2; 3, 4])","pinv([[1, 0], [0, 1], [0, 1]])","pinv(4)"],seealso:["inv"]},oX={name:"kron",category:"Matrix",syntax:["kron(x, y)"],description:"Calculates the kronecker product of 2 matrices or vectors.",examples:["kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])","kron([1,1], [2,3,4])"],seealso:["multiply","dot","cross"]},sX={name:"map",category:"Matrix",syntax:["map(x, callback)"],description:"Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array.",examples:["map([1, 2, 3], square)"],seealso:["filter","forEach"]},lX={name:"matrixFromColumns",category:"Matrix",syntax:["matrixFromColumns(...arr)","matrixFromColumns(row1, row2)","matrixFromColumns(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual columns.",examples:["matrixFromColumns([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromRows","matrixFromFunction","zeros"]},uX={name:"matrixFromFunction",category:"Matrix",syntax:["matrixFromFunction(size, fn)","matrixFromFunction(size, fn, format)","matrixFromFunction(size, fn, format, datatype)","matrixFromFunction(size, format, fn)","matrixFromFunction(size, format, datatype, fn)"],description:"Create a matrix by evaluating a generating function at each index.",examples:["f(I) = I[1] - I[2]","matrixFromFunction([3,3], f)","g(I) = I[1] - I[2] == 1 ? 4 : 0",'matrixFromFunction([100, 100], "sparse", g)',"matrixFromFunction([5], random)"],seealso:["matrix","matrixFromRows","matrixFromColumns","zeros"]},fX={name:"matrixFromRows",category:"Matrix",syntax:["matrixFromRows(...arr)","matrixFromRows(row1, row2)","matrixFromRows(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual rows.",examples:["matrixFromRows([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromColumns","matrixFromFunction","zeros"]},cX={name:"ones",category:"Matrix",syntax:["ones(m)","ones(m, n)","ones(m, n, p, ...)","ones([m])","ones([m, n])","ones([m, n, p, ...])"],description:"Create a matrix containing ones.",examples:["ones(3)","ones(3, 5)","ones([2,3]) * 4.5","a = [1, 2, 3; 4, 5, 6]","ones(size(a))"],seealso:["concat","det","diag","identity","inv","range","size","squeeze","subset","trace","transpose","zeros"]},hX={name:"partitionSelect",category:"Matrix",syntax:["partitionSelect(x, k)","partitionSelect(x, k, compare)"],description:"Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.",examples:["partitionSelect([5, 10, 1], 2)",'partitionSelect(["C", "B", "A", "D"], 1, compareText)',"arr = [5, 2, 1]","partitionSelect(arr, 0) # returns 1, arr is now: [1, 2, 5]","arr","partitionSelect(arr, 1, 'desc') # returns 2, arr is now: [5, 2, 1]","arr"],seealso:["sort"]},vX={name:"range",category:"Type",syntax:["start:end","start:step:end","range(start, end)","range(start, end, step)","range(string)"],description:"Create a range. Lower bound of the range is included, upper bound is excluded.",examples:["1:5","3:-1:-3","range(3, 7)","range(0, 12, 2)",'range("4:10")',"a = [1, 2, 3, 4; 5, 6, 7, 8]","a[1:2, 1:2]"],seealso:["concat","det","diag","identity","inv","ones","size","squeeze","subset","trace","transpose","zeros"]},dX={name:"reshape",category:"Matrix",syntax:["reshape(x, sizes)"],description:"Reshape a multi dimensional array to fit the specified dimensions.",examples:["reshape([1, 2, 3, 4, 5, 6], [2, 3])","reshape([[1, 2], [3, 4]], [1, 4])","reshape([[1, 2], [3, 4]], [4])","reshape([1, 2, 3, 4], [-1, 2])"],seealso:["size","squeeze","resize"]},pX={name:"resize",category:"Matrix",syntax:["resize(x, size)","resize(x, size, defaultValue)"],description:"Resize a matrix.",examples:["resize([1,2,3,4,5], [3])","resize([1,2,3], [5])","resize([1,2,3], [5], -1)","resize(2, [2, 3])",'resize("hello", [8], "!")'],seealso:["size","subset","squeeze","reshape"]},gX={name:"rotate",category:"Matrix",syntax:["rotate(w, theta)","rotate(w, theta, v)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotate([1, 0], pi / 2)",'rotate(matrix([1, 0]), unit("35deg"))','rotate([1, 0, 0], unit("90deg"), [0, 0, 1])','rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],seealso:["matrix","rotationMatrix"]},mX={name:"rotationMatrix",category:"Matrix",syntax:["rotationMatrix(theta)","rotationMatrix(theta, v)","rotationMatrix(theta, v, format)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotationMatrix(pi / 2)",'rotationMatrix(unit("45deg"), [0, 0, 1])','rotationMatrix(1, matrix([0, 0, 1]), "sparse")'],seealso:["cos","sin"]},yX={name:"row",category:"Matrix",syntax:["row(x, index)"],description:"Return a row from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","row(A, 1)","row(A, 2)"],seealso:["column","matrixFromRows"]},xX={name:"size",category:"Matrix",syntax:["size(x)"],description:"Calculate the size of a matrix.",examples:["size(2.3)",'size("hello world")',"a = [1, 2; 3, 4; 5, 6]","size(a)","size(1:6)"],seealso:["concat","count","det","diag","identity","inv","ones","range","squeeze","subset","trace","transpose","zeros"]},bX={name:"sort",category:"Matrix",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"], "natural")',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]},wX={name:"squeeze",category:"Matrix",syntax:["squeeze(x)"],description:"Remove inner and outer singleton dimensions from a matrix.",examples:["a = zeros(3,2,1)","size(squeeze(a))","b = zeros(1,1,3)","size(squeeze(b))"],seealso:["concat","det","diag","identity","inv","ones","range","size","subset","trace","transpose","zeros"]},AX={name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of the entries of a matrix or characters of a string. Indexes are one-based. There should be one index specification for each dimension of the target. Each specification can be a single index, a list of indices, or a range in colon notation `l:u`. In a range, both the lower bound l and upper bound u are included; and if a bound is omitted it defaults to the most extreme valid value. The cartesian product of the indices specified in each dimension determines the target of the operation.",examples:["d = [1, 2; 3, 4]","e = []","e[1, 1:2] = [5, 6]","e[2, :] = [7, 8]","f = d * e","f[2, 1]","f[:, 1]","f[[1,2], [1,3]] = [9, 10; 11, 12]","f"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]},TX={name:"trace",category:"Matrix",syntax:["trace(A)"],description:"Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.",examples:["A = [1, 2, 3; -1, 2, 3; 2, 0, 3]","trace(A)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","transpose","zeros"]},MX={name:"transpose",category:"Matrix",syntax:["x'","transpose(x)"],description:"Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","transpose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},SX={name:"zeros",category:"Matrix",syntax:["zeros(m)","zeros(m, n)","zeros(m, n, p, ...)","zeros([m])","zeros([m, n])","zeros([m, n, p, ...])"],description:"Create a matrix containing zeros.",examples:["zeros(3)","zeros(3, 5)","a = [1, 2, 3; 4, 5, 6]","zeros(size(a))"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose"]},EX={name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]},CX={name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]},DX={name:"combinations",category:"Probability",syntax:["combinations(n, k)"],description:"Compute the number of combinations of n items taken k at a time",examples:["combinations(7, 5)"],seealso:["combinationsWithRep","permutations","factorial"]},LX={name:"combinationsWithRep",category:"Probability",syntax:["combinationsWithRep(n, k)"],description:"Compute the number of combinations of n items taken k at a time with replacements.",examples:["combinationsWithRep(7, 5)"],seealso:["combinations","permutations","factorial"]},PX={name:"factorial",category:"Probability",syntax:["n!","factorial(n)"],description:"Compute the factorial of a value",examples:["5!","5 * 4 * 3 * 2 * 1","3!"],seealso:["combinations","combinationsWithRep","permutations","gamma"]},NX={name:"gamma",category:"Probability",syntax:["gamma(n)"],description:"Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.",examples:["gamma(4)","3!","gamma(1/2)","sqrt(pi)"],seealso:["factorial"]},RX={name:"lgamma",category:"Probability",syntax:["lgamma(n)"],description:"Logarithm of the gamma function for real, positive numbers and complex numbers, using Lanczos approximation for numbers and Stirling series for complex numbers.",examples:["lgamma(4)","lgamma(1/2)","lgamma(i)","lgamma(complex(1.1, 2))"],seealso:["gamma"]},FX={name:"kldivergence",category:"Probability",syntax:["kldivergence(x, y)"],description:"Calculate the Kullback-Leibler (KL) divergence between two distributions.",examples:["kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])"],seealso:[]},IX={name:"multinomial",category:"Probability",syntax:["multinomial(A)"],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:["multinomial([1, 2, 1])"],seealso:["combinations","factorial"]},_X={name:"permutations",category:"Probability",syntax:["permutations(n)","permutations(n, k)"],description:"Compute the number of permutations of n items taken k at a time",examples:["permutations(5)","permutations(5, 3)"],seealso:["combinations","combinationsWithRep","factorial"]},OX={name:"pickRandom",category:"Probability",syntax:["pickRandom(array)","pickRandom(array, number)","pickRandom(array, weights)","pickRandom(array, number, weights)","pickRandom(array, weights, number)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])","pickRandom([1, 3, 1, 6], 2)","pickRandom([1, 3, 1, 6], [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)"],seealso:["random","randomInt"]},zX={name:"random",category:"Probability",syntax:["random()","random(max)","random(min, max)","random(size)","random(size, max)","random(size, min, max)"],description:"Return a random number.",examples:["random()","random(10, 20)","random([2, 3])"],seealso:["pickRandom","randomInt"]},kX={name:"randomInt",category:"Probability",syntax:["randomInt(max)","randomInt(min, max)","randomInt(size)","randomInt(size, max)","randomInt(size, min, max)"],description:"Return a random integer number",examples:["randomInt(10, 20)","randomInt([2, 3], 10)"],seealso:["pickRandom","random"]},BX={name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compareNatural","compareText"]},UX={name:"compareNatural",category:"Relational",syntax:["compareNatural(x, y)"],description:"Compare two values of any type in a deterministic, natural way. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compareNatural(2, 3)","compareNatural(3, 2)","compareNatural(2, 2)","compareNatural(5cm, 40mm)",'compareNatural("2", "10")',"compareNatural(2 + 3i, 2 + 4i)","compareNatural([1, 2, 4], [1, 2, 3])","compareNatural([1, 5], [1, 2, 3])","compareNatural([1, 2], [1, 2])","compareNatural({a: 2}, {a: 4})"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare","compareText"]},HX={name:"compareText",category:"Relational",syntax:["compareText(x, y)"],description:"Compare two strings lexically. Comparison is case sensitive. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:['compareText("B", "A")','compareText("A", "B")','compareText("A", "A")','compareText("2", "10")','compare("2", "10")',"compare(2, 10)",'compareNatural("2", "10")','compareText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural"]},VX={name:"deepEqual",category:"Relational",syntax:["deepEqual(x, y)"],description:"Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.",examples:["deepEqual([1,3,4], [1,3,4])","deepEqual([1,3,4], [1,3])"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]},GX={name:"equal",category:"Relational",syntax:["x == y","equal(x, y)"],description:"Check equality of two values. Returns true if the values are equal, and false if not.",examples:["2+2 == 3","2+2 == 4","a = 3.2","b = 6-2.8","a == b","50cm == 0.5m"],seealso:["unequal","smaller","larger","smallerEq","largerEq","compare","deepEqual","equalText"]},WX={name:"equalText",category:"Relational",syntax:["equalText(x, y)"],description:"Check equality of two strings. Comparison is case sensitive. Returns true if the values are equal, and false if not.",examples:['equalText("Hello", "Hello")','equalText("a", "A")','equal("2e3", "2000")','equalText("2e3", "2000")','equalText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural","compareText","equal"]},YX={name:"larger",category:"Relational",syntax:["x > y","larger(x, y)"],description:"Check if value x is larger than y. Returns true if x is larger than y, and false if not.",examples:["2 > 3","5 > 2*2","a = 3.3","b = 6-2.8","(a > b)","(b < a)","5 cm > 2 inch"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]},ZX={name:"largerEq",category:"Relational",syntax:["x >= y","largerEq(x, y)"],description:"Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.",examples:["2 >= 1+1","2 > 1+1","a = 3.2","b = 6-2.8","(a >= b)"],seealso:["equal","unequal","smallerEq","smaller","compare"]},XX={name:"smaller",category:"Relational",syntax:["x < y","smaller(x, y)"],description:"Check if value x is smaller than value y. Returns true if x is smaller than y, and false if not.",examples:["2 < 3","5 < 2*2","a = 3.3","b = 6-2.8","(a < b)","5 cm < 2 inch"],seealso:["equal","unequal","larger","smallerEq","largerEq","compare"]},jX={name:"smallerEq",category:"Relational",syntax:["x <= y","smallerEq(x, y)"],description:"Check if value x is smaller or equal to value y. Returns true if x is smaller than y, and false if not.",examples:["2 <= 1+1","2 < 1+1","a = 3.2","b = 6-2.8","(a <= b)"],seealso:["equal","unequal","larger","smaller","largerEq","compare"]},$X={name:"unequal",category:"Relational",syntax:["x != y","unequal(x, y)"],description:"Check unequality of two values. Returns true if the values are unequal, and false if they are equal.",examples:["2+2 != 3","2+2 != 4","a = 3.2","b = 6-2.8","a != b","50cm != 0.5m","5 cm != 2 inch"],seealso:["equal","smaller","larger","smallerEq","largerEq","compare","deepEqual"]},KX={name:"setCartesian",category:"Set",syntax:["setCartesian(set1, set2)"],description:"Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays and the values will be sorted in ascending order before the operation.",examples:["setCartesian([1, 2], [3, 4])"],seealso:["setUnion","setIntersect","setDifference","setPowerset"]},JX={name:"setDifference",category:"Set",syntax:["setDifference(set1, set2)"],description:"Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setDifference([1, 2, 3, 4], [3, 4, 5, 6])","setDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setSymDifference"]},QX={name:"setDistinct",category:"Set",syntax:["setDistinct(set)"],description:"Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setDistinct([1, 1, 1, 2, 2, 3])"],seealso:["setMultiplicity"]},qX={name:"setIntersect",category:"Set",syntax:["setIntersect(set1, set2)"],description:"Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIntersect([1, 2, 3, 4], [3, 4, 5, 6])","setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setDifference"]},ej={name:"setIsSubset",category:"Set",syntax:["setIsSubset(set1, set2)"],description:"Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIsSubset([1, 2], [3, 4, 5, 6])","setIsSubset([3, 4], [3, 4, 5, 6])"],seealso:["setUnion","setIntersect","setDifference"]},tj={name:"setMultiplicity",category:"Set",syntax:["setMultiplicity(element, set)"],description:"Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setMultiplicity(1, [1, 2, 2, 4])","setMultiplicity(2, [1, 2, 2, 4])"],seealso:["setDistinct","setSize"]},rj={name:"setPowerset",category:"Set",syntax:["setPowerset(set)"],description:"Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setPowerset([1, 2, 3])"],seealso:["setCartesian"]},nj={name:"setSize",category:"Set",syntax:["setSize(set)","setSize(set, unique)"],description:'Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.',examples:["setSize([1, 2, 2, 4])","setSize([1, 2, 2, 4], true)"],seealso:["setUnion","setIntersect","setDifference"]},aj={name:"setSymDifference",category:"Set",syntax:["setSymDifference(set1, set2)"],description:"Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setSymDifference([1, 2, 3, 4], [3, 4, 5, 6])","setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setDifference"]},ij={name:"setUnion",category:"Set",syntax:["setUnion(set1, set2)"],description:"Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setUnion([1, 2, 3, 4], [3, 4, 5, 6])","setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setIntersect","setDifference"]},oj={name:"erf",category:"Special",syntax:["erf(x)"],description:"Compute the erf function of a value using a rational Chebyshev approximations for different intervals of x",examples:["erf(0.2)","erf(-0.5)","erf(4)"],seealso:[]},sj={name:"mad",category:"Statistics",syntax:["mad(a, b, c, ...)","mad(A)"],description:"Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.",examples:["mad(10, 20, 30)","mad([1, 2, 3])"],seealso:["mean","median","std","abs"]},lj={name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dimension)"],description:"Compute the maximum value of a list of values.",examples:["max(2, 3, 4, 1)","max([2, 3, 4, 1])","max([2, 5; 4, 3])","max([2, 5; 4, 3], 1)","max([2, 5; 4, 3], 2)","max(2.7, 7.1, -4.5, 2.0, 4.1)","min(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["mean","median","min","prod","std","sum","variance"]},uj={name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dimension)"],description:"Compute the arithmetic mean of a list of values.",examples:["mean(2, 3, 4, 1)","mean([2, 3, 4, 1])","mean([2, 5; 4, 3])","mean([2, 5; 4, 3], 1)","mean([2, 5; 4, 3], 2)","mean([1.0, 2.7, 3.2, 4.0])"],seealso:["max","median","min","prod","std","sum","variance"]},fj={name:"median",category:"Statistics",syntax:["median(a, b, c, ...)","median(A)"],description:"Compute the median of all values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned.",examples:["median(5, 2, 7)","median([3, -1, 5, 7])"],seealso:["max","mean","min","prod","std","sum","variance","quantileSeq"]},cj={name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dimension)"],description:"Compute the minimum value of a list of values.",examples:["min(2, 3, 4, 1)","min([2, 3, 4, 1])","min([2, 5; 4, 3])","min([2, 5; 4, 3], 1)","min([2, 5; 4, 3], 2)","min(2.7, 7.1, -4.5, 2.0, 4.1)","max(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["max","mean","median","prod","std","sum","variance"]},hj={name:"mode",category:"Statistics",syntax:["mode(a, b, c, ...)","mode(A)","mode(A, a, b, B, c, ...)"],description:"Computes the mode of all values as an array. In case mode being more than one, multiple values are returned in an array.",examples:["mode(2, 1, 4, 3, 1)","mode([1, 2.7, 3.2, 4, 2.7])","mode(1, 4, 6, 1, 6)"],seealso:["max","mean","min","median","prod","std","sum","variance"]},vj={name:"prod",category:"Statistics",syntax:["prod(a, b, c, ...)","prod(A)"],description:"Compute the product of all values.",examples:["prod(2, 3, 4)","prod([2, 3, 4])","prod([2, 5; 4, 3])"],seealso:["max","mean","min","median","min","std","sum","variance"]},dj={name:"quantileSeq",category:"Statistics",syntax:["quantileSeq(A, prob[, sorted])","quantileSeq(A, [prob1, prob2, ...][, sorted])","quantileSeq(A, N[, sorted])"],description:`Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. Supported types of sequence values are: Number, BigNumber, Unit Supported types of probablity are: Number, BigNumber. -In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]},pj={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]},gj={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]},mj={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]},yj={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]},xj={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]},bj={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]},wj={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]},Aj={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]},Tj={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]},Mj={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]},Sj={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]},Ej={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]},Cj={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]},Dj={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]},Lj={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]},Pj={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]},Nj={name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]},Rj={name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]},Fj={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]},Ij={name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]},_j={name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]},Oj={name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]},zj={name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]},kj={name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]},Bj={name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]},Uj={name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]},Hj={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]},Vj={name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]},Gj={name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]},Wj={name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]},Yj={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]},Zj={name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables,and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]},Xj={name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]},jj={name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]},$j={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]},Kj={name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]},Jj={name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero"]},Qj={name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]},qj={name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue"]},e$={name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},t$={name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},r$={name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]},n$={name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "BigNumber")','numeric("4", "Fraction)','numeric(4, "Fraction")','numeric(fraction(2, 5), "number)'],seealso:["number","fraction","bignumber","string","format"]},a$={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]},i$={name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $0, $1, $2", [6, 9, 4])'],seealso:["format"]},o$={name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]},s$={bignumber:rY,boolean:nY,complex:aY,createUnit:iY,fraction:oY,index:sY,matrix:lY,number:uY,sparse:fY,splitUnit:cY,string:hY,unit:vY,e:UM,E:UM,false:HW,i:VW,Infinity:GW,LN2:YW,LN10:WW,LOG2E:XW,LOG10E:ZW,NaN:jW,null:$W,pi:HM,PI:HM,phi:KW,SQRT1_2:JW,SQRT2:QW,tau:qW,true:eY,version:tY,speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant",examples:["coulomb"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Borh magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Borh radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:mY,lsolve:xY,lsolveAll:bY,lup:wY,lusolve:AY,leafCount:yY,polynomialRoot:TY,resolve:EY,simplify:CY,simplifyConstant:DY,simplifyCore:LY,symbolicEqual:NY,rationalize:SY,slu:PY,usolve:RY,usolveAll:FY,qr:MY,abs:IY,add:_Y,cbrt:OY,ceil:zY,cube:kY,divide:BY,dotDivide:UY,dotMultiply:HY,dotPow:VY,exp:GY,expm:WY,expm1:YY,fix:ZY,floor:XY,gcd:jY,hypot:$Y,lcm:JY,log:QY,log2:tZ,log1p:eZ,log10:qY,mod:rZ,multiply:nZ,norm:aZ,nthRoot:iZ,nthRoots:oZ,pow:sZ,round:lZ,sign:uZ,sqrt:fZ,sqrtm:cZ,square:pZ,subtract:gZ,unaryMinus:mZ,unaryPlus:yZ,xgcd:xZ,invmod:KY,bitAnd:bZ,bitNot:wZ,bitOr:AZ,bitXor:TZ,leftShift:MZ,rightArithShift:SZ,rightLogShift:EZ,bellNumbers:CZ,catalan:DZ,composition:LZ,stirlingS2:PZ,config:dY,import:pY,typed:gY,arg:NZ,conj:RZ,re:IZ,im:FZ,evaluate:_Z,help:OZ,distance:zZ,intersect:kZ,and:BZ,not:UZ,or:HZ,xor:VZ,concat:WZ,count:YZ,cross:ZZ,column:GZ,ctranspose:XZ,det:jZ,diag:$Z,diff:KZ,dot:JZ,getMatrixDataType:rX,identity:nX,filter:qZ,flatten:eX,forEach:tX,inv:aX,pinv:iX,eigs:QZ,kron:oX,matrixFromFunction:uX,matrixFromRows:fX,matrixFromColumns:lX,map:sX,ones:cX,partitionSelect:hX,range:vX,resize:pX,reshape:dX,rotate:gX,rotationMatrix:mX,row:yX,size:xX,sort:bX,squeeze:wX,subset:AX,trace:TX,transpose:MX,zeros:SX,fft:EX,ifft:CX,sylvester:hZ,schur:vZ,lyap:dZ,combinations:DX,combinationsWithRep:LX,factorial:PX,gamma:NX,kldivergence:FX,lgamma:RX,multinomial:IX,permutations:_X,pickRandom:OX,random:zX,randomInt:kX,compare:BX,compareNatural:UX,compareText:HX,deepEqual:VX,equal:GX,equalText:WX,larger:YX,largerEq:ZX,smaller:XX,smallerEq:jX,unequal:$X,setCartesian:KX,setDifference:JX,setDistinct:QX,setIntersect:qX,setIsSubset:ej,setMultiplicity:tj,setPowerset:rj,setSize:nj,setSymDifference:aj,setUnion:ij,erf:oj,cumsum:gj,mad:sj,max:lj,mean:uj,median:fj,min:cj,mode:hj,prod:vj,quantileSeq:dj,std:pj,sum:mj,variance:yj,acos:xj,acosh:bj,acot:wj,acoth:Aj,acsc:Tj,acsch:Mj,asec:Sj,asech:Ej,asin:Cj,asinh:Dj,atan:Lj,atanh:Nj,atan2:Pj,cos:Rj,cosh:Fj,cot:Ij,coth:_j,csc:Oj,csch:zj,sec:kj,sech:Bj,sin:Uj,sinh:Hj,tan:Vj,tanh:Gj,to:Wj,clone:Zj,format:Xj,bin:Yj,oct:a$,hex:$j,isNaN:Jj,isInteger:Kj,isNegative:Qj,isNumeric:qj,hasNumericValue:jj,isPositive:e$,isPrime:t$,isZero:r$,print:i$,typeOf:o$,numeric:n$},VM="help",l$=["typed","mathWithTransform","Help"],u$=Lr(VM,l$,T=>{var{typed:N,mathWithTransform:V,Help:Y}=T;return N(VM,{any:function(J){var R,F=J;if(typeof J!="string"){for(R in V)if(ka(V,R)&&J===V[R]){F=R;break}}var e=lf(s$,F);if(!e){var i=typeof F=="function"?F.name:F;throw new Error('No documentation found on "'+i+'"')}return new Y(e)}})}),GM="chain",f$=["typed","Chain"],c$=Lr(GM,f$,T=>{var{typed:N,Chain:V}=T;return N(GM,{"":function(){return new V},any:function(X){return new V(X)}})}),WM="det",h$=["typed","matrix","subtract","multiply","divideScalar","isZero","unaryMinus"],v$=Lr(WM,h$,T=>{var{typed:N,matrix:V,subtract:Y,multiply:X,divideScalar:J,isZero:R,unaryMinus:F}=T;return N(WM,{any:function(m){return ei(m)},"Array | Matrix":function(m){var t;switch(Qa(m)?t=m.size():Array.isArray(m)?(m=V(m),t=m.size()):t=[],t.length){case 0:return ei(m);case 1:if(t[0]===1)return ei(m.valueOf()[0]);if(t[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+vi(t)+")");case 2:{var y=t[0],p=t[1];if(y===p)return e(m.clone().valueOf(),y);if(p===0)return 1;throw new RangeError("Matrix must be square (size: "+vi(t)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+vi(t)+")")}}});function e(i,m,t){if(m===1)return ei(i[0][0]);if(m===2)return Y(X(i[0][0],i[1][1]),X(i[1][0],i[0][1]));for(var y=!1,p=new Array(m).fill(0).map((b,g)=>g),l=0;l{var{typed:N,matrix:V,divideScalar:Y,addScalar:X,multiply:J,unaryMinus:R,det:F,identity:e,abs:i}=T;return N(YM,{"Array | Matrix":function(y){var p=Qa(y)?y.size():Si(y);switch(p.length){case 1:if(p[0]===1)return Qa(y)?V([Y(1,y.valueOf()[0])]):[Y(1,y[0])];throw new RangeError("Matrix must be square (size: "+vi(p)+")");case 2:{var l=p[0],d=p[1];if(l===d)return Qa(y)?V(m(y.valueOf(),l,d),y.storage()):m(y,l,d);throw new RangeError("Matrix must be square (size: "+vi(p)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+vi(p)+")")}},any:function(y){return Y(1,y)}});function m(t,y,p){var l,d,r,n,u;if(y===1){if(n=t[0][0],n===0)throw Error("Cannot calculate inverse, determinant is zero");return[[Y(1,n)]]}else if(y===2){var a=F(t);if(a===0)throw Error("Cannot calculate inverse, determinant is zero");return[[Y(t[1][1],a),Y(R(t[0][1]),a)],[Y(R(t[1][0]),a),Y(t[0][0],a)]]}else{var o=t.concat();for(l=0;lb&&(b=i(o[l][s]),g=l),l++;if(b===0)throw Error("Cannot calculate inverse, determinant is zero");l=g,l!==s&&(u=o[s],o[s]=o[l],o[l]=u,u=c[s],c[s]=c[l],c[l]=u);var A=o[s],v=c[s];for(l=0;l{var{typed:N,matrix:V,inv:Y,deepEqual:X,equal:J,dotDivide:R,dot:F,ctranspose:e,divideScalar:i,multiply:m,add:t,Complex:y}=T;return N(ZM,{"Array | Matrix":function(a){var o=Qa(a)?a.size():Si(a);switch(o.length){case 1:return n(a)?e(a):o[0]===1?Y(a):R(e(a),F(a,a));case 2:{if(n(a))return e(a);var c=o[0],s=o[1];if(c===s)try{return Y(a)}catch(b){if(!(b instanceof Error&&b.message.match(/Cannot calculate inverse, determinant is zero/)))throw b}return Qa(a)?V(p(a.valueOf(),c,s),a.storage()):p(a,c,s)}default:throw new RangeError("Matrix must be two dimensional (size: "+vi(o)+")")}},any:function(a){return J(a,0)?ei(a):i(1,a)}});function p(u,a,o){var{C:c,F:s}=d(u,a,o),b=m(Y(m(e(c),c)),e(c)),g=m(e(s),Y(m(s,e(s))));return m(g,b)}function l(u,a,o){for(var c=ei(u),s=0,b=0;bg.filter((v,h)=>h!r(F(c[A],c[A])));return{C:s,F:b}}function r(u){return J(t(u,y(1,1)),t(0,y(1,1)))}function n(u){return X(t(u,y(1,1)),t(m(u,0),y(1,1)))}});function y$(T){var{addScalar:N,subtract:V,flatten:Y,multiply:X,multiplyScalar:J,divideScalar:R,sqrt:F,abs:e,bignumber:i,diag:m,inv:t,qr:y,usolve:p,usolveAll:l,equal:d,complex:r,larger:n,smaller:u,matrixFromColumns:a,dot:o}=T;function c(P,E,k,O,G){G===void 0&&(G=!0);var z=s(P,E,k,O,G);b(P,E,k,O,G,z);var{values:U,C:H}=g(P,E,k,O,G),B;return G&&(B=A(P,E,H,z,U,k,O),B=a(...B)),{values:U,vectors:B}}function s(P,E,k,O,G){var z=O==="BigNumber",U=O==="Complex",H=z?i(0):0,B=z?i(1):U?r(1):1,W=z?i(1):1,q=z?i(10):2,re=J(q,q),ie;G&&(ie=Array(E).fill(B));for(var le=!1;!le;){le=!0;for(var he=0;he1&&(le=m(Array(q-1).fill(H)))),q-=1,B.pop();for(var fe=0;fe2&&(le=m(Array(q-2).fill(H)))),q-=2,B.pop(),B.pop();for(var ne=0;ne+V(e(de),e(we))),he>100){var ce=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+W.join(", "));throw ce.values=W,ce.vectors=[],ce}var oe=G?X(ie,C(re,E)):void 0;return{values:W,C:oe}}function A(P,E,k,O,G,z,U){var H=t(k),B=X(H,P,k),W=U==="BigNumber",q=U==="Complex",re=W?i(0):q?r(0):0,ie=W?i(1):q?r(1):1,le=[],he=[];for(var $ of G){var Z=D(le,$,d);Z===-1?(le.push($),he.push(1)):he[Z]+=1}for(var K=[],Q=le.length,ae=Array(E).fill(re),fe=m(Array(E).fill(ie)),te=[],ne=function(){var we=le[ce],Se=V(B,X(we,fe)),Te=l(Se,ae);for(Te.shift();Te.lengthX(Ie,Me)),K.push(...Te.map(Me=>Y(Me)))},ce=0;ce=5)return null;for(H=0;;){var B=p(P,U);if(u(S(M(U,[B])),O))break;if(++H>=10)return null;U=f(B)}return U}function w(P,E,k){var O=k==="BigNumber",G=k==="Complex",z=Array(P).fill(0).map(U=>2*Math.random()-1);return O&&(z=z.map(U=>i(U))),G&&(z=z.map(U=>r(U))),z=M(z,E),f(z,k)}function M(P,E){for(var k of E)P=V(P,X(R(o(k,P),o(k,k)),k));return P}function S(P){return e(F(o(P,P)))}function f(P,E){var k=E==="BigNumber",O=E==="Complex",G=k?i(1):O?r(1):1;return X(R(G,S(P)),P)}return c}function x$(T){var{config:N,addScalar:V,subtract:Y,abs:X,atan:J,cos:R,sin:F,multiplyScalar:e,inv:i,bignumber:m,multiply:t,add:y}=T;function p(v,h){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:N.epsilon,C=arguments.length>3?arguments[3]:void 0;if(C==="number")return l(v,x);if(C==="BigNumber")return d(v,x);throw TypeError("Unsupported data type: "+C)}function l(v,h){for(var x=v.length,C=Math.abs(h/x),D,L=new Array(x),w=0;w=Math.abs(C);){var S=M[0][0],f=M[0][1];D=r(v[S][S],v[f][f],v[S][f]),v=c(v,D,S,f),L=u(L,D,S,f),M=s(v)}for(var P=A(x,0),E=0;E=X(C);){var S=M[0][0],f=M[0][1];D=n(v[S][S],v[f][f],v[S][f]),v=o(v,D,S,f),L=a(L,D,S,f),M=b(v)}for(var P=A(x,0),E=0;E{var{config:N,typed:V,matrix:Y,addScalar:X,subtract:J,equal:R,abs:F,atan:e,cos:i,sin:m,multiplyScalar:t,divideScalar:y,inv:p,bignumber:l,multiply:d,add:r,larger:n,column:u,flatten:a,number:o,complex:c,sqrt:s,diag:b,qr:g,usolve:A,usolveAll:v,im:h,re:x,smaller:C,matrixFromColumns:D,dot:L}=T,w=x$({config:N,addScalar:X,subtract:J,column:u,flatten:a,equal:R,abs:F,atan:e,cos:i,sin:m,multiplyScalar:t,inv:p,bignumber:l,complex:c,multiply:d,add:r}),M=y$({config:N,addScalar:X,subtract:J,multiply:d,multiplyScalar:t,flatten:a,divideScalar:y,sqrt:s,abs:F,bignumber:l,diag:b,qr:g,inv:p,usolve:A,usolveAll:v,equal:R,complex:c,larger:n,smaller:C,matrixFromColumns:D,dot:L});return V("eigs",{Array:function(G){var z=Y(G);return S(z)},"Array, number|BigNumber":function(G,z){var U=Y(G);return S(U,z)},Matrix:function(G){var{values:z,vectors:U}=S(G);return{values:Y(z),vectors:Y(U)}},"Matrix, number|BigNumber":function(G,z){var{values:U,vectors:H}=S(G,z);return{values:Y(U),vectors:Y(H)}}});function S(O,G){G===void 0&&(G=N.epsilon);var z=O.size();if(z.length!==2||z[0]!==z[1])throw new RangeError("Matrix must be square (size: "+vi(z)+")");var U=O.toArray(),H=z[0];if(P(U,H,G)&&(E(U,H),f(U,H,G))){var B=k(O,U,H);return w(U,H,G,B)}var W=k(O,U,H);return M(U,H,G,W)}function f(O,G,z){for(var U=0;U{var{typed:N,abs:V,add:Y,identity:X,inv:J,multiply:R}=T;return N(XM,{Matrix:function(t){var y=t.size();if(y.length!==2||y[0]!==y[1])throw new RangeError("Matrix must be square (size: "+vi(y)+")");for(var p=y[0],l=1e-15,d=F(t),r=e(d,l),n=r.q,u=r.j,a=R(t,Math.pow(2,-u)),o=X(p),c=X(p),s=1,b=a,g=-1,A=1;A<=n;A++)A>1&&(b=R(b,a),g=-g),s=s*(n-A+1)/((2*n-A+1)*A),o=Y(o,R(s,b)),c=Y(c,R(s*g,b));for(var v=R(J(c),o),h=0;h{var{typed:N,abs:V,add:Y,multiply:X,map:J,sqrt:R,subtract:F,inv:e,size:i,max:m,identity:t}=T,y=1e3,p=1e-6;function l(d){var r,n=0,u=d,a=t(i(d));do{var o=u;if(u=X(.5,Y(o,e(a))),a=X(.5,Y(a,e(o))),r=m(V(F(u,o))),r>p&&++n>y)throw new Error("computing square root of matrix: iterative method could not converge")}while(r>p);return u}return N(jM,{"Array | Matrix":function(r){var n=Qa(r)?r.size():Si(r);switch(n.length){case 1:if(n[0]===1)return J(r,R);throw new RangeError("Matrix must be square (size: "+vi(n)+")");case 2:{var u=n[0],a=n[1];if(u===a)return l(r);throw new RangeError("Matrix must be square (size: "+vi(n)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+vi(n)+")")}}})}),$M="sylvester",C$=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],D$=Lr($M,C$,T=>{var{typed:N,schur:V,matrixFromColumns:Y,matrix:X,multiply:J,range:R,concat:F,transpose:e,index:i,subset:m,add:t,subtract:y,identity:p,lusolve:l,abs:d}=T;return N($M,{"Matrix, Matrix, Matrix":r,"Array, Matrix, Matrix":function(u,a,o){return r(X(u),a,o)},"Array, Array, Matrix":function(u,a,o){return r(X(u),X(a),o)},"Array, Matrix, Array":function(u,a,o){return r(X(u),a,X(o))},"Matrix, Array, Matrix":function(u,a,o){return r(u,X(a),o)},"Matrix, Array, Array":function(u,a,o){return r(u,X(a),X(o))},"Matrix, Matrix, Array":function(u,a,o){return r(u,a,X(o))},"Array, Array, Array":function(u,a,o){return r(X(u),X(a),X(o)).toArray()}});function r(n,u,a){for(var o=u.size()[0],c=n.size()[0],s=V(n),b=s.T,g=s.U,A=V(J(-1,u)),v=A.T,h=A.U,x=J(J(e(g),a),h),C=R(0,c),D=[],L=(ie,le)=>F(ie,le,1),w=(ie,le)=>F(ie,le,0),M=0;M1e-5){for(var S=w(m(x,i(C,M)),m(x,i(C,M+1))),f=0;f{var{typed:N,matrix:V,identity:Y,multiply:X,qr:J,norm:R,subtract:F}=T;return N(KM,{Array:function(m){var t=e(V(m));return{U:t.U.valueOf(),T:t.T.valueOf()}},Matrix:function(m){return e(m)}});function e(i){var m=i.size()[0],t=i,y=Y(m),p=0,l;do{l=t;var d=J(t),r=d.Q,n=d.R;if(t=X(n,r),y=X(y,r),p++>100)break}while(R(F(t,l))>1e-4);return{U:y,T:t}}}),JM="lyap",N$=["typed","matrix","sylvester","multiply","transpose"],R$=Lr(JM,N$,T=>{var{typed:N,matrix:V,sylvester:Y,multiply:X,transpose:J}=T;return N(JM,{"Matrix, Matrix":function(F,e){return Y(F,J(F),X(-1,e))},"Array, Matrix":function(F,e){return Y(V(F),J(V(F)),X(-1,e))},"Matrix, Array":function(F,e){return Y(F,J(V(F)),V(X(-1,e)))},"Array, Array":function(F,e){return Y(V(F),J(V(F)),V(X(-1,e))).toArray()}})}),F$="divide",I$=["typed","matrix","multiply","equalScalar","divideScalar","inv"],_$=Lr(F$,I$,T=>{var{typed:N,matrix:V,multiply:Y,equalScalar:X,divideScalar:J,inv:R}=T,F=qs({typed:N,equalScalar:X}),e=Jf({typed:N});return N("divide",n8({"Array | Matrix, Array | Matrix":function(m,t){return Y(m,R(t))},"DenseMatrix, any":function(m,t){return e(m,t,J,!1)},"SparseMatrix, any":function(m,t){return F(m,t,J,!1)},"Array, any":function(m,t){return e(V(m),t,J,!1).valueOf()},"any, Array | Matrix":function(m,t){return Y(m,R(t))}},J.signatures))}),QM="distance",O$=["typed","addScalar","subtract","divideScalar","multiplyScalar","unaryMinus","sqrt","abs"],z$=Lr(QM,O$,T=>{var{typed:N,addScalar:V,subtract:Y,multiplyScalar:X,divideScalar:J,unaryMinus:R,sqrt:F,abs:e}=T;return N(QM,{"Array, Array, Array":function(c,s,b){if(c.length===2&&s.length===2&&b.length===2){if(!m(c))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!m(s))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!m(b))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");var g=J(Y(b[1],b[0]),Y(s[1],s[0])),A=X(X(g,g),s[0]),v=R(X(g,s[0])),h=c[1];return r(c[0],c[1],A,v,h)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(c,s,b){if(Object.keys(c).length===2&&Object.keys(s).length===2&&Object.keys(b).length===2){if(!m(c))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!m(s))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!m(b))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if("pointX"in c&&"pointY"in c&&"lineOnePtX"in s&&"lineOnePtY"in s&&"lineTwoPtX"in b&&"lineTwoPtY"in b){var g=J(Y(b.lineTwoPtY,b.lineTwoPtX),Y(s.lineOnePtY,s.lineOnePtX)),A=X(X(g,g),s.lineOnePtX),v=R(X(g,s.lineOnePtX)),h=c.pointX;return r(c.pointX,c.pointY,A,v,h)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(c,s){if(c.length===2&&s.length===3){if(!m(c))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!t(s))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return r(c[0],c[1],s[0],s[1],s[2])}else if(c.length===3&&s.length===6){if(!t(c))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!p(s))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return n(c[0],c[1],c[2],s[0],s[1],s[2],s[3],s[4],s[5])}else if(c.length===s.length&&c.length>0){if(!y(c))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!y(s))throw new TypeError("All values of an array should be numbers or BigNumbers");return u(c,s)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(c,s){if(Object.keys(c).length===2&&Object.keys(s).length===3){if(!m(c))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!t(s))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in c&&"pointY"in c&&"xCoeffLine"in s&&"yCoeffLine"in s&&"constant"in s)return r(c.pointX,c.pointY,s.xCoeffLine,s.yCoeffLine,s.constant);throw new TypeError("Key names do not match")}else if(Object.keys(c).length===3&&Object.keys(s).length===6){if(!t(c))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!p(s))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in c&&"pointY"in c&&"x0"in s&&"y0"in s&&"z0"in s&&"a"in s&&"b"in s&&"c"in s)return n(c.pointX,c.pointY,c.pointZ,s.x0,s.y0,s.z0,s.a,s.b,s.c);throw new TypeError("Key names do not match")}else if(Object.keys(c).length===2&&Object.keys(s).length===2){if(!m(c))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!m(s))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in c&&"pointOneY"in c&&"pointTwoX"in s&&"pointTwoY"in s)return u([c.pointOneX,c.pointOneY],[s.pointTwoX,s.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(c).length===3&&Object.keys(s).length===3){if(!t(c))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!t(s))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in c&&"pointOneY"in c&&"pointOneZ"in c&&"pointTwoX"in s&&"pointTwoY"in s&&"pointTwoZ"in s)return u([c.pointOneX,c.pointOneY,c.pointOneZ],[s.pointTwoX,s.pointTwoY,s.pointTwoZ]);throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},Array:function(c){if(!d(c))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return a(c)}});function i(o){return typeof o=="number"||Ei(o)}function m(o){return o.constructor!==Array&&(o=l(o)),i(o[0])&&i(o[1])}function t(o){return o.constructor!==Array&&(o=l(o)),i(o[0])&&i(o[1])&&i(o[2])}function y(o){return Array.isArray(o)||(o=l(o)),o.every(i)}function p(o){return o.constructor!==Array&&(o=l(o)),i(o[0])&&i(o[1])&&i(o[2])&&i(o[3])&&i(o[4])&&i(o[5])}function l(o){for(var c=Object.keys(o),s=[],b=0;bc.length!==2||!i(c[0])||!i(c[1])))return!1}else if(o[0].length===3&&i(o[0][0])&&i(o[0][1])&&i(o[0][2])){if(o.some(c=>c.length!==3||!i(c[0])||!i(c[1])||!i(c[2])))return!1}else return!1;return!0}function r(o,c,s,b,g){var A=e(V(V(X(s,o),X(b,c)),g)),v=F(V(X(s,s),X(b,b)));return J(A,v)}function n(o,c,s,b,g,A,v,h,x){var C=[Y(X(Y(g,c),x),X(Y(A,s),h)),Y(X(Y(A,s),v),X(Y(b,o),x)),Y(X(Y(b,o),h),X(Y(g,c),v))];C=F(V(V(X(C[0],C[0]),X(C[1],C[1])),X(C[2],C[2])));var D=F(V(V(X(v,v),X(h,h)),X(x,x)));return J(C,D)}function u(o,c){for(var s=o.length,b=0,g=0,A=0;A{var{typed:N,config:V,abs:Y,add:X,addScalar:J,matrix:R,multiply:F,multiplyScalar:e,divideScalar:i,subtract:m,smaller:t,equalScalar:y,flatten:p,isZero:l,isNumeric:d}=T;return N("intersect",{"Array, Array, Array":r,"Array, Array, Array, Array":n,"Matrix, Matrix, Matrix":function(h,x,C){var D=r(h.valueOf(),x.valueOf(),C.valueOf());return D===null?null:R(D)},"Matrix, Matrix, Matrix, Matrix":function(h,x,C,D){var L=n(h.valueOf(),x.valueOf(),C.valueOf(),D.valueOf());return L===null?null:R(L)}});function r(v,h,x){if(v=u(v),h=u(h),x=u(x),!o(v))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!o(h))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!c(x))throw new TypeError("Array with 4 numbers expected as third argument");return A(v[0],v[1],v[2],h[0],h[1],h[2],x[0],x[1],x[2],x[3])}function n(v,h,x,C){if(v=u(v),h=u(h),x=u(x),C=u(C),v.length===2){if(!a(v))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!a(h))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!a(x))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!a(C))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return s(v,h,x,C)}else if(v.length===3){if(!o(v))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!o(h))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!o(x))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!o(C))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return g(v[0],v[1],v[2],h[0],h[1],h[2],x[0],x[1],x[2],C[0],C[1],C[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function u(v){return v.length===1?v[0]:v.length>1&&Array.isArray(v[0])&&v.every(h=>Array.isArray(h)&&h.length===1)?p(v):v}function a(v){return v.length===2&&d(v[0])&&d(v[1])}function o(v){return v.length===3&&d(v[0])&&d(v[1])&&d(v[2])}function c(v){return v.length===4&&d(v[0])&&d(v[1])&&d(v[2])&&d(v[3])}function s(v,h,x,C){var D=v,L=x,w=m(D,h),M=m(L,C),S=m(e(w[0],M[1]),e(M[0],w[1]));if(l(S)||t(Y(S),V.epsilon))return null;var f=e(M[0],D[1]),P=e(M[1],D[0]),E=e(M[0],L[1]),k=e(M[1],L[0]),O=i(J(m(m(f,P),E),k),S);return X(F(w,O),D)}function b(v,h,x,C,D,L,w,M,S,f,P,E){var k=e(m(v,h),m(x,C)),O=e(m(D,L),m(w,M)),G=e(m(S,f),m(P,E));return J(J(k,O),G)}function g(v,h,x,C,D,L,w,M,S,f,P,E){var k=b(v,w,f,w,h,M,P,M,x,S,E,S),O=b(f,w,C,v,P,M,D,h,E,S,L,x),G=b(v,w,C,v,h,M,D,h,x,S,L,x),z=b(f,w,f,w,P,M,P,M,E,S,E,S),U=b(C,v,C,v,D,h,D,h,L,x,L,x),H=m(e(k,O),e(G,z)),B=m(e(U,z),e(O,O));if(l(B))return null;var W=i(H,B),q=i(J(k,e(W,O)),z),re=J(v,e(W,m(C,v))),ie=J(h,e(W,m(D,h))),le=J(x,e(W,m(L,x))),he=J(w,e(q,m(f,w))),$=J(M,e(q,m(P,M))),Z=J(S,e(q,m(E,S)));return y(re,he)&&y(ie,$)&&y(le,Z)?[re,ie,le]:null}function A(v,h,x,C,D,L,w,M,S,f){var P=e(v,w),E=e(C,w),k=e(h,M),O=e(D,M),G=e(x,S),z=e(L,S),U=m(m(m(f,P),k),G),H=m(m(m(J(J(E,O),z),P),k),G),B=i(U,H),W=J(v,e(B,m(C,v))),q=J(h,e(B,m(D,h))),re=J(x,e(B,m(L,x)));return[W,q,re]}}),qM="sum",H$=["typed","config","add","numeric"],YC=Lr(qM,H$,T=>{var{typed:N,config:V,add:Y,numeric:X}=T;return N(qM,{"Array | Matrix":J,"Array | Matrix, number | BigNumber":R,"...":function(e){if(g0(e))throw new TypeError("Scalar values expected in function sum");return J(e)}});function J(F){var e;return Rh(F,function(i){try{e=e===void 0?i:Y(e,i)}catch(m){throw Bl(m,"sum",i)}}),e===void 0&&(e=X(0,V.number)),typeof e=="string"&&(e=X(e,V.number)),e}function R(F,e){try{var i=V1(F,e,Y);return i}catch(m){throw Bl(m,"sum")}}}),vy="cumsum",V$=["typed","add","unaryPlus"],ZC=Lr(vy,V$,T=>{var{typed:N,add:V,unaryPlus:Y}=T;return N(vy,{Array:X,Matrix:function(i){return i.create(X(i.valueOf()))},"Array, number | BigNumber":R,"Matrix, number | BigNumber":function(i,m){return i.create(R(i.valueOf(),m))},"...":function(i){if(g0(i))throw new TypeError("All values expected to be scalar in function cumsum");return X(i)}});function X(e){try{return J(e)}catch(i){throw Bl(i,vy)}}function J(e){if(e.length===0)return[];for(var i=[Y(e[0])],m=1;m=m.length)throw new $f(i,m.length);try{return F(e,i)}catch(t){throw Bl(t,vy)}}function F(e,i){var m,t,y;if(i<=0){var p=e[0][0];if(Array.isArray(p)){for(y=P8(e),t=[],m=0;m{var{typed:N,add:V,divide:Y}=T;return N(eS,{"Array | Matrix":J,"Array | Matrix, number | BigNumber":X,"...":function(F){if(g0(F))throw new TypeError("Scalar values expected in function mean");return J(F)}});function X(R,F){try{var e=V1(R,F,V),i=Array.isArray(R)?Si(R):R.size();return Y(e,i[F])}catch(m){throw Bl(m,"mean")}}function J(R){var F,e=0;if(Rh(R,function(i){try{F=F===void 0?i:V(F,i),e++}catch(m){throw Bl(m,"mean",i)}}),e===0)throw new Error("Cannot calculate the mean of an empty array");return Y(F,e)}}),tS="median",W$=["typed","add","divide","compare","partitionSelect"],Y$=Lr(tS,W$,T=>{var{typed:N,add:V,divide:Y,compare:X,partitionSelect:J}=T;function R(i){try{i=Ui(i.valueOf());var m=i.length;if(m===0)throw new Error("Cannot calculate median of an empty array");if(m%2===0){for(var t=m/2-1,y=J(i,t+1),p=i[t],l=0;l0&&(p=i[l]);return e(p,y)}else{var d=J(i,(m-1)/2);return F(d)}}catch(r){throw Bl(r,"median")}}var F=N({"number | BigNumber | Complex | Unit":function(m){return m}}),e=N({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(m,t){return Y(V(m,t),2)}});return N(tS,{"Array | Matrix":R,"Array | Matrix, number | BigNumber":function(m,t){throw new Error("median(A, dim) is not yet supported")},"...":function(m){if(g0(m))throw new TypeError("Scalar values expected in function median");return R(m)}})}),rS="mad",Z$=["typed","abs","map","median","subtract"],X$=Lr(rS,Z$,T=>{var{typed:N,abs:V,map:Y,median:X,subtract:J}=T;return N(rS,{"Array | Matrix":R,"...":function(e){return R(e)}});function R(F){if(F=Ui(F.valueOf()),F.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var e=X(F);return X(Y(F,function(i){return V(J(i,e))}))}catch(i){throw i instanceof TypeError&&i.message.indexOf("median")!==-1?new TypeError(i.message.replace("median","mad")):Bl(i,"mad")}}}),h2="unbiased",nS="variance",j$=["typed","add","subtract","multiply","divide","apply","isNaN"],jC=Lr(nS,j$,T=>{var{typed:N,add:V,subtract:Y,multiply:X,divide:J,apply:R,isNaN:F}=T;return N(nS,{"Array | Matrix":function(t){return e(t,h2)},"Array | Matrix, string":e,"Array | Matrix, number | BigNumber":function(t,y){return i(t,y,h2)},"Array | Matrix, number | BigNumber, string":i,"...":function(t){return e(t,h2)}});function e(m,t){var y,p=0;if(m.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(Rh(m,function(r){try{y=y===void 0?r:V(y,r),p++}catch(n){throw Bl(n,"variance",r)}}),p===0)throw new Error("Cannot calculate variance of an empty array");var l=J(y,p);if(y=void 0,Rh(m,function(r){var n=Y(r,l);y=y===void 0?X(n,n):V(y,X(n,n))}),F(y))return y;switch(t){case"uncorrected":return J(y,p);case"biased":return J(y,p+1);case"unbiased":{var d=Ei(y)?y.mul(0):0;return p===1?d:J(y,p-1)}default:throw new Error('Unknown normalization "'+t+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function i(m,t,y){try{if(m.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return R(m,t,p=>e(p,y))}catch(p){throw Bl(p,"variance")}}}),$$="quantileSeq",K$=["typed","add","multiply","partitionSelect","compare"],J$=Lr($$,K$,T=>{var{typed:N,add:V,multiply:Y,partitionSelect:X,compare:J}=T;function R(i,m,t){var y,p,l;if(arguments.length<2||arguments.length>3)throw new SyntaxError("Function quantileSeq requires two or three parameters");if(Lc(i)){if(t=t||!1,typeof t=="boolean"){if(p=i.valueOf(),Ni(m)){if(m<0)throw new Error("N/prob must be non-negative");if(m<=1)return F(p,m,t);if(m>1){if(!Ya(m))throw new Error("N must be a positive integer");var d=m+1;y=new Array(m);for(var r=0;r4294967295)throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var a=new n(u+1);y=new Array(u);for(var o=0;o1)throw new Error("Probability must be between 0 and 1, inclusive")}else if(Ei(b)){if(l=new b.constructor(1),b.isNegative()||b.gt(l))throw new Error("Probability must be between 0 and 1, inclusive")}else throw new TypeError("Unexpected type of argument in function quantileSeq");y[s]=F(p,b,t)}return y}throw new TypeError("Unexpected type of argument in function quantileSeq")}throw new TypeError("Unexpected type of argument in function quantileSeq")}throw new TypeError("Unexpected type of argument in function quantileSeq")}function F(i,m,t){var y=Ui(i),p=y.length;if(p===0)throw new Error("Cannot calculate quantile of an empty sequence");if(Ni(m)){var l=m*(p-1),d=l%1;if(d===0){var r=t?y[l]:X(y,l);return e(r),r}var n=Math.floor(l),u,a;if(t)u=y[n],a=y[n+1];else{a=X(y,n+1),u=y[n];for(var o=0;o0&&(u=y[o])}return e(u),e(a),V(Y(u,1-d),Y(a,d))}var c=m.times(p-1);if(c.isInteger()){c=c.toNumber();var s=t?y[c]:X(y,c);return e(s),s}var b=c.floor(),g=c.minus(b),A=b.toNumber(),v,h;if(t)v=y[A],h=y[A+1];else{h=X(y,A+1),v=y[A];for(var x=0;x0&&(v=y[x])}e(v),e(h);var C=new g.constructor(1);return V(Y(v,C.minus(g)),Y(h,g))}var e=N({"number | BigNumber | Unit":function(m){return m}});return R}),aS="std",Q$=["typed","map","sqrt","variance"],$C=Lr(aS,Q$,T=>{var{typed:N,map:V,sqrt:Y,variance:X}=T;return N(aS,{"Array | Matrix":J,"Array | Matrix, string":J,"Array | Matrix, number | BigNumber":J,"Array | Matrix, number | BigNumber, string":J,"...":function(F){return J(F)}});function J(R,F){if(R.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var e=X.apply(null,arguments);return Lc(e)?V(e,Y):Y(e)}catch(i){throw i instanceof TypeError&&i.message.indexOf(" variance")!==-1?new TypeError(i.message.replace(" variance"," std")):i}}}),iS="combinations",q$=["typed"],eK=Lr(iS,q$,T=>{var{typed:N}=T;return N(iS,{"number, number":eC,"BigNumber, BigNumber":function(Y,X){var J=Y.constructor,R,F,e=Y.minus(X),i=new J(1);if(!oS(Y)||!oS(X))throw new TypeError("Positive integer value expected in function combinations");if(X.gt(Y))throw new TypeError("k must be less than n in function combinations");if(R=i,X.lt(e))for(F=i;F.lte(e);F=F.plus(i))R=R.times(X.plus(F)).dividedBy(F);else for(F=i;F.lte(X);F=F.plus(i))R=R.times(e.plus(F)).dividedBy(F);return R}})});function oS(T){return T.isInteger()&&T.gte(0)}var sS="combinationsWithRep",tK=["typed"],rK=Lr(sS,tK,T=>{var{typed:N}=T;return N(sS,{"number, number":function(Y,X){if(!Ya(Y)||Y<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!Ya(X)||X<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(Y<1)throw new TypeError("k must be less than or equal to n + k - 1");if(X{var{typed:N,config:V,multiplyScalar:Y,pow:X,BigNumber:J,Complex:R}=T;function F(i){if(i.im===0)return i1(i.re);if(i.re<.5){var m=new R(1-i.re,-i.im),t=new R(Math.PI*i.re,Math.PI*i.im);return new R(Math.PI).div(t.sin()).div(F(m))}i=new R(i.re-1,i.im);for(var y=new R(Jp[0],0),p=1;p2;)y-=2,l+=y,p=p.times(l);return new J(p.toPrecision(J.precision))}}),fS="lgamma",iK=["Complex","typed"],oK=Lr(fS,iK,T=>{var{Complex:N,typed:V}=T,Y=7,X=7,J=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return V(fS,{number:o1,Complex:R,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function R(i){var m=6.283185307179586,t=1.1447298858494002,y=.1;if(i.isNaN())return new N(NaN,NaN);if(i.im===0)return new N(o1(i.re),0);if(i.re>=Y||Math.abs(i.im)>=X)return F(i);if(i.re<=y){var p=uF(m,i.im)*Math.floor(.5*i.re+.25),l=i.mul(Math.PI).sin().log(),d=R(new N(1-i.re,-i.im));return new N(t,p).sub(l).sub(d)}else return i.im>=0?e(i):e(i.conjugate()).conjugate()}function F(i){for(var m=i.sub(.5).mul(i.log()).sub(i).add(oC),t=new N(1,0).div(i),y=t.div(i),p=J[0],l=J[1],d=2*y.re,r=y.re*y.re+y.im*y.im,n=2;n<8;n++){var u=l;l=-r*p+J[n],p=d*p+u}var a=t.mul(y.mul(p).add(l));return m.add(a)}function e(i){var m=0,t=0,y=i;for(i=i.add(1);i.re<=Y;){y=y.mul(i);var p=y.im<0?1:0;p!==0&&t===0&&m++,t=p,i=i.add(1)}return F(i).sub(y.log()).sub(new N(0,m*2*Math.PI*1))}}),cS="factorial",sK=["typed","gamma"],lK=Lr(cS,sK,T=>{var{typed:N,gamma:V}=T;return N(cS,{number:function(X){if(X<0)throw new Error("Value must be non-negative");return V(X+1)},BigNumber:function(X){if(X.isNegative())throw new Error("Value must be non-negative");return V(X.plus(1))},"Array | Matrix":N.referToSelf(Y=>X=>wi(X,Y))})}),hS="kldivergence",uK=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],fK=Lr(hS,uK,T=>{var{typed:N,matrix:V,divide:Y,sum:X,multiply:J,map:R,dotDivide:F,log:e,isNumeric:i}=T;return N(hS,{"Array, Array":function(y,p){return m(V(y),V(p))},"Matrix, Array":function(y,p){return m(y,V(p))},"Array, Matrix":function(y,p){return m(V(y),p)},"Matrix, Matrix":function(y,p){return m(y,p)}});function m(t,y){var p=y.size().length,l=t.size().length;if(p>1)throw new Error("first object must be one dimensional");if(l>1)throw new Error("second object must be one dimensional");if(p!==l)throw new Error("Length of two vectors must be equal");var d=X(t);if(d===0)throw new Error("Sum of elements in first object must be non zero");var r=X(y);if(r===0)throw new Error("Sum of elements in second object must be non zero");var n=Y(t,X(t)),u=Y(y,X(y)),a=X(J(n,R(F(n,u),o=>e(o))));return i(a)?a:Number.NaN}}),vS="multinomial",cK=["typed","add","divide","multiply","factorial","isInteger","isPositive"],hK=Lr(vS,cK,T=>{var{typed:N,add:V,divide:Y,multiply:X,factorial:J,isInteger:R,isPositive:F}=T;return N(vS,{"Array | Matrix":function(i){var m=0,t=1;return Rh(i,function(y){if(!R(y)||!F(y))throw new TypeError("Positive integer value expected in function multinomial");m=V(m,y),t=X(t,J(y))}),Y(J(m),t)}})}),dS="permutations",vK=["typed","factorial"],dK=Lr(dS,vK,T=>{var{typed:N,factorial:V}=T;return N(dS,{"number | BigNumber":V,"number, number":function(X,J){if(!Ya(X)||X<0)throw new TypeError("Positive integer value expected in function permutations");if(!Ya(J)||J<0)throw new TypeError("Positive integer value expected in function permutations");if(J>X)throw new TypeError("second argument k must be less than or equal to first argument n");return Th(X-J+1,X)},"BigNumber, BigNumber":function(X,J){var R,F;if(!pS(X)||!pS(J))throw new TypeError("Positive integer value expected in function permutations");if(J.gt(X))throw new TypeError("second argument k must be less than or equal to first argument n");var e=X.mul(0).add(1);for(R=e,F=X.minus(J).plus(1);F.lte(X);F=F.plus(1))R=R.times(F);return R}})});function pS(T){return T.isInteger()&&T.gte(0)}var KC={exports:{}};(function(T){(function(N,V,Y){function X(e){var i=this,m=F();i.next=function(){var t=2091639*i.s0+i.c*23283064365386963e-26;return i.s0=i.s1,i.s1=i.s2,i.s2=t-(i.c=t|0)},i.c=1,i.s0=m(" "),i.s1=m(" "),i.s2=m(" "),i.s0-=m(e),i.s0<0&&(i.s0+=1),i.s1-=m(e),i.s1<0&&(i.s1+=1),i.s2-=m(e),i.s2<0&&(i.s2+=1),m=null}function J(e,i){return i.c=e.c,i.s0=e.s0,i.s1=e.s1,i.s2=e.s2,i}function R(e,i){var m=new X(e),t=i&&i.state,y=m.next;return y.int32=function(){return m.next()*4294967296|0},y.double=function(){return y()+(y()*2097152|0)*11102230246251565e-32},y.quick=y,t&&(typeof t=="object"&&J(t,m),y.state=function(){return J(m,{})}),y}function F(){var e=4022871197,i=function(m){m=String(m);for(var t=0;t>>0,y-=e,y*=e,e=y>>>0,y-=e,e+=y*4294967296}return(e>>>0)*23283064365386963e-26};return i}V&&V.exports?V.exports=R:Y&&Y.amd?Y(function(){return R}):this.alea=R})(Bd,T,!1)})(KC);var JC={exports:{}};(function(T){(function(N,V,Y){function X(F){var e=this,i="";e.x=0,e.y=0,e.z=0,e.w=0,e.next=function(){var t=e.x^e.x<<11;return e.x=e.y,e.y=e.z,e.z=e.w,e.w^=e.w>>>19^t^t>>>8},F===(F|0)?e.x=F:i+=F;for(var m=0;m>>0)/4294967296};return t.double=function(){do var y=i.next()>>>11,p=(i.next()>>>0)/4294967296,l=(y+p)/(1<<21);while(l===0);return l},t.int32=i.next,t.quick=t,m&&(typeof m=="object"&&J(m,i),t.state=function(){return J(i,{})}),t}V&&V.exports?V.exports=R:Y&&Y.amd?Y(function(){return R}):this.xor128=R})(Bd,T,!1)})(JC);var QC={exports:{}};(function(T){(function(N,V,Y){function X(F){var e=this,i="";e.next=function(){var t=e.x^e.x>>>2;return e.x=e.y,e.y=e.z,e.z=e.w,e.w=e.v,(e.d=e.d+362437|0)+(e.v=e.v^e.v<<4^(t^t<<1))|0},e.x=0,e.y=0,e.z=0,e.w=0,e.v=0,F===(F|0)?e.x=F:i+=F;for(var m=0;m>>4),e.next()}function J(F,e){return e.x=F.x,e.y=F.y,e.z=F.z,e.w=F.w,e.v=F.v,e.d=F.d,e}function R(F,e){var i=new X(F),m=e&&e.state,t=function(){return(i.next()>>>0)/4294967296};return t.double=function(){do var y=i.next()>>>11,p=(i.next()>>>0)/4294967296,l=(y+p)/(1<<21);while(l===0);return l},t.int32=i.next,t.quick=t,m&&(typeof m=="object"&&J(m,i),t.state=function(){return J(i,{})}),t}V&&V.exports?V.exports=R:Y&&Y.amd?Y(function(){return R}):this.xorwow=R})(Bd,T,!1)})(QC);var qC={exports:{}};(function(T){(function(N,V,Y){function X(F){var e=this;e.next=function(){var m=e.x,t=e.i,y,p;return y=m[t],y^=y>>>7,p=y^y<<24,y=m[t+1&7],p^=y^y>>>10,y=m[t+3&7],p^=y^y>>>3,y=m[t+4&7],p^=y^y<<7,y=m[t+7&7],y=y^y<<13,p^=y^y<<9,m[t]=p,e.i=t+1&7,p};function i(m,t){var y,p=[];if(t===(t|0))p[0]=t;else for(t=""+t,y=0;y0;--y)m.next()}i(e,F)}function J(F,e){return e.x=F.x.slice(),e.i=F.i,e}function R(F,e){F==null&&(F=+new Date);var i=new X(F),m=e&&e.state,t=function(){return(i.next()>>>0)/4294967296};return t.double=function(){do var y=i.next()>>>11,p=(i.next()>>>0)/4294967296,l=(y+p)/(1<<21);while(l===0);return l},t.int32=i.next,t.quick=t,m&&(m.x&&J(m,i),t.state=function(){return J(i,{})}),t}V&&V.exports?V.exports=R:Y&&Y.amd?Y(function(){return R}):this.xorshift7=R})(Bd,T,!1)})(qC);var eD={exports:{}};(function(T){(function(N,V,Y){function X(F){var e=this;e.next=function(){var m=e.w,t=e.X,y=e.i,p,l;return e.w=m=m+1640531527|0,l=t[y+34&127],p=t[y=y+1&127],l^=l<<13,p^=p<<17,l^=l>>>15,p^=p>>>12,l=t[y]=l^p,e.i=y,l+(m^m>>>16)|0};function i(m,t){var y,p,l,d,r,n=[],u=128;for(t===(t|0)?(p=t,t=null):(t=t+"\0",p=0,u=Math.max(u,t.length)),l=0,d=-32;d>>15,p^=p<<4,p^=p>>>13,d>=0&&(r=r+1640531527|0,y=n[d&127]^=p+r,l=y==0?l+1:0);for(l>=128&&(n[(t&&t.length||0)&127]=-1),l=127,d=4*128;d>0;--d)p=n[l+34&127],y=n[l=l+1&127],p^=p<<13,y^=y<<17,p^=p>>>15,y^=y>>>12,n[l]=p^y;m.w=r,m.X=n,m.i=l}i(e,F)}function J(F,e){return e.i=F.i,e.w=F.w,e.X=F.X.slice(),e}function R(F,e){F==null&&(F=+new Date);var i=new X(F),m=e&&e.state,t=function(){return(i.next()>>>0)/4294967296};return t.double=function(){do var y=i.next()>>>11,p=(i.next()>>>0)/4294967296,l=(y+p)/(1<<21);while(l===0);return l},t.int32=i.next,t.quick=t,m&&(m.X&&J(m,i),t.state=function(){return J(i,{})}),t}V&&V.exports?V.exports=R:Y&&Y.amd?Y(function(){return R}):this.xor4096=R})(Bd,T,!1)})(eD);var tD={exports:{}};(function(T){(function(N,V,Y){function X(F){var e=this,i="";e.next=function(){var t=e.b,y=e.c,p=e.d,l=e.a;return t=t<<25^t>>>7^y,y=y-p|0,p=p<<24^p>>>8^l,l=l-t|0,e.b=t=t<<20^t>>>12^y,e.c=y=y-p|0,e.d=p<<16^y>>>16^l,e.a=l-t|0},e.a=0,e.b=0,e.c=-1640531527,e.d=1367130551,F===Math.floor(F)?(e.a=F/4294967296|0,e.b=F|0):i+=F;for(var m=0;m>>0)/4294967296};return t.double=function(){do var y=i.next()>>>11,p=(i.next()>>>0)/4294967296,l=(y+p)/(1<<21);while(l===0);return l},t.int32=i.next,t.quick=t,m&&(typeof m=="object"&&J(m,i),t.state=function(){return J(i,{})}),t}V&&V.exports?V.exports=R:Y&&Y.amd?Y(function(){return R}):this.tychei=R})(Bd,T,!1)})(tD);var rD={exports:{}};const pK={},gK=Object.freeze(Object.defineProperty({__proto__:null,default:pK},Symbol.toStringTag,{value:"Module"})),mK=$L(gK);(function(T){(function(N,V,Y){var X=256,J=6,R=52,F="random",e=Y.pow(X,J),i=Y.pow(2,R),m=i*2,t=X-1,y;function p(o,c,s){var b=[];c=c==!0?{entropy:!0}:c||{};var g=n(r(c.entropy?[o,a(V)]:o==null?u():o,3),b),A=new l(b),v=function(){for(var h=A.g(J),x=e,C=0;h=m;)h/=2,x/=2,C>>>=1;return(h+C)/x};return v.int32=function(){return A.g(4)|0},v.quick=function(){return A.g(4)/4294967296},v.double=v,n(a(A.S),V),(c.pass||s||function(h,x,C,D){return D&&(D.S&&d(D,A),h.state=function(){return d(A,{})}),C?(Y[F]=h,x):h})(v,g,"global"in c?c.global:this==Y,c.state)}function l(o){var c,s=o.length,b=this,g=0,A=b.i=b.j=0,v=b.S=[];for(s||(o=[s++]);g{var{typed:N,config:V,on:Y}=T,X=f0(V.randomSeed);return Y&&Y("config",function(R,F){R.randomSeed!==F.randomSeed&&(X=f0(R.randomSeed))}),N(gS,{"Array | Matrix":function(F){return J(F,{})},"Array | Matrix, Object":function(F,e){return J(F,e)},"Array | Matrix, number":function(F,e){return J(F,{number:e})},"Array | Matrix, Array | Matrix":function(F,e){return J(F,{weights:e})},"Array | Matrix, Array | Matrix, number":function(F,e,i){return J(F,{number:i,weights:e})},"Array | Matrix, number, Array | Matrix":function(F,e,i){return J(F,{number:e,weights:i})}});function J(R,F){var{number:e,weights:i,elementWise:m=!0}=F,t=typeof e>"u";t&&(e=1);var y=Qa(R)?R.create:Qa(i)?i.create:null;R=R.valueOf(),i&&(i=i.valueOf()),m===!0&&(R=Ui(R),i=Ui(i));var p=0;if(typeof i<"u"){if(i.length!==R.length)throw new Error("Weights must have the same length as possibles");for(var l=0,d=i.length;l"u")u=R[Math.floor(X()*r)];else for(var a=X()*p,o=0,c=R.length;o1)for(var Y=0,X=T.shift();Y{var{typed:N,config:V,on:Y}=T,X=f0(V.randomSeed);return Y&&Y("config",function(F,e){F.randomSeed!==e.randomSeed&&(X=f0(F.randomSeed))}),N(mS,{"":()=>R(0,1),number:F=>R(0,F),"number, number":(F,e)=>R(F,e),"Array | Matrix":F=>J(F,0,1),"Array | Matrix, number":(F,e)=>J(F,0,e),"Array | Matrix, number, number":(F,e,i)=>J(F,e,i)});function J(F,e,i){var m=I3(F.valueOf(),()=>R(e,i));return Qa(F)?F.create(m):m}function R(F,e){return F+X()*(e-F)}}),yS="randomInt",LK=["typed","config","?on"],PK=Lr(yS,LK,T=>{var{typed:N,config:V,on:Y}=T,X=f0(V.randomSeed);return Y&&Y("config",function(F,e){F.randomSeed!==e.randomSeed&&(X=f0(F.randomSeed))}),N(yS,{"":()=>R(0,1),number:F=>R(0,F),"number, number":(F,e)=>R(F,e),"Array | Matrix":F=>J(F,0,1),"Array | Matrix, number":(F,e)=>J(F,0,e),"Array | Matrix, number, number":(F,e,i)=>J(F,e,i)});function J(F,e,i){var m=I3(F.valueOf(),()=>R(e,i));return Qa(F)?F.create(m):m}function R(F,e){return Math.floor(F+X()*(e-F))}}),xS="stirlingS2",NK=["typed","addScalar","subtract","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],RK=Lr(xS,NK,T=>{var{typed:N,addScalar:V,subtract:Y,multiplyScalar:X,divideScalar:J,pow:R,factorial:F,combinations:e,isNegative:i,isInteger:m,number:t,bignumber:y,larger:p}=T,l=[],d=[];return N(xS,{"number | BigNumber, number | BigNumber":function(n,u){if(!m(n)||i(n)||!m(u)||i(u))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(p(u,n))throw new TypeError("k must be less than or equal to n in function stirlingS2");var a=!(Ni(n)&&Ni(u)),o=a?d:l,c=a?y:t,s=t(n),b=t(u);if(o[s]&&o[s].length>b)return o[s][b];for(var g=0;g<=s;++g)if(o[g]||(o[g]=[c(g===0?1:0)]),g!==0)for(var A=o[g],v=o[g-1],h=A.length;h<=g&&h<=b;++h)h===g?A[h]=1:A[h]=V(X(c(h),v[h]),v[h-1]);return o[s][b]}})}),bS="bellNumbers",FK=["typed","addScalar","isNegative","isInteger","stirlingS2"],IK=Lr(bS,FK,T=>{var{typed:N,addScalar:V,isNegative:Y,isInteger:X,stirlingS2:J}=T;return N(bS,{"number | BigNumber":function(F){if(!X(F)||Y(F))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var e=0,i=0;i<=F;i++)e=V(e,J(F,i));return e}})}),wS="catalan",_K=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],OK=Lr(wS,_K,T=>{var{typed:N,addScalar:V,divideScalar:Y,multiplyScalar:X,combinations:J,isNegative:R,isInteger:F}=T;return N(wS,{"number | BigNumber":function(i){if(!F(i)||R(i))throw new TypeError("Non-negative integer value expected in function catalan");return Y(J(X(i,2),i),V(i,1))}})}),AS="composition",zK=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],kK=Lr(AS,zK,T=>{var{typed:N,addScalar:V,combinations:Y,isPositive:X,isNegative:J,isInteger:R,larger:F}=T;return N(AS,{"number | BigNumber, number | BigNumber":function(i,m){if(!R(i)||!X(i)||!R(m)||!X(m))throw new TypeError("Positive integer value expected in function composition");if(F(m,i))throw new TypeError("k must be less than or equal to n in function composition");return Y(V(i,-1),V(m,-1))}})}),TS="leafCount",BK=["parse","typed"],UK=Lr(TS,BK,T=>{var{parse:N,typed:V}=T;function Y(X){var J=0;return X.forEach(R=>{J+=Y(R)}),J||1}return V(TS,{Node:function(J){return Y(J)}})});function MS(T){return Bi(T)||ds(T)&&T.isUnary()&&Bi(T.args[0])}function g1(T){return!!(Bi(T)||(_v(T)||ds(T))&&T.args.every(g1)||Nh(T)&&g1(T.content))}function SS(T,N){var V=Object.keys(T);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(T);N&&(Y=Y.filter(function(X){return Object.getOwnPropertyDescriptor(T,X).enumerable})),V.push.apply(V,Y)}return V}function v2(T){for(var N=1;N{var{FunctionNode:N,OperatorNode:V,SymbolNode:Y}=T,X=!0,J=!1,R="defaultF",F={add:{trivial:X,total:X,commutative:X,associative:X},unaryPlus:{trivial:X,total:X,commutative:X,associative:X},subtract:{trivial:J,total:X,commutative:J,associative:J},multiply:{trivial:X,total:X,commutative:X,associative:X},divide:{trivial:J,total:X,commutative:J,associative:J},paren:{trivial:X,total:X,commutative:X,associative:J},defaultF:{trivial:J,total:X,commutative:J,associative:J}},e={divide:{total:J},log:{total:J}},i={subtract:{total:J},abs:{trivial:X},log:{total:X}};function m(a,o){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:F,s=R;if(typeof a=="string"?s=a:ds(a)?s=a.fn.toString():_v(a)?s=a.name:Nh(a)&&(s="paren"),ka(c,s)){var b=c[s];if(ka(b,o))return b[o];if(ka(F,s))return F[s][o]}if(ka(c,R)){var g=c[R];return ka(g,o)?g[o]:F[R][o]}if(ka(F,s)){var A=F[s];if(ka(A,o))return A[o]}return F[R][o]}function t(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:F;return m(a,"commutative",o)}function y(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:F;return m(a,"associative",o)}function p(a,o){var c=v2({},a);for(var s in o)ka(a,s)?c[s]=v2(v2({},o[s]),a[s]):c[s]=o[s];return c}function l(a,o){if(!a.args||a.args.length===0)return a;a.args=d(a,o);for(var c=0;c2&&y(a,o)){for(var g=a.args.pop();a.args.length>0;)g=c([a.args.pop(),g]);a.args=g.args}}}function n(a,o){if(!(!a.args||a.args.length===0)){for(var c=u(a),s=a.args.length,b=0;b2&&y(a,o)){for(var g=a.args.shift();a.args.length>0;)g=c([g,a.args.shift()]);a.args=g.args}}}function u(a){return ds(a)?function(o){try{return new V(a.op,a.fn,o,a.implicit)}catch(c){return console.error(c),[]}}:function(o){return new N(new Y(a.name),o)}}return{createMakeNodeFunction:u,hasProperty:m,isCommutative:t,isAssociative:y,mergeContext:p,flatten:l,allChildren:d,unflattenr:r,unflattenl:n,defaultContext:F,realContext:e,positiveContext:i}}),GK="simplify",WK=["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","resolve","simplifyConstant","simplifyCore","?fraction","?bignumber","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],YK=Lr(GK,WK,T=>{var{config:N,typed:V,parse:Y,add:X,subtract:J,multiply:R,divide:F,pow:e,isZero:i,equal:m,resolve:t,simplifyConstant:y,simplifyCore:p,fraction:l,bignumber:d,mathWithTransform:r,matrix:n,AccessorNode:u,ArrayNode:a,ConstantNode:o,FunctionNode:c,IndexNode:s,ObjectNode:b,OperatorNode:g,ParenthesisNode:A,SymbolNode:v}=T,{hasProperty:h,isCommutative:x,isAssociative:C,mergeContext:D,flatten:L,unflattenr:w,unflattenl:M,createMakeNodeFunction:S,defaultContext:f,realContext:P,positiveContext:E}=_3({FunctionNode:c,OperatorNode:g,SymbolNode:v});V.addConversion({from:"Object",to:"Map",convert:Kp});var k=V("simplify",{Node:W,"Node, Map":(Q,ae)=>W(Q,!1,ae),"Node, Map, Object":(Q,ae,fe)=>W(Q,!1,ae,fe),"Node, Array":W,"Node, Array, Map":W,"Node, Array, Map, Object":W});V.removeConversion({from:"Object",to:"Map",convert:Kp}),k.defaultContext=f,k.realContext=P,k.positiveContext=E;function O(Q){return Q.transform(function(ae,fe,te){return Nh(ae)?O(ae.content):ae})}var G={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};k.rules=[p,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(cl*v) -> v * (-cl)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(cl*v) -> (-cl) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*cl) -> v * (-cl)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" vd * ( vd * n1 + n2)",r:"vd^2 * n1 + vd * n2"},{s:" vd * (vd^n4 * n1 + n2) -> vd^(1+n4) * n1 + vd * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * ( vd * n1 + n2) -> vd^(n3+1) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * (vd^n4 * n1 + n2) -> vd^(n3+n4) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},y,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"vd*n + vd",r:"vd*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 + n3 * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*vd + vd -> (n+1)*vd",assuming:{multiply:{commutative:!1}}},{s:"vd + n*vd -> (1+n)*vd",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n^n1 * n -> n^(n1+1)",assuming:{divide:{total:!0},multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*cd + cd",r:"(n+1)*cd"},{s:"cd*n + cd -> cd*(n+1)",assuming:{multiply:{commutative:!1}}},{s:"cd + cd*n -> cd*(1+n)",assuming:{multiply:{commutative:!1}}},y,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"ce+ve -> ve+ce",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"vd*cd -> cd*vd",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];function z(Q,ae){var fe={};if(Q.s){var te=Q.s.split("->");if(te.length===2)fe.l=te[0],fe.r=te[1];else throw SyntaxError("Could not parse rule: "+Q.s)}else fe.l=Q.l,fe.r=Q.r;fe.l=O(Y(fe.l)),fe.r=O(Y(fe.r));for(var ne of["imposeContext","repeat","assuming"])ne in Q&&(fe[ne]=Q[ne]);if(Q.evaluate&&(fe.evaluate=Y(Q.evaluate)),C(fe.l,ae)){var ce=!x(fe.l,ae),oe;ce&&(oe=B());var de=S(fe.l),we=B();fe.expanded={},fe.expanded.l=de([fe.l,we]),L(fe.expanded.l,ae),w(fe.expanded.l,ae),fe.expanded.r=de([fe.r,we]),ce&&(fe.expandedNC1={},fe.expandedNC1.l=de([oe,fe.l]),fe.expandedNC1.r=de([oe,fe.r]),fe.expandedNC2={},fe.expandedNC2.l=de([oe,fe.expanded.l]),fe.expandedNC2.r=de([oe,fe.expanded.r]))}return fe}function U(Q,ae){for(var fe=[],te=0;te2&&arguments[2]!==void 0?arguments[2]:l0(),te=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},ne=te.consoleDebug;ae=U(ae||k.rules,te.context);var ce=t(Q,fe);ce=O(ce);for(var oe={},de=ce.toString({parenthesis:"all"});!oe[de];){oe[de]=!0,H=0;var we=de;ne&&console.log("Working on: ",de);for(var Se=0;Se ").concat(ae[Se].r.toString()))),ne){var Fe=ce.toString({parenthesis:"all"});Fe!==we&&(console.log("Applying",Te,"produced",Fe),we=Fe)}M(ce,te.context)}de=ce.toString({parenthesis:"all"})}return ce}function q(Q,ae,fe){var te=Q;if(Q)for(var ne=0;ne1&&(we=ce(Q.args.slice(0,de))),ne=Q.args.slice(de),te=ne.length===1?ne[0]:ce(ne),fe.push(ce([we,te]))}return fe}function le(Q,ae){var fe={placeholders:{}};if(!Q.placeholders&&!ae.placeholders)return fe;if(Q.placeholders){if(!ae.placeholders)return Q}else return ae;for(var te in Q.placeholders)if(ka(Q.placeholders,te)&&(fe.placeholders[te]=Q.placeholders[te],ka(ae.placeholders,te)&&!K(Q.placeholders[te],ae.placeholders[te])))return null;for(var ne in ae.placeholders)ka(ae.placeholders,ne)&&(fe.placeholders[ne]=ae.placeholders[ne]);return fe}function he(Q,ae){var fe=[];if(Q.length===0||ae.length===0)return fe;for(var te,ne=0;ne2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var we=Z(Q.args[0],ae.args[1],fe);if(we.length===0)return[];var Se=Z(Q.args[1],ae.args[0],fe);if(Se.length===0)return[];ce=[we,Se]}ne=$(ce)}else if(ae.args.length>=2&&Q.args.length===2){for(var Te=ie(ae,fe),Fe=[],Ie=0;Ie2)throw Error("Unexpected non-binary associative function: "+Q.toString());return[]}}else if(Q instanceof v){if(Q.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if(G[Q.name]){if(Q.name!==ae.name)return[]}else switch(Q.name[1]>="a"&&Q.name[1]<="z"?Q.name.substring(0,2):Q.name[0]){case"n":case"_p":ne[0].placeholders[Q.name]=ae;break;case"c":case"cl":if(Bi(ae))ne[0].placeholders[Q.name]=ae;else return[];break;case"v":if(!Bi(ae))ne[0].placeholders[Q.name]=ae;else return[];break;case"vl":if(_s(ae))ne[0].placeholders[Q.name]=ae;else return[];break;case"cd":if(MS(ae))ne[0].placeholders[Q.name]=ae;else return[];break;case"vd":if(!MS(ae))ne[0].placeholders[Q.name]=ae;else return[];break;case"ce":if(g1(ae))ne[0].placeholders[Q.name]=ae;else return[];break;case"ve":if(!g1(ae))ne[0].placeholders[Q.name]=ae;else return[];break;default:throw new Error("Invalid symbol in rule: "+Q.name)}}else if(Q instanceof o){if(!m(Q.value,ae.value))return[]}else return[];return ne}function K(Q,ae){if(Q instanceof o&&ae instanceof o){if(!m(Q.value,ae.value))return!1}else if(Q instanceof v&&ae instanceof v){if(Q.name!==ae.name)return!1}else if(Q instanceof g&&ae instanceof g||Q instanceof c&&ae instanceof c){if(Q instanceof g){if(Q.op!==ae.op||Q.fn!==ae.fn)return!1}else if(Q instanceof c&&Q.name!==ae.name)return!1;if(Q.args.length!==ae.args.length)return!1;for(var fe=0;fe{var{typed:N,config:V,mathWithTransform:Y,matrix:X,fraction:J,bignumber:R,AccessorNode:F,ArrayNode:e,ConstantNode:i,FunctionNode:m,IndexNode:t,ObjectNode:y,OperatorNode:p,SymbolNode:l}=T,{isCommutative:d,isAssociative:r,allChildren:n,createMakeNodeFunction:u}=_3({FunctionNode:m,OperatorNode:p,SymbolNode:l}),a=N("simplifyConstant",{Node:L=>b(D(L,{})),"Node, Object":function(w,M){return b(D(w,M))}});function o(L){return $g(L)?L.valueOf():L instanceof Array?L.map(o):Qa(L)?X(o(L.valueOf())):L}function c(L,w,M){try{return Y[L].apply(null,w)}catch{return w=w.map(o),A(Y[L].apply(null,w),M)}}var s=N({Fraction:h,number:function(w){return w<0?v(new i(-w)):new i(w)},BigNumber:function(w){return w<0?v(new i(-w)):new i(w)},Complex:function(w){throw new Error("Cannot convert Complex number to Node")},string:function(w){return new i(w)},Matrix:function(w){return new e(w.valueOf().map(M=>s(M)))}});function b(L){return no(L)?L:s(L)}function g(L,w){var M=w&&w.exactFractions!==!1;if(M&&isFinite(L)&&J){var S=J(L),f=w&&typeof w.fractionsLimit=="number"?w.fractionsLimit:1/0;if(S.valueOf()===L&&S.n0;)if(Bi(S[0])&&typeof S[0].value!="string"){var f=A(S.shift().value,M);Qu(L)?L=L.items[f-1]:(L=L.valueOf()[f-1],L instanceof Array&&(L=X(L)))}else if(S.length>1&&Bi(S[1])&&typeof S[1].value!="string"){var P=A(S[1].value,M),E=[],k=Qu(L)?L.items:L.valueOf();for(var O of k)if(Qu(O))E.push(O.items[P-1]);else if(Qa(L))E.push(O[P-1]);else break;if(E.length===k.length)Qu(L)?L=new e(E):L=X(E),S.splice(1,1);else break}else break;return S.length===w.dimensions.length?new F(b(L),w):S.length>0?(w=new t(S),new F(b(L),w)):L}if(_1(L)&&w.dimensions.length===1&&Bi(w.dimensions[0])){var G=w.dimensions[0].value;return G in L.properties?L.properties[G]:new i}return new F(b(L),w)}function C(L,w,M,S){var f=w.shift(),P=w.reduce((E,k)=>{if(!no(k)){var O=E.pop();if(no(O))return[O,k];try{return E.push(c(L,[O,k],S)),E}catch{E.push(O)}}E.push(b(E.pop()));var G=E.length===1?E[0]:M(E);return[M([G,b(k)])]},[f]);return P.length===1?P[0]:M([P[0],s(P[1])])}function D(L,w){switch(L.type){case"SymbolNode":return L;case"ConstantNode":switch(typeof L.value){case"number":return A(L.value,w);case"string":return L.value;default:if(!isNaN(L.value))return A(L.value,w)}return L;case"FunctionNode":if(Y[L.name]&&Y[L.name].rawArgs)return L;{var M=["add","multiply"];if(M.indexOf(L.name)===-1){var S=L.args.map(re=>D(re,w));if(!S.some(no))try{return c(L.name,S,w)}catch{}if(L.name==="size"&&S.length===1&&Qu(S[0])){for(var f=[],P=S[0];Qu(P);)f.push(P.items.length),P=P.items[0];return X(f)}return new m(L.name,S.map(b))}}case"OperatorNode":{var E=L.fn.toString(),k,O,G=u(L);if(ds(L)&&L.isUnary())k=[D(L.args[0],w)],no(k[0])?O=G(k):O=c(E,k,w);else if(r(L,w.context))if(k=n(L,w.context),k=k.map(re=>D(re,w)),d(E,w.context)){for(var z=[],U=[],H=0;H1?(O=C(E,z,G,w),U.unshift(O),O=C(E,U,G,w)):O=C(E,k,G,w)}else O=C(E,k,G,w);else k=L.args.map(re=>D(re,w)),O=C(E,k,G,w);return O}case"ParenthesisNode":return D(L.content,w);case"AccessorNode":return x(D(L.object,w),D(L.index,w),w);case"ArrayNode":{var B=L.items.map(re=>D(re,w));return B.some(no)?new e(B.map(b)):X(B)}case"IndexNode":return new t(L.dimensions.map(re=>a(re,w)));case"ObjectNode":{var W={};for(var q in L.properties)W[q]=a(L.properties[q],w);return new y(W)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(L.type))}}return a}),ES="simplifyCore",$K=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],KK=Lr(ES,$K,T=>{var{typed:N,parse:V,equal:Y,isZero:X,add:J,subtract:R,multiply:F,divide:e,pow:i,AccessorNode:m,ArrayNode:t,ConstantNode:y,FunctionNode:p,IndexNode:l,ObjectNode:d,OperatorNode:r,ParenthesisNode:n,SymbolNode:u}=T,a=new y(0),o=new y(1),c=new y(!0),s=new y(!1);function b(h){return ds(h)&&["and","not","or"].includes(h.op)}var{hasProperty:g,isCommutative:A}=_3({FunctionNode:p,OperatorNode:r,SymbolNode:u});function v(h){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=x?x.context:void 0;if(g(h,"trivial",C)){if(_v(h)&&h.args.length===1)return v(h.args[0],x);var D=!1,L=0;if(h.forEach(U=>{++L,L===1&&(D=v(U,x))}),L===1)return D}var w=h;if(_v(w)){var M=hG(w.name);if(M){if(w.args.length>2&&g(w,"associative",C))for(;w.args.length>2;){var S=w.args.pop(),f=w.args.pop();w.args.push(new r(M,w.name,[S,f]))}w=new r(M,w.name,w.args)}else return new p(v(w.fn),w.args.map(U=>v(U,x)))}if(ds(w)&&w.isUnary()){var P=v(w.args[0],x);if(w.op==="~"&&ds(P)&&P.isUnary()&&P.op==="~"||w.op==="not"&&ds(P)&&P.isUnary()&&P.op==="not"&&b(P.args[0]))return P.args[0];var E=!0;if(w.op==="-"&&ds(P)&&(P.isBinary()&&P.fn==="subtract"&&(w=new r("-","subtract",[P.args[1],P.args[0]]),E=!1),P.isUnary()&&P.op==="-"))return P.args[0];if(E)return new r(w.op,w.fn,[P])}if(ds(w)&&w.isBinary()){var k=v(w.args[0],x),O=v(w.args[1],x);if(w.op==="+"){if(Bi(k)&&X(k.value))return O;if(Bi(O)&&X(O.value))return k;ds(O)&&O.isUnary()&&O.op==="-"&&(O=O.args[0],w=new r("-","subtract",[k,O]))}if(w.op==="-")return ds(O)&&O.isUnary()&&O.op==="-"?v(new r("+","add",[k,O.args[0]]),x):Bi(k)&&X(k.value)?v(new r("-","unaryMinus",[O])):Bi(O)&&X(O.value)?k:new r(w.op,w.fn,[k,O]);if(w.op==="*"){if(Bi(k)){if(X(k.value))return a;if(Y(k.value,1))return O}if(Bi(O)){if(X(O.value))return a;if(Y(O.value,1))return k;if(A(w,C))return new r(w.op,w.fn,[O,k],w.implicit)}return new r(w.op,w.fn,[k,O],w.implicit)}if(w.op==="/")return Bi(k)&&X(k.value)?a:Bi(O)&&Y(O.value,1)?k:new r(w.op,w.fn,[k,O]);if(w.op==="^"&&Bi(O)){if(X(O.value))return o;if(Y(O.value,1))return k}if(w.op==="and"){if(Bi(k))if(k.value){if(b(O))return O}else return s;if(Bi(O))if(O.value){if(b(k))return k}else return s}if(w.op==="or"){if(Bi(k)){if(k.value)return c;if(b(O))return O}if(Bi(O)){if(O.value)return c;if(b(k))return k}}return new r(w.op,w.fn,[k,O])}if(ds(w))return new r(w.op,w.fn,w.args.map(U=>v(U,x)));if(Qu(w))return new t(w.items.map(U=>v(U,x)));if(kd(w))return new m(v(w.object,x),v(w.index,x));if(p0(w))return new l(w.dimensions.map(U=>v(U,x)));if(_1(w)){var G={};for(var z in w.properties)G[z]=v(w.properties[z],x);return new d(G)}return w}return N(ES,{Node:v,"Node,Object":v})}),JK="resolve",QK=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],qK=Lr(JK,QK,T=>{var{typed:N,parse:V,ConstantNode:Y,FunctionNode:X,OperatorNode:J,ParenthesisNode:R}=T;function F(e,i){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!i)return e;if(_s(e)){if(m.has(e.name)){var t=Array.from(m).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(t,"}"))}var y=i.get(e.name);if(no(y)){var p=new Set(m);return p.add(e.name),F(y,i,p)}else return typeof y=="number"?V(String(y)):y!==void 0?new Y(y):e}else if(ds(e)){var l=e.args.map(function(r){return F(r,i,m)});return new J(e.op,e.fn,l,e.implicit)}else{if(Nh(e))return new R(F(e.content,i,m));if(_v(e)){var d=e.args.map(function(r){return F(r,i,m)});return new X(e.name,d)}}return e.map(r=>F(r,i,m))}return N("resolve",{Node:F,"Node, Map | null | undefined":F,"Node, Object":(e,i)=>F(e,Kp(i)),"Array | Matrix":N.referToSelf(e=>i=>i.map(m=>e(m))),"Array | Matrix, null | undefined":N.referToSelf(e=>i=>i.map(m=>e(m))),"Array, Object":N.referTo("Array,Map",e=>(i,m)=>e(i,Kp(m))),"Matrix, Object":N.referTo("Matrix,Map",e=>(i,m)=>e(i,Kp(m))),"Array | Matrix, Map":N.referToSelf(e=>(i,m)=>i.map(t=>e(t,m)))})}),CS="symbolicEqual",eJ=["parse","simplify","typed","OperatorNode"],tJ=Lr(CS,eJ,T=>{var{parse:N,simplify:V,typed:Y,OperatorNode:X}=T;function J(R,F){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=new X("-","subtract",[R,F]),m=V(i,{},e);return Bi(m)&&!m.value}return Y(CS,{"Node, Node":J,"Node, Node, Object":J})}),DS="derivative",rJ=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],nJ=Lr(DS,rJ,T=>{var{typed:N,config:V,parse:Y,simplify:X,equal:J,isZero:R,numeric:F,ConstantNode:e,FunctionNode:i,OperatorNode:m,ParenthesisNode:t,SymbolNode:y}=T;function p(o,c){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},b={};r(b,o,c.name);var g=n(o,b);return s.simplify?X(g):g}N.addConversion({from:"identifier",to:"SymbolNode",convert:Y});var l=N(DS,{"Node, SymbolNode":p,"Node, SymbolNode, Object":p});N.removeConversion({from:"identifier",to:"SymbolNode",convert:Y}),l._simplify=!0,l.toTex=function(o){return d.apply(null,o.args)};var d=N("_derivTex",{"Node, SymbolNode":function(c,s){return Bi(c)&&wo(c.value)==="string"?d(Y(c.value).toString(),s.toString(),1):d(c.toTex(),s.toString(),1)},"Node, ConstantNode":function(c,s){if(wo(s.value)==="string")return d(c,Y(s.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(c,s,b){return d(c.toString(),s.name,b.value)},"string, string, number":function(c,s,b){var g;return b===1?g="{d\\over d"+s+"}":g="{d^{"+b+"}\\over d"+s+"^{"+b+"}}",g+"\\left[".concat(c,"\\right]")}}),r=N("constTag",{"Object, ConstantNode, string":function(c,s){return c[s]=!0,!0},"Object, SymbolNode, string":function(c,s,b){return s.name!==b?(c[s]=!0,!0):!1},"Object, ParenthesisNode, string":function(c,s,b){return r(c,s.content,b)},"Object, FunctionAssignmentNode, string":function(c,s,b){return s.params.indexOf(b)===-1?(c[s]=!0,!0):r(c,s.expr,b)},"Object, FunctionNode | OperatorNode, string":function(c,s,b){if(s.args.length>0){for(var g=r(c,s.args[0],b),A=1;A0){var g=c.args.filter(function(w){return s[w]===void 0}),A=g.length===1?g[0]:new m("*","multiply",g),v=b.concat(n(A,s));return new m("*","multiply",v)}return new m("+","add",c.args.map(function(w){return new m("*","multiply",c.args.map(function(M){return M===w?n(M,s):M.clone()}))}))}if(c.op==="/"&&c.isBinary()){var h=c.args[0],x=c.args[1];return s[x]!==void 0?new m("/","divide",[n(h,s),x]):s[h]!==void 0?new m("*","multiply",[new m("-","unaryMinus",[h]),new m("/","divide",[n(x,s),new m("^","pow",[x.clone(),a(2)])])]):new m("/","divide",[new m("-","subtract",[new m("*","multiply",[n(h,s),x.clone()]),new m("*","multiply",[h.clone(),n(x,s)])]),new m("^","pow",[x.clone(),a(2)])])}if(c.op==="^"&&c.isBinary()){var C=c.args[0],D=c.args[1];if(s[C]!==void 0)return Bi(C)&&(R(C.value)||J(C.value,1))?a(0):new m("*","multiply",[c,new m("*","multiply",[new i("log",[C.clone()]),n(D.clone(),s)])]);if(s[D]!==void 0){if(Bi(D)){if(R(D.value))return a(0);if(J(D.value,1))return n(C,s)}var L=new m("^","pow",[C.clone(),new m("-","subtract",[D,a(1)])]);return new m("*","multiply",[D.clone(),new m("*","multiply",[n(C,s),L])])}return new m("*","multiply",[new m("^","pow",[C.clone(),D.clone()]),new m("+","add",[new m("*","multiply",[n(C,s),new m("/","divide",[D.clone(),C.clone()])]),new m("*","multiply",[n(D,s),new i("log",[C.clone()])])])])}throw new Error('Operator "'+c.op+'" is not supported by derivative, or a wrong number of arguments is passed')}});function u(o){if(!((o.name==="log"||o.name==="nthRoot"||o.name==="pow")&&o.args.length===2)){for(var c=0;c{var{config:N,typed:V,equal:Y,isZero:X,add:J,subtract:R,multiply:F,divide:e,pow:i,parse:m,simplifyConstant:t,simplifyCore:y,simplify:p,fraction:l,bignumber:d,mathWithTransform:r,matrix:n,AccessorNode:u,ArrayNode:a,ConstantNode:o,FunctionNode:c,IndexNode:s,ObjectNode:b,OperatorNode:g,SymbolNode:A,ParenthesisNode:v}=T;function h(w){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,f=C(),P=x(w,M,!0,f.firstRules),E=P.variables.length,k={exactFractions:!1},O={exactFractions:!0};if(w=P.expression,E>=1){w=D(w);var G,z,U=!0,H=!1;w=p(w,f.firstRules,{},k);for(var B;z=U?f.distrDivRules:f.sucDivRules,w=p(w,z,{},O),U=!U,B=w.toString(),B!==G;)H=!0,G=B;H&&(w=p(w,f.firstRulesAgain,{},k)),w=p(w,f.finalRules,{},k)}var W=[],q={};return w.type==="OperatorNode"&&w.isBinary()&&w.op==="/"?(E===1&&(w.args[0]=L(w.args[0],W),w.args[1]=L(w.args[1])),S&&(q.numerator=w.args[0],q.denominator=w.args[1])):(E===1&&(w=L(w,W)),S&&(q.numerator=w,q.denominator=null)),S?(q.coefficients=W,q.variables=P.variables,q.expression=w,q):w}return V(LS,{Node:h,"Node, boolean":(w,M)=>h(w,{},M),"Node, Object":h,"Node, Object, boolean":h});function x(w,M,S,f){var P=[],E=p(w,f,M,{exactFractions:!1});S=!!S;var k="+-*"+(S?"/":"");G(E);var O={};return O.expression=E,O.variables=P,O;function G(z){var U=z.type;if(U==="FunctionNode")throw new Error("There is an unsolved function call");if(U==="OperatorNode")if(z.op==="^"){if(z.args[1].type!=="ConstantNode"||!Ya(parseFloat(z.args[1].value)))throw new Error("There is a non-integer exponent");G(z.args[0])}else{if(k.indexOf(z.op)===-1)throw new Error("Operator "+z.op+" invalid in polynomial expression");for(var H=0;H1;if(f==="OperatorNode"&&w.isBinary()){var E=!1,k;if(w.op==="^"&&(w.args[0].type==="ParenthesisNode"||w.args[0].type==="OperatorNode")&&w.args[1].type==="ConstantNode"&&(k=parseFloat(w.args[1].value),E=k>=2&&Ya(k)),E){if(k>2){var O=w.args[0],G=new g("^","pow",[w.args[0].cloneDeep(),new o(k-1)]);w=new g("*","multiply",[O,G])}else w=new g("*","multiply",[w.args[0],w.args[0].cloneDeep()]);P&&(S==="content"?M.content=w:M.args[S]=w)}}if(f==="ParenthesisNode")D(w.content,w,"content");else if(f!=="ConstantNode"&&f!=="SymbolNode")for(var z=0;z=0;O--)if(M[O]!==0){var G=new o(E?M[O]:Math.abs(M[O])),z=M[O]<0?"-":"+";if(O>0){var U=new A(P);if(O>1){var H=new o(O);U=new g("^","pow",[U,H])}M[O]===-1&&E?G=new g("-","unaryMinus",[U]):Math.abs(M[O])===1?G=U:G=new g("*","multiply",[G,U])}E?k=G:z==="+"?k=new g("+","add",[k,G]):k=new g("-","subtract",[k,G]),E=!1}if(E)return new o(0);return k;function B(W,q,re){var ie=W.type;if(ie==="FunctionNode")throw new Error("There is an unsolved function call");if(ie==="OperatorNode"){if("+-*^".indexOf(W.op)===-1)throw new Error("Operator "+W.op+" invalid");if(q!==null){if((W.fn==="unaryMinus"||W.fn==="pow")&&q.fn!=="add"&&q.fn!=="subtract"&&q.fn!=="multiply")throw new Error("Invalid "+W.op+" placing");if((W.fn==="subtract"||W.fn==="add"||W.fn==="multiply")&&q.fn!=="add"&&q.fn!=="subtract")throw new Error("Invalid "+W.op+" placing");if((W.fn==="subtract"||W.fn==="add"||W.fn==="unaryMinus")&&re.noFil!==0)throw new Error("Invalid "+W.op+" placing")}(W.op==="^"||W.op==="*")&&(re.fire=W.op);for(var le=0;lef&&(M[he]=0),M[he]+=re.cte*(re.oper==="+"?1:-1),f=Math.max(he,f);return}re.cte=he,re.fire===""&&(M[0]+=re.cte*(re.oper==="+"?1:-1))}else throw new Error("Type "+ie+" is not allowed")}}}),oJ="reviver",sJ=["classes"],lJ=Lr(oJ,sJ,T=>{var{classes:N}=T;return function(Y,X){var J=N[X&&X.mathjs];return J&&typeof J.fromJSON=="function"?J.fromJSON(X):X}}),uJ="replacer",fJ=[],cJ=Lr(uJ,fJ,()=>function(N,V){return typeof V=="number"&&(!isFinite(V)||isNaN(V))?{mathjs:"number",value:String(V)}:V}),hJ="11.8.0",vJ=Lr("true",[],()=>!0),dJ=Lr("false",[],()=>!1),pJ=Lr("null",[],()=>null),gJ=Nu("Infinity",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(1/0):1/0}),mJ=Nu("NaN",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(NaN):NaN}),yJ=Nu("pi",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?F3(V):$I}),xJ=Nu("tau",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?gH(V):KI}),bJ=Nu("e",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?dH(V):JI}),wJ=Nu("phi",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?pH(V):QI}),AJ=Nu("LN2",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(2).ln():Math.LN2}),TJ=Nu("LN10",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(10).ln():Math.LN10}),MJ=Nu("LOG2E",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(1).div(new V(2).ln()):Math.LOG2E}),SJ=Nu("LOG10E",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(1).div(new V(10).ln()):Math.LOG10E}),EJ=Nu("SQRT1_2",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V("0.5").sqrt():Math.SQRT1_2}),CJ=Nu("SQRT2",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(2).sqrt():Math.SQRT2}),DJ=Nu("i",["Complex"],T=>{var{Complex:N}=T;return N.I}),LJ=Lr("version",[],()=>hJ);function Nu(T,N,V){return Lr(T,N,V,{recreateOnConfigChange:!0})}var PJ=oi("speedOfLight","299792458","m s^-1"),NJ=oi("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),RJ=oi("planckConstant","6.62607015e-34","J s"),FJ=oi("reducedPlanckConstant","1.0545718176461565e-34","J s"),IJ=oi("magneticConstant","1.25663706212e-6","N A^-2"),_J=oi("electricConstant","8.8541878128e-12","F m^-1"),OJ=oi("vacuumImpedance","376.730313667","ohm"),zJ=oi("coulomb","8.987551792261171e9","N m^2 C^-2"),kJ=oi("elementaryCharge","1.602176634e-19","C"),BJ=oi("bohrMagneton","9.2740100783e-24","J T^-1"),UJ=oi("conductanceQuantum","7.748091729863649e-5","S"),HJ=oi("inverseConductanceQuantum","12906.403729652257","ohm"),VJ=oi("magneticFluxQuantum","2.0678338484619295e-15","Wb"),GJ=oi("nuclearMagneton","5.0507837461e-27","J T^-1"),WJ=oi("klitzing","25812.807459304513","ohm"),YJ=oi("bohrRadius","5.29177210903e-11","m"),ZJ=oi("classicalElectronRadius","2.8179403262e-15","m"),XJ=oi("electronMass","9.1093837015e-31","kg"),jJ=oi("fermiCoupling","1.1663787e-5","GeV^-2"),$J=X1("fineStructure",.0072973525693),KJ=oi("hartreeEnergy","4.3597447222071e-18","J"),JJ=oi("protonMass","1.67262192369e-27","kg"),QJ=oi("deuteronMass","3.3435830926e-27","kg"),qJ=oi("neutronMass","1.6749271613e-27","kg"),eQ=oi("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),tQ=oi("rydberg","10973731.568160","m^-1"),rQ=oi("thomsonCrossSection","6.6524587321e-29","m^2"),nQ=X1("weakMixingAngle",.2229),aQ=X1("efimovFactor",22.7),iQ=oi("atomicMass","1.66053906660e-27","kg"),oQ=oi("avogadro","6.02214076e23","mol^-1"),sQ=oi("boltzmann","1.380649e-23","J K^-1"),lQ=oi("faraday","96485.33212331001","C mol^-1"),uQ=oi("firstRadiation","3.7417718521927573e-16","W m^2"),fQ=oi("loschmidt","2.686780111798444e25","m^-3"),cQ=oi("gasConstant","8.31446261815324","J K^-1 mol^-1"),hQ=oi("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),vQ=oi("molarVolume","0.022413969545014137","m^3 mol^-1"),dQ=X1("sackurTetrode",-1.16487052358),pQ=oi("secondRadiation","0.014387768775039337","m K"),gQ=oi("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),mQ=oi("wienDisplacement","2.897771955e-3","m K"),yQ=oi("molarMass","0.99999999965e-3","kg mol^-1"),xQ=oi("molarMassC12","11.9999999958e-3","kg mol^-1"),bQ=oi("gravity","9.80665","m s^-2"),wQ=oi("planckLength","1.616255e-35","m"),AQ=oi("planckMass","2.176435e-8","kg"),TQ=oi("planckTime","5.391245e-44","s"),MQ=oi("planckCharge","1.87554603778e-18","C"),SQ=oi("planckTemperature","1.416785e+32","K");function oi(T,N,V){var Y=["config","Unit","BigNumber"];return Lr(T,Y,X=>{var{config:J,Unit:R,BigNumber:F}=X,e=J.number==="BigNumber"?new F(N):parseFloat(N),i=new R(e,V);return i.fixPrefix=!0,i})}function X1(T,N){var V=["config","BigNumber"];return Lr(T,V,Y=>{var{config:X,BigNumber:J}=Y;return X.number==="BigNumber"?new J(N):N})}var EQ="apply",CQ=["typed","isInteger"],DQ=Lr(EQ,CQ,T=>{var{typed:N,isInteger:V}=T,Y=CC({typed:N,isInteger:V});return N("apply",{"...any":function(J){var R=J[1];Ni(R)?J[1]=R-1:Ei(R)&&(J[1]=R.minus(1));try{return Y.apply(null,J)}catch(F){throw Gl(F)}}})},{isTransformFunction:!0}),LQ="column",PQ=["typed","Index","matrix","range"],NQ=Lr(LQ,PQ,T=>{var{typed:N,Index:V,matrix:Y,range:X}=T,J=NC({typed:N,Index:V,matrix:Y,range:X});return N("column",{"...any":function(F){var e=F.length-1,i=F[e];Ni(i)&&(F[e]=i-1);try{return J.apply(null,F)}catch(m){throw Gl(m)}}})},{isTransformFunction:!0});function O3(T,N,V){var Y=T.filter(function(F){return _s(F)&&!(F.name in N)&&!V.has(F.name)})[0];if(!Y)throw new Error('No undefined variable found in inline expression "'+T+'"');var X=Y.name,J=hg(V),R=T.compile();return function(e){return J.set(X,e),R.evaluate(J)}}var RQ="filter",FQ=["typed"],IQ=Lr(RQ,FQ,T=>{var{typed:N}=T;function V(X,J,R){var F,e;return X[0]&&(F=X[0].compile().evaluate(R)),X[1]&&(_s(X[1])||Kg(X[1])?e=X[1].compile().evaluate(R):e=O3(X[1],J,R)),Y(F,e)}V.rawArgs=!0;var Y=N("filter",{"Array, function":PS,"Matrix, function":function(J,R){return J.create(PS(J.toArray(),R))},"Array, RegExp":qy,"Matrix, RegExp":function(J,R){return J.create(qy(J.toArray(),R))}});return V},{isTransformFunction:!0});function PS(T,N){var V=Vv(N);return d8(T,function(Y,X,J){return V===1?N(Y):V===2?N(Y,[X+1]):N(Y,[X+1],J)})}var _Q="forEach",OQ=["typed"],zQ=Lr(_Q,OQ,T=>{var{typed:N}=T;function V(X,J,R){var F,e;return X[0]&&(F=X[0].compile().evaluate(R)),X[1]&&(_s(X[1])||Kg(X[1])?e=X[1].compile().evaluate(R):e=O3(X[1],J,R)),Y(F,e)}V.rawArgs=!0;var Y=N("forEach",{"Array | Matrix, function":function(J,R){var F=Vv(R),e=function i(m,t){Array.isArray(m)?k1(m,function(y,p){i(y,t.concat(p+1))}):F===1?R(m):F===2?R(m,t):R(m,t,J)};e(J.valueOf(),[])}});return V},{isTransformFunction:!0}),kQ="index",BQ=["Index"],UQ=Lr(kQ,BQ,T=>{var{Index:N}=T;return function(){for(var Y=[],X=0,J=arguments.length;X0?0:2;else if(R&&R.isSet===!0)R=R.map(function(e){return e-1});else if(ro(R)||Qa(R))R=R.map(function(e){return e-1});else if(Ni(R))R--;else if(Ei(R))R=R.toNumber()-1;else if(typeof R!="string")throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");Y[X]=R}var F=new N;return N.apply(F,Y),F}},{isTransformFunction:!0}),HQ="map",VQ=["typed"],GQ=Lr(HQ,VQ,T=>{var{typed:N}=T;function V(X,J,R){var F,e;return X[0]&&(F=X[0].compile().evaluate(R)),X[1]&&(_s(X[1])||Kg(X[1])?e=X[1].compile().evaluate(R):e=O3(X[1],J,R)),Y(F,e)}V.rawArgs=!0;var Y=N("map",{"Array, function":function(J,R){return NS(J,R,J)},"Matrix, function":function(J,R){return J.create(NS(J.valueOf(),R,J))}});return V},{isTransformFunction:!0});function NS(T,N,V){var Y=Vv(N);function X(J,R){return Array.isArray(J)?Eh(J,function(F,e){return X(F,R.concat(e+1))}):Y===1?N(J):Y===2?N(J,R):N(J,R,V)}return X(T,[])}function Zd(T){if(T.length===2&&Lc(T[0])){T=T.slice();var N=T[1];Ni(N)?T[1]=N-1:Ei(N)&&(T[1]=N.minus(1))}return T}var WQ="max",YQ=["typed","config","numeric","larger"],ZQ=Lr(WQ,YQ,T=>{var{typed:N,config:V,numeric:Y,larger:X}=T,J=kC({typed:N,config:V,numeric:Y,larger:X});return N("max",{"...any":function(F){F=Zd(F);try{return J.apply(null,F)}catch(e){throw Gl(e)}}})},{isTransformFunction:!0}),XQ="mean",jQ=["typed","add","divide"],$Q=Lr(XQ,jQ,T=>{var{typed:N,add:V,divide:Y}=T,X=XC({typed:N,add:V,divide:Y});return N("mean",{"...any":function(R){R=Zd(R);try{return X.apply(null,R)}catch(F){throw Gl(F)}}})},{isTransformFunction:!0}),KQ="min",JQ=["typed","config","numeric","smaller"],QQ=Lr(KQ,JQ,T=>{var{typed:N,config:V,numeric:Y,smaller:X}=T,J=BC({typed:N,config:V,numeric:Y,smaller:X});return N("min",{"...any":function(F){F=Zd(F);try{return J.apply(null,F)}catch(e){throw Gl(e)}}})},{isTransformFunction:!0}),qQ="range",eq=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq"],tq=Lr(qQ,eq,T=>{var{typed:N,config:V,matrix:Y,bignumber:X,smaller:J,smallerEq:R,larger:F,largerEq:e}=T,i=_C({typed:N,config:V,matrix:Y,bignumber:X,smaller:J,smallerEq:R,larger:F,largerEq:e});return N("range",{"...any":function(t){var y=t.length-1,p=t[y];return typeof p!="boolean"&&t.push(!0),i.apply(null,t)}})},{isTransformFunction:!0}),rq="row",nq=["typed","Index","matrix","range"],aq=Lr(rq,nq,T=>{var{typed:N,Index:V,matrix:Y,range:X}=T,J=OC({typed:N,Index:V,matrix:Y,range:X});return N("row",{"...any":function(F){var e=F.length-1,i=F[e];Ni(i)&&(F[e]=i-1);try{return J.apply(null,F)}catch(m){throw Gl(m)}}})},{isTransformFunction:!0}),iq="subset",oq=["typed","matrix"],sq=Lr(iq,oq,T=>{var{typed:N,matrix:V}=T,Y=zC({typed:N,matrix:V});return N("subset",{"...any":function(J){try{return Y.apply(null,J)}catch(R){throw Gl(R)}}})},{isTransformFunction:!0}),lq="concat",uq=["typed","matrix","isInteger"],fq=Lr(lq,uq,T=>{var{typed:N,matrix:V,isInteger:Y}=T,X=LC({typed:N,matrix:V,isInteger:Y});return N("concat",{"...any":function(R){var F=R.length-1,e=R[F];Ni(e)?R[F]=e-1:Ei(e)&&(R[F]=e.minus(1));try{return X.apply(null,R)}catch(i){throw Gl(i)}}})},{isTransformFunction:!0}),RS="diff",cq=["typed","matrix","subtract","number","bignumber"],hq=Lr(RS,cq,T=>{var{typed:N,matrix:V,subtract:Y,number:X,bignumber:J}=T,R=RC({typed:N,matrix:V,subtract:Y,number:X,bignumber:J});return N(RS,{"...any":function(e){e=Zd(e);try{return R.apply(null,e)}catch(i){throw Gl(i)}}})},{isTransformFunction:!0}),vq="std",dq=["typed","map","sqrt","variance"],pq=Lr(vq,dq,T=>{var{typed:N,map:V,sqrt:Y,variance:X}=T,J=$C({typed:N,map:V,sqrt:Y,variance:X});return N("std",{"...any":function(F){F=Zd(F);try{return J.apply(null,F)}catch(e){throw Gl(e)}}})},{isTransformFunction:!0}),FS="sum",gq=["typed","config","add","numeric"],mq=Lr(FS,gq,T=>{var{typed:N,config:V,add:Y,numeric:X}=T,J=YC({typed:N,config:V,add:Y,numeric:X});return N(FS,{"...any":function(F){F=Zd(F);try{return J.apply(null,F)}catch(e){throw Gl(e)}}})},{isTransformFunction:!0}),IS="cumsum",yq=["typed","add","unaryPlus"],xq=Lr(IS,yq,T=>{var{typed:N,add:V,unaryPlus:Y}=T,X=ZC({typed:N,add:V,unaryPlus:Y});return N(IS,{"...any":function(R){if(R.length===2&&Lc(R[0])){var F=R[1];Ni(F)?R[1]=F-1:Ei(F)&&(R[1]=F.minus(1))}try{return X.apply(null,R)}catch(e){throw Gl(e)}}})},{isTransformFunction:!0}),_S="variance",bq=["typed","add","subtract","multiply","divide","apply","isNaN"],wq=Lr(_S,bq,T=>{var{typed:N,add:V,subtract:Y,multiply:X,divide:J,apply:R,isNaN:F}=T,e=jC({typed:N,add:V,subtract:Y,multiply:X,divide:J,apply:R,isNaN:F});return N(_S,{"...any":function(m){m=Zd(m);try{return e.apply(null,m)}catch(t){throw Gl(t)}}})},{isTransformFunction:!0}),ma=EI({config:jn}),To=LI({}),OS=bJ({BigNumber:ma,config:jn}),Aq=dJ({}),Tq=$J({BigNumber:ma,config:jn}),Xd=RI({}),aD=DJ({Complex:To}),Mq=gJ({BigNumber:ma,config:jn}),Sq=TJ({BigNumber:ma,config:jn}),Eq=SJ({BigNumber:ma,config:jn}),j1=kI({}),Cq=mJ({BigNumber:ma,config:jn}),Dq=pJ({}),Lq=wJ({BigNumber:ma,config:jn}),Pq=_I({}),iD=PF({}),Nq=EJ({BigNumber:ma,config:jn}),Rq=dQ({BigNumber:ma,config:jn}),oD=xJ({BigNumber:ma,config:jn}),Fq=vJ({}),Iq=LJ({}),di=VI({Matrix:j1}),_q=aQ({BigNumber:ma,config:jn}),Oq=AJ({BigNumber:ma,config:jn}),zS=yJ({BigNumber:ma,config:jn}),zq=cJ({}),kq=CJ({BigNumber:ma,config:jn}),$r=EF({BigNumber:ma,Complex:To,DenseMatrix:di,Fraction:Xd}),z3=q_({BigNumber:ma,config:jn,typed:$r}),Bq=nQ({BigNumber:ma,config:jn}),uu=tO({typed:$r}),Uq=CH({Complex:To,config:jn,typed:$r}),Hq=NH({BigNumber:ma,typed:$r}),Vq=_H({BigNumber:ma,Complex:To,config:jn,typed:$r}),gs=iO({typed:$r}),Gq=jz({typed:$r}),Wq=HH({BigNumber:ma,Complex:To,config:jn,typed:$r}),Yq=ZH({typed:$r}),sD=$H({typed:$r}),Zq=qH({Complex:To,config:jn,typed:$r}),Rc=F_({BigNumber:ma,typed:$r}),Xq=Uz({typed:$r}),jq=P_({typed:$r}),$q=WI({typed:$r}),$1=eK({typed:$r}),K1=O_({Complex:To,typed:$r}),jd=Kz({typed:$r}),Kq=nV({typed:$r}),Jq=sV({BigNumber:ma,typed:$r}),Qq=uV({BigNumber:ma,typed:$r}),qq=yO({typed:$r}),Ri=y_({config:jn,typed:$r}),eee=vB({typed:$r}),lD=bO({typed:$r}),tee=AO({Complex:To,typed:$r}),ree=mk({typed:$r}),nee=wk({typed:$r}),qg=AB({typed:$r}),aee=Mk({typed:$r}),iee=DB({format:qg,typed:$r}),k3=Qz({typed:$r}),uf=ZI({typed:$r}),b0=n_({typed:$r}),J1=u_({typed:$r}),qf=c_({typed:$r}),oee=MJ({BigNumber:ma,config:jn}),see=oK({Complex:To,typed:$r}),lee=qO({Complex:To,config:jn,typed:$r}),uD=tz({Complex:To,config:jn,typed:$r}),w0=Pk({typed:$r}),qo=fz({typed:$r}),fD=rk({typed:$r}),Wv=E_({typed:$r}),uee=EB({format:qg,typed:$r}),fee=EK({config:jn,typed:$r}),cee=PB({typed:$r}),hee=DK({config:jn,typed:$r}),B3=ek({typed:$r}),vee=vV({BigNumber:ma,typed:$r}),cD=gz({BigNumber:ma,Fraction:Xd,complex:K1,typed:$r}),U3=mV({typed:$r}),Ih=w_({Matrix:j1,equalScalar:Ri,typed:$r}),dee=$_({typed:$r}),pee=wz({typed:$r}),gee=D_({typed:$r}),mee=wV({typed:$r}),hD=p_({typed:$r}),yee=LH({Complex:To,config:jn,typed:$r}),xee=zH({BigNumber:ma,typed:$r}),H3=CC({isInteger:uf,typed:$r}),bee=BH({BigNumber:ma,Complex:To,config:jn,typed:$r}),wee=MB({format:qg,typed:$r}),Aee=rK({typed:$r}),V3=tV({typed:$r}),Tee=cV({BigNumber:ma,typed:$r}),em=v_({typed:$r}),Mee=IB({typed:$r}),See=PK({config:jn,typed:$r}),Eee=pV({BigNumber:ma,typed:$r}),Cee=xV({typed:$r}),Dee=TH({SparseMatrix:Ih,typed:$r}),Ic=xz({Complex:To,config:jn,typed:$r}),Lee=MV({typed:$r}),_c=J_({typed:$r}),Pee=FH({BigNumber:ma,Complex:To,config:jn,typed:$r}),Nee=iV({BigNumber:ma,typed:$r}),A0=B_({Fraction:Xd,typed:$r}),$d=i_({typed:$r}),ba=H_({DenseMatrix:di,Matrix:j1,SparseMatrix:Ih,typed:$r}),Ree=G_({isZero:qf,matrix:ba,typed:$r}),Fee=yB({isNaN:em,isNumeric:$d,typed:$r}),Xf=zB({bignumber:Rc,fraction:A0,number:Wv}),vD=bB({config:jn,multiplyScalar:qo,numeric:Xf,typed:$r}),Iee=kk({isInteger:uf,matrix:ba,typed:$r}),wl=jk({matrix:ba,config:jn,typed:$r}),_ee=Kk({matrix:ba,typed:$r}),Ru=zC({matrix:ba,typed:$r}),tm=rB({matrix:ba,typed:$r}),dD=Sz({BigNumber:ma,config:jn,matrix:ba,typed:$r}),Oc=oB({BigNumber:ma,config:jn,matrix:ba,typed:$r}),Oee=GH({Complex:To,config:jn,typed:$r}),pD=sO({BigNumber:ma,Complex:To,Fraction:Xd,config:jn,isNegative:b0,matrix:ba,typed:$r,unaryMinus:_c}),Ki=LC({isInteger:uf,matrix:ba,typed:$r}),zee=fk({prod:vD,size:wl,typed:$r}),G3=aB({conj:jd,transpose:tm,typed:$r}),gD=dk({DenseMatrix:di,SparseMatrix:Ih,matrix:ba,typed:$r}),_o=BB({numeric:Xf,typed:$r}),rm=qB({DenseMatrix:di,concat:Ki,divideScalar:_o,equalScalar:Ri,matrix:ba,typed:$r}),ec=CU({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),nm=xk({matrix:ba,typed:$r}),kee=YO({BigNumber:ma,DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),Bee=s_({isNumeric:$d,typed:$r}),Yv=Ek({BigNumber:ma,DenseMatrix:di,SparseMatrix:Ih,config:jn,matrix:ba,typed:$r}),Uee=Dk({matrix:ba,multiplyScalar:qo,typed:$r}),Q1=HU({DenseMatrix:di,concat:Ki,config:jn,matrix:ba,typed:$r}),Hee=cU({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r,zeros:Oc}),W3=X_({flatten:nm,matrix:ba,size:wl,typed:$r}),mD=sz({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),Vee=dz({BigNumber:ma,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),Gee=_k({BigNumber:ma,config:jn,matrix:ba,typed:$r}),Wee=Hk({config:jn,matrix:ba}),Yee=vU({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r,zeros:Oc}),q1=GB({BigNumber:ma,DenseMatrix:di,equalScalar:Ri,matrix:ba,typed:$r,zeros:Oc}),ff=RU({DenseMatrix:di,concat:Ki,config:jn,matrix:ba,typed:$r}),Zee=RB({concat:Ki,matrix:ba,typed:$r}),Xee=ZU({DenseMatrix:di,concat:Ki,config:jn,equalScalar:Ri,matrix:ba,typed:$r}),jee=ok({DenseMatrix:di,concat:Ki,matrix:ba,typed:$r}),Ao=ZV({DenseMatrix:di,SparseMatrix:Ih,addScalar:gs,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),$ee=kz({concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),Kee=Zz({DenseMatrix:di,concat:Ki,matrix:ba,typed:$r}),Jee=OK({addScalar:gs,combinations:$1,divideScalar:_o,isInteger:uf,isNegative:b0,multiplyScalar:qo,typed:$r}),T0=xU({BigNumber:ma,DenseMatrix:di,Fraction:Xd,concat:Ki,config:jn,equalScalar:Ri,matrix:ba,typed:$r}),yD=SU({concat:Ki,matrix:ba,typed:$r}),Qee=ZC({add:Ao,typed:$r,unaryPlus:z3}),xD=WU({equal:ec,typed:$r}),ex=QV({addScalar:gs,conj:jd,multiplyScalar:qo,size:wl,typed:$r}),qee=PU({compareText:yD,isZero:qf,typed:$r}),bD=DO({DenseMatrix:di,config:jn,equalScalar:Ri,matrix:ba,round:q1,typed:$r,zeros:Oc}),ete=jV({abs:uu,addScalar:gs,divideScalar:_o,isPositive:J1,multiplyScalar:qo,smaller:ff,sqrt:Ic,typed:$r}),wD=rH({DenseMatrix:di,smaller:ff}),ml=iH({ImmutableDenseMatrix:wD}),tte=Cz({BigNumber:ma,add:Ao,config:jn,equal:ec,isInteger:uf,mod:mD,smaller:ff,typed:$r,xgcd:dD}),cf=kU({DenseMatrix:di,concat:Ki,config:jn,matrix:ba,typed:$r}),Y3=YB({Complex:To,config:jn,divideScalar:_o,typed:$r}),rte=Y_({flatten:nm,matrix:ba,size:wl,typed:$r}),nte=BC({config:jn,numeric:Xf,smaller:ff,typed:$r}),Mo=hz({addScalar:gs,dot:ex,equalScalar:Ri,matrix:ba,multiplyScalar:qo,typed:$r}),ate=$B({Complex:To,config:jn,divideScalar:_o,typed:$r}),ite=ak({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),Z3=$U({compare:T0,isNaN:em,isNumeric:$d,typed:$r}),ote=J$({add:Ao,compare:T0,multiply:Mo,partitionSelect:Z3,typed:$r}),ste=pU({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r,zeros:Oc}),X3=_U({DenseMatrix:di,concat:Ki,config:jn,matrix:ba,typed:$r}),go=Tz({DenseMatrix:di,addScalar:gs,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r,unaryMinus:_c}),lte=tG({add:Ao,matrix:ba,typed:$r}),j3=nU({DenseMatrix:di,divideScalar:_o,equalScalar:Ri,matrix:ba,multiplyScalar:qo,subtract:go,typed:$r}),ute=mU({concat:Ki,equalScalar:Ri,matrix:ba,not:fD,typed:$r,zeros:Oc}),fte=Vz({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),$3=gO({DenseMatrix:di,config:jn,equalScalar:Ri,matrix:ba,round:q1,typed:$r,zeros:Oc}),zc=AU({compare:T0,typed:$r}),cte=kK({addScalar:gs,combinations:$1,isInteger:uf,isNegative:b0,isPositive:J1,larger:cf,typed:$r}),hte=hk({matrix:ba,multiply:Mo,subtract:go,typed:$r}),AD=v$({divideScalar:_o,isZero:qf,matrix:ba,multiply:Mo,subtract:go,typed:$r,unaryMinus:_c}),vte=RC({matrix:ba,number:Wv,subtract:go,typed:$r}),dte=z$({abs:uu,addScalar:gs,divideScalar:_o,multiplyScalar:qo,sqrt:Ic,subtract:go,typed:$r,unaryMinus:_c}),pte=Nz({concat:Ki,equalScalar:Ri,matrix:ba,multiplyScalar:qo,typed:$r}),TD=lH({larger:cf,smaller:ff}),MD=SO({Complex:To,DenseMatrix:di,ceil:$3,equalScalar:Ri,floor:bD,matrix:ba,typed:$r,zeros:Oc}),SD=nG({Index:ml,typed:$r}),gte=U$({abs:uu,add:Ao,addScalar:gs,config:jn,divideScalar:_o,equalScalar:Ri,flatten:nm,isNumeric:$d,isZero:qf,matrix:ba,multiply:Mo,multiplyScalar:qo,smaller:ff,subtract:go,typed:$r}),mte=JO({concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),yte=XB({Complex:To,config:jn,divideScalar:_o,log:Y3,typed:$r}),ED=tU({DenseMatrix:di,divideScalar:_o,equalScalar:Ri,matrix:ba,multiplyScalar:qo,subtract:go,typed:$r}),CD=kC({config:jn,larger:cf,numeric:Xf,typed:$r}),K3=oW({addScalar:gs,complex:K1,conj:jd,divideScalar:_o,equal:ec,identity:Yv,isZero:qf,matrix:ba,multiplyScalar:qo,sign:cD,sqrt:Ic,subtract:go,typed:$r,unaryMinus:_c,zeros:Oc}),c0=_C({bignumber:Rc,matrix:ba,config:jn,larger:cf,largerEq:Q1,smaller:ff,smallerEq:X3,typed:$r}),xte=OC({Index:ml,matrix:ba,range:c0,typed:$r}),bte=EV({DenseMatrix:di,Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),wte=PV({DenseMatrix:di,Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),Ate=IV({Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),Tte=kV({Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),DD=PW({SparseMatrix:Ih,abs:uu,add:Ao,divideScalar:_o,larger:cf,largerEq:Q1,multiply:Mo,subtract:go,transpose:tm,typed:$r}),LD=cH({FibonacciHeap:TD,addScalar:gs,equalScalar:Ri}),PD=YC({add:Ao,config:jn,numeric:Xf,typed:$r}),ND=sU({DenseMatrix:di,divideScalar:_o,equalScalar:Ri,matrix:ba,multiplyScalar:qo,subtract:go,typed:$r}),Mte=JH({BigNumber:ma,DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),RD=NC({Index:ml,matrix:ba,range:c0,typed:$r}),Ste=iU({DenseMatrix:di,divideScalar:_o,equalScalar:Ri,matrix:ba,multiplyScalar:qo,subtract:go,typed:$r}),FD=DV({DenseMatrix:di,Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),Ete=OV({Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),ID=VV({Index:ml,concat:Ki,setDifference:FD,size:wl,subset:Ru,typed:$r}),Cte=JU({compare:T0,compareNatural:zc,matrix:ba,typed:$r}),Kd=p$({abs:uu,addScalar:gs,det:AD,divideScalar:_o,identity:Yv,matrix:ba,multiply:Mo,typed:$r,unaryMinus:_c}),_D=aW({DenseMatrix:di,Spa:LD,SparseMatrix:Ih,abs:uu,addScalar:gs,divideScalar:_o,equalScalar:Ri,larger:cf,matrix:ba,multiplyScalar:qo,subtract:go,typed:$r,unaryMinus:_c}),Dte=m$({Complex:To,add:Ao,ctranspose:G3,deepEqual:xD,divideScalar:_o,dot:ex,dotDivide:rm,equal:ec,inv:Kd,matrix:ba,multiply:Mo,typed:$r}),kc=HB({Complex:To,config:jn,fraction:A0,identity:Yv,inv:Kd,matrix:ba,multiply:Mo,number:Wv,typed:$r}),OD=RV({DenseMatrix:di,Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),Lte=WV({Index:ml,concat:Ki,setIntersect:OD,setSymDifference:ID,size:wl,subset:Ru,typed:$r}),Pte=E$({abs:uu,add:Ao,identity:Yv,inv:Kd,map:w0,max:CD,multiply:Mo,size:wl,sqrt:Ic,subtract:go,typed:$r}),ti=xH({BigNumber:ma,Complex:To,Fraction:Xd,abs:uu,addScalar:gs,config:jn,divideScalar:_o,equal:ec,fix:MD,format:qg,isNumeric:$d,multiplyScalar:qo,number:Wv,pow:kc,round:q1,subtract:go}),Nte=OJ({BigNumber:ma,Unit:ti,config:jn}),Rte=mQ({BigNumber:ma,Unit:ti,config:jn}),Fte=iQ({BigNumber:ma,Unit:ti,config:jn}),Ite=BJ({BigNumber:ma,Unit:ti,config:jn}),_te=sQ({BigNumber:ma,Unit:ti,config:jn}),Ote=UJ({BigNumber:ma,Unit:ti,config:jn}),zte=SH({Unit:ti,typed:$r}),kte=QJ({BigNumber:ma,Unit:ti,config:jn}),Bte=JB({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,pow:kc,typed:$r}),Ute=_J({BigNumber:ma,Unit:ti,config:jn}),Hte=kJ({BigNumber:ma,Unit:ti,config:jn}),Vte=M$({abs:uu,add:Ao,identity:Yv,inv:Kd,multiply:Mo,typed:$r}),Gte=lQ({BigNumber:ma,Unit:ti,config:jn}),zD=lB({addScalar:gs,ceil:$3,conj:jd,divideScalar:_o,dotDivide:rm,exp:lD,i:aD,log2:uD,matrix:ba,multiplyScalar:qo,pow:kc,tau:oD,typed:$r}),kD=aK({BigNumber:ma,Complex:To,config:jn,multiplyScalar:qo,pow:kc,typed:$r}),Wte=NJ({BigNumber:ma,Unit:ti,config:jn}),Yte=KJ({BigNumber:ma,Unit:ti,config:jn}),Zte=fB({conj:jd,dotDivide:rm,fft:zD,typed:$r}),Xte=WJ({BigNumber:ma,Unit:ti,config:jn}),jte=fQ({BigNumber:ma,Unit:ti,config:jn}),$te=IJ({BigNumber:ma,Unit:ti,config:jn}),Kte=yQ({BigNumber:ma,Unit:ti,config:jn}),Jte=hQ({BigNumber:ma,Unit:ti,config:jn}),Qte=qJ({BigNumber:ma,Unit:ti,config:jn}),qte=GJ({BigNumber:ma,Unit:ti,config:jn}),ere=MQ({BigNumber:ma,Unit:ti,config:jn}),tre=wQ({BigNumber:ma,Unit:ti,config:jn}),rre=SQ({BigNumber:ma,Unit:ti,config:jn}),nre=JJ({BigNumber:ma,Unit:ti,config:jn}),are=FJ({BigNumber:ma,Unit:ti,config:jn}),ire=tQ({BigNumber:ma,Unit:ti,config:jn}),ore=pQ({BigNumber:ma,Unit:ti,config:jn}),sre=PJ({BigNumber:ma,Unit:ti,config:jn}),lre=gQ({BigNumber:ma,Unit:ti,config:jn}),ure=rQ({BigNumber:ma,Unit:ti,config:jn}),fre=oQ({BigNumber:ma,Unit:ti,config:jn}),cre=YJ({BigNumber:ma,Unit:ti,config:jn}),hre=zJ({BigNumber:ma,Unit:ti,config:jn}),hf=_$({divideScalar:_o,equalScalar:Ri,inv:Kd,matrix:ba,multiply:Mo,typed:$r}),vre=XJ({BigNumber:ma,Unit:ti,config:jn}),tx=lK({gamma:kD,typed:$r}),dre=uQ({BigNumber:ma,Unit:ti,config:jn}),pre=cQ({BigNumber:ma,Unit:ti,config:jn}),gre=HJ({BigNumber:ma,Unit:ti,config:jn}),BD=RW({DenseMatrix:di,lsolve:ED,lup:_D,matrix:ba,slu:DD,typed:$r,usolve:j3}),mre=VJ({BigNumber:ma,Unit:ti,config:jn}),yre=xQ({BigNumber:ma,Unit:ti,config:jn}),xre=hK({add:Ao,divide:hf,factorial:tx,isInteger:uf,isPositive:J1,multiply:Mo,typed:$r}),bre=dK({factorial:tx,typed:$r}),wre=AQ({BigNumber:ma,Unit:ti,config:jn}),Are=IW({add:Ao,cbrt:pD,divide:hf,equalScalar:Ri,im:k3,isZero:qf,multiply:Mo,re:B3,sqrt:Ic,subtract:go,typeOf:hD,typed:$r,unaryMinus:_c}),Tre=UV({compareNatural:zc,typed:$r}),UD=RK({bignumber:Rc,addScalar:gs,combinations:$1,divideScalar:_o,factorial:tx,isInteger:uf,isNegative:b0,larger:cf,multiplyScalar:qo,number:Wv,pow:kc,subtract:go,typed:$r}),Mre=wH({Unit:ti,typed:$r}),Sre=IK({addScalar:gs,isInteger:uf,isNegative:b0,stirlingS2:UD,typed:$r}),HD=A$({abs:uu,add:Ao,addScalar:gs,atan:sD,bignumber:Rc,column:RD,complex:K1,config:jn,cos:V3,diag:gD,divideScalar:_o,dot:ex,equal:ec,flatten:nm,im:k3,inv:Kd,larger:cf,matrix:ba,matrixFromColumns:W3,multiply:Mo,multiplyScalar:qo,number:Wv,qr:K3,re:B3,sin:U3,smaller:ff,sqrt:Ic,subtract:go,typed:$r,usolve:j3,usolveAll:ND}),Ere=jJ({BigNumber:ma,Unit:ti,config:jn}),Cre=bQ({BigNumber:ma,Unit:ti,config:jn}),Dre=fK({divide:hf,dotDivide:rm,isNumeric:$d,log:Y3,map:w0,matrix:ba,multiply:Mo,sum:PD,typed:$r}),Lre=XC({add:Ao,divide:hf,typed:$r}),Pre=vQ({BigNumber:ma,Unit:ti,config:jn}),Nre=RJ({BigNumber:ma,Unit:ti,config:jn}),Rre=eQ({BigNumber:ma,Unit:ti,config:jn}),J3=jC({add:Ao,apply:H3,divide:hf,isNaN:em,multiply:Mo,subtract:go,typed:$r}),Fre=ZJ({BigNumber:ma,Unit:ti,config:jn}),VD=Y$({add:Ao,compare:T0,divide:hf,partitionSelect:Z3,typed:$r}),Ire=TQ({BigNumber:ma,Unit:ti,config:jn}),_re=$C({map:w0,sqrt:Ic,typed:$r,variance:J3}),Ore=X$({abs:uu,map:w0,median:VD,subtract:go,typed:$r}),Q3=KV({abs:uu,add:Ao,conj:jd,ctranspose:G3,eigs:HD,equalScalar:Ri,larger:cf,matrix:ba,multiply:Mo,pow:kc,smaller:ff,sqrt:Ic,typed:$r}),GD=Yk({BigNumber:ma,DenseMatrix:di,SparseMatrix:Ih,addScalar:gs,config:jn,cos:V3,matrix:ba,multiplyScalar:qo,norm:Q3,sin:U3,typed:$r,unaryMinus:_c}),zre=Gk({multiply:Mo,rotationMatrix:GD,typed:$r}),WD=P$({identity:Yv,matrix:ba,multiply:Mo,norm:Q3,qr:K3,subtract:go,typed:$r}),YD=D$({abs:uu,add:Ao,concat:Ki,identity:Yv,index:SD,lusolve:BD,matrix:ba,matrixFromColumns:W3,multiply:Mo,range:c0,schur:WD,subset:Ru,subtract:go,transpose:tm,typed:$r}),kre=R$({matrix:ba,multiply:Mo,sylvester:YD,transpose:tm,typed:$r}),M0={},S0={},ZD={},Al=oG({mathWithTransform:S0}),E0=RG({Node:Al}),_h=IG({Node:Al}),Jd=OG({Node:Al}),XD=UG({Node:Al}),C0=fG({Node:Al}),jD=gG({Node:Al,ResultSet:iD}),$D=yG({Node:Al}),Zv=EG({Node:Al}),KD=kG({Node:Al}),Bre=lJ({classes:ZD}),q3=UW({math:M0,typed:$r}),JD=DG({Node:Al,typed:$r}),Ure=c$({Chain:q3,typed:$r}),D0=lG({Node:Al,subset:Ru}),L0=PG({Node:Al,size:wl}),QD=dG({matrix:ba,Node:Al,subset:Ru}),Oh=GG({Unit:ti,Node:Al,math:M0}),Xv=YG({Node:Al,SymbolNode:Oh,math:M0}),vf=XG({AccessorNode:D0,ArrayNode:C0,AssignmentNode:QD,BlockNode:jD,ConditionalNode:$D,ConstantNode:Zv,FunctionAssignmentNode:JD,FunctionNode:Xv,IndexNode:L0,ObjectNode:E0,OperatorNode:_h,ParenthesisNode:Jd,RangeNode:KD,RelationalNode:XD,SymbolNode:Oh,config:jn,numeric:Xf,typed:$r}),qD=qK({ConstantNode:Zv,FunctionNode:Xv,OperatorNode:_h,ParenthesisNode:Jd,parse:vf,typed:$r}),ew=jK({bignumber:Rc,fraction:A0,AccessorNode:D0,ArrayNode:C0,ConstantNode:Zv,FunctionNode:Xv,IndexNode:L0,ObjectNode:E0,OperatorNode:_h,SymbolNode:Oh,config:jn,mathWithTransform:S0,matrix:ba,typed:$r}),Hre=$G({parse:vf,typed:$r}),e7=JG({parse:vf,typed:$r}),t7=zW({parse:vf}),r7=eW({evaluate:e7}),tw=KK({AccessorNode:D0,ArrayNode:C0,ConstantNode:Zv,FunctionNode:Xv,IndexNode:L0,ObjectNode:E0,OperatorNode:_h,ParenthesisNode:Jd,SymbolNode:Oh,add:Ao,divide:hf,equal:ec,isZero:qf,multiply:Mo,parse:vf,pow:kc,subtract:go,typed:$r}),Vre=u$({Help:t7,mathWithTransform:S0,typed:$r}),rx=YK({bignumber:Rc,fraction:A0,AccessorNode:D0,ArrayNode:C0,ConstantNode:Zv,FunctionNode:Xv,IndexNode:L0,ObjectNode:E0,OperatorNode:_h,ParenthesisNode:Jd,SymbolNode:Oh,add:Ao,config:jn,divide:hf,equal:ec,isZero:qf,mathWithTransform:S0,matrix:ba,multiply:Mo,parse:vf,pow:kc,resolve:qD,simplifyConstant:ew,simplifyCore:tw,subtract:go,typed:$r}),Gre=tJ({OperatorNode:_h,parse:vf,simplify:rx,typed:$r}),Wre=nJ({ConstantNode:Zv,FunctionNode:Xv,OperatorNode:_h,ParenthesisNode:Jd,SymbolNode:Oh,config:jn,equal:ec,isZero:qf,numeric:Xf,parse:vf,simplify:rx,typed:$r}),Yre=rW({Parser:r7,typed:$r}),Zre=UK({parse:vf,typed:$r}),Xre=iJ({bignumber:Rc,fraction:A0,AccessorNode:D0,ArrayNode:C0,ConstantNode:Zv,FunctionNode:Xv,IndexNode:L0,ObjectNode:E0,OperatorNode:_h,ParenthesisNode:Jd,SymbolNode:Oh,add:Ao,config:jn,divide:hf,equal:ec,isZero:qf,mathWithTransform:S0,matrix:ba,multiply:Mo,parse:vf,pow:kc,simplify:rx,simplifyConstant:ew,simplifyCore:tw,subtract:go,typed:$r});$s(M0,{e:OS,false:Aq,fineStructure:Tq,i:aD,Infinity:Mq,LN10:Sq,LOG10E:Eq,NaN:Cq,null:Dq,phi:Lq,SQRT1_2:Nq,sackurTetrode:Rq,tau:oD,true:Fq,E:OS,version:Iq,efimovFactor:_q,LN2:Oq,pi:zS,replacer:zq,reviver:Bre,SQRT2:kq,typed:$r,unaryPlus:z3,PI:zS,weakMixingAngle:Bq,abs:uu,acos:Uq,acot:Hq,acsc:Vq,addScalar:gs,arg:Gq,asech:Wq,asinh:Yq,atan:sD,atanh:Zq,bignumber:Rc,bitNot:Xq,boolean:jq,clone:$q,combinations:$1,complex:K1,conj:jd,cosh:Kq,coth:Jq,csc:Qq,cube:qq,equalScalar:Ri,erf:eee,exp:lD,expm1:tee,filter:ree,forEach:nee,format:qg,getMatrixDataType:aee,hex:iee,im:k3,isInteger:uf,isNegative:b0,isPositive:J1,isZero:qf,LOG2E:oee,lgamma:see,log10:lee,log2:uD,map:w0,multiplyScalar:qo,not:fD,number:Wv,oct:uee,pickRandom:fee,print:cee,random:hee,re:B3,sec:vee,sign:cD,sin:U3,splitUnit:dee,square:pee,string:gee,tan:mee,typeOf:hD,acosh:yee,acsch:xee,apply:H3,asec:bee,bin:wee,chain:Ure,combinationsWithRep:Aee,cos:V3,csch:Tee,isNaN:em,isPrime:Mee,randomInt:See,sech:Eee,sinh:Cee,sparse:Dee,sqrt:Ic,tanh:Lee,unaryMinus:_c,acoth:Pee,cot:Nee,fraction:A0,isNumeric:$d,matrix:ba,matrixFromFunction:Ree,mode:Fee,numeric:Xf,prod:vD,reshape:Iee,size:wl,squeeze:_ee,subset:Ru,transpose:tm,xgcd:dD,zeros:Oc,asin:Oee,cbrt:pD,concat:Ki,count:zee,ctranspose:G3,diag:gD,divideScalar:_o,dotDivide:rm,equal:ec,flatten:nm,gcd:kee,hasNumericValue:Bee,identity:Yv,kron:Uee,largerEq:Q1,leftShift:Hee,matrixFromColumns:W3,mod:mD,nthRoot:Vee,ones:Gee,resize:Wee,rightArithShift:Yee,round:q1,smaller:ff,to:Zee,unequal:Xee,xor:jee,add:Ao,bitAnd:$ee,bitXor:Kee,catalan:Jee,compare:T0,compareText:yD,cumsum:Qee,deepEqual:xD,dot:ex,equalText:qee,floor:bD,hypot:ete,invmod:tte,larger:cf,log:Y3,matrixFromRows:rte,min:nte,multiply:Mo,nthRoots:ate,or:ite,partitionSelect:Z3,quantileSeq:ote,rightLogShift:ste,smallerEq:X3,subtract:go,trace:lte,usolve:j3,and:ute,bitOr:fte,ceil:$3,compareNatural:zc,composition:cte,cross:hte,det:AD,diff:vte,distance:dte,dotMultiply:pte,fix:MD,index:SD,intersect:gte,lcm:mte,log1p:yte,lsolve:ED,max:CD,qr:K3,range:c0,row:xte,setCartesian:bte,setDistinct:wte,setIsSubset:Ate,setPowerset:Tte,slu:DD,sum:PD,usolveAll:ND,atan2:Mte,column:RD,lsolveAll:Ste,setDifference:FD,setMultiplicity:Ete,setSymDifference:ID,sort:Cte,inv:Kd,lup:_D,pinv:Dte,pow:kc,setIntersect:OD,setUnion:Lte,sqrtm:Pte,vacuumImpedance:Nte,wienDisplacement:Rte,atomicMass:Fte,bohrMagneton:Ite,boltzmann:_te,conductanceQuantum:Ote,createUnit:zte,deuteronMass:kte,dotPow:Bte,electricConstant:Ute,elementaryCharge:Hte,expm:Vte,faraday:Gte,fft:zD,gamma:kD,gravitationConstant:Wte,hartreeEnergy:Yte,ifft:Zte,klitzing:Xte,loschmidt:jte,magneticConstant:$te,molarMass:Kte,molarPlanckConstant:Jte,neutronMass:Qte,nuclearMagneton:qte,planckCharge:ere,planckLength:tre,planckTemperature:rre,protonMass:nre,reducedPlanckConstant:are,rydberg:ire,secondRadiation:ore,speedOfLight:sre,stefanBoltzmann:lre,thomsonCrossSection:ure,avogadro:fre,bohrRadius:cre,coulomb:hre,divide:hf,electronMass:vre,factorial:tx,firstRadiation:dre,gasConstant:pre,inverseConductanceQuantum:gre,lusolve:BD,magneticFluxQuantum:mre,molarMassC12:yre,multinomial:xre,permutations:bre,planckMass:wre,polynomialRoot:Are,setSize:Tre,stirlingS2:UD,unit:Mre,bellNumbers:Sre,eigs:HD,fermiCoupling:Ere,gravity:Cre,kldivergence:Dre,mean:Lre,molarVolume:Pre,planckConstant:Nre,quantumOfCirculation:Rre,variance:J3,classicalElectronRadius:Fre,median:VD,parse:vf,planckTime:Ire,resolve:qD,simplifyConstant:ew,std:_re,compile:Hre,evaluate:e7,mad:Ore,simplifyCore:tw,help:Vre,norm:Q3,rotationMatrix:GD,simplify:rx,symbolicEqual:Gre,derivative:Wre,parser:Yre,rotate:zre,leafCount:Zre,rationalize:Xre,schur:WD,sylvester:YD,lyap:kre,config:jn});$s(S0,M0,{filter:IQ({typed:$r}),forEach:zQ({typed:$r}),map:GQ({typed:$r}),apply:DQ({isInteger:uf,typed:$r}),subset:sq({matrix:ba,typed:$r}),concat:fq({isInteger:uf,matrix:ba,typed:$r}),max:ZQ({config:jn,larger:cf,numeric:Xf,typed:$r}),sum:mq({add:Ao,config:jn,numeric:Xf,typed:$r}),min:QQ({config:jn,numeric:Xf,smaller:ff,typed:$r}),cumsum:xq({add:Ao,typed:$r,unaryPlus:z3}),diff:hq({bignumber:Rc,matrix:ba,number:Wv,subtract:go,typed:$r}),index:UQ({Index:ml}),range:tq({bignumber:Rc,matrix:ba,config:jn,larger:cf,largerEq:Q1,smaller:ff,smallerEq:X3,typed:$r}),row:aq({Index:ml,matrix:ba,range:c0,typed:$r}),column:NQ({Index:ml,matrix:ba,range:c0,typed:$r}),mean:$Q({add:Ao,divide:hf,typed:$r}),variance:wq({add:Ao,apply:H3,divide:hf,isNaN:em,multiply:Mo,subtract:go,typed:$r}),std:pq({map:w0,sqrt:Ic,typed:$r,variance:J3})});$s(ZD,{BigNumber:ma,Complex:To,Fraction:Xd,Matrix:j1,Node:Al,ObjectNode:E0,OperatorNode:_h,ParenthesisNode:Jd,Range:Pq,RelationalNode:XD,ResultSet:iD,ArrayNode:C0,BlockNode:jD,ConditionalNode:$D,ConstantNode:Zv,DenseMatrix:di,RangeNode:KD,Chain:q3,FunctionAssignmentNode:JD,SparseMatrix:Ih,AccessorNode:D0,IndexNode:L0,AssignmentNode:QD,ImmutableDenseMatrix:wD,Index:ml,FibonacciHeap:TD,Spa:LD,Unit:ti,SymbolNode:Oh,FunctionNode:Xv,Help:t7,Parser:r7});q3.createProxy(M0);const jre=()=>{const[T,N]=nf.exports.useState(),[V,Y]=nf.exports.useContext(F1),X=J=>{const R="abcdefghijklmnopqrstuvwxyz".split(""),F={},e=vf(J).transform(function(m){if(m.isConstantNode){const t=R.shift();return F[t]=m.value,new Oh(t)}else return m}),i={asciimathExpr:J,currentScope:F,nodeExpr:e};Y([...V,i])};return nf.exports.useEffect(()=>{async function J(R){try{await fetch("https://api.mathpix.com/v3/text",{method:"POST",headers:{"content-type":"application/json",app_key:"API KEY!"},body:JSON.stringify({src:R,formats:["text","data","html"],data_options:{include_asciimath:!0,include_latex:!0}})}).then(F=>F.json()).then(F=>{console.log(F),X(F.data[0].value.split("=")[1])})}catch(F){console.log(F.message)}}T&&J(T)},[T]),Qo("div",{className:"ast-ctrls-expr-upload-container flex w-1/2 justify-evenly",children:[ni(CR,{setImage:N}),ni(DR,{}),ni(LR,{})]})},$re=()=>Qo("div",{className:"ast-ctrls-expr-analyze-container flex w-1/2 justify-evenly",children:[Qo("div",{className:"ast-ea-icon m-auto text-center",children:[ni("span",{className:"fa-solid fa-calculator","aria-hidden":"true"}),ni("span",{className:"sr-only",children:"Calculator"})]}),Qo("div",{className:"ast-ea-icon m-auto text-center",children:[ni("span",{className:"fa-solid fa-sliders","aria-hidden":"true"}),ni("span",{className:"sr-only",children:"Parametric Analysis"})]}),Qo("div",{className:"ast-ea-icon m-auto text-center",children:[ni("span",{className:"fa-solid fa-wrench","aria-hidden":"true"}),ni("span",{className:"sr-only",children:"Build Functions"})]})]}),Kre=()=>Qo("div",{className:"ast-ctrls-container flex h-9",children:[ni(jre,{}),ni($re,{})]}),Jre=()=>{const[T,N]=nf.exports.useContext(F1);return ni("div",{className:"ast-expr-container flex w-full sm:flex-wrap",children:T?T.map(V=>Qo("div",{className:"ast-expression mt-2 ml-2 w-full font-bold text-black",children:[ni("h2",{className:"text-center text-xl",children:V.asciimathExpr}),ni("p",{children:V.nodeExpr.toString()}),ni("div",{children:Object.keys(V.currentScope).map(Y=>Qo("div",{children:[Qo("label",{htmlFor:Y,children:[Y,": "]}),ni("input",{className:"w-12 rounded-sm border-solid bg-asm_lbrown",id:Y,type:"number",defaultValue:V.currentScope[Y].toString(),onChange:X=>{T.find(J=>J.asciimathExpr===V.asciimathExpr).currentScope[Y]=X.target.value,N([...T])}})]},Y))}),ni("div",{className:"h-1 w-full bg-asm_dgreen"},V.asciimathExpr)]},V.asciimathExpr)):ni("p",{children:"Upload math expression"})})},Qre=()=>Qo("div",{className:"ast-ctrlpnl-container block h-24 w-full bg-asm_lbrown text-sm sm:h-full sm:w-1/4 sm:max-w-xs",children:[ni(Kre,{}),ni(Jre,{})]}),qre=()=>{const T=nf.exports.useState([]);return ni("div",{className:"ast-app-container flex h-full w-full flex-wrap sm:flex-nowrap sm:justify-end",children:Qo(F1.Provider,{value:T,children:[ni(SR,{}),ni(Qre,{})]})})},ene=()=>Qo("div",{className:"flex h-full flex-col",children:[ni("div",{className:"flex-initial",children:ni(xR,{})}),ni("div",{className:"flex-auto",children:ni(qre,{})})]}),tne=document.getElementById("root"),rne=d2.createRoot(tne);rne.render(ni(ene,{})); +In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]},pj={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]},gj={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]},mj={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]},yj={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]},xj={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]},bj={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]},wj={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]},Aj={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]},Tj={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]},Mj={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]},Sj={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]},Ej={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]},Cj={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]},Dj={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]},Lj={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]},Pj={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]},Nj={name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]},Rj={name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]},Fj={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]},Ij={name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]},_j={name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]},Oj={name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]},zj={name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]},kj={name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]},Bj={name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]},Uj={name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]},Hj={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]},Vj={name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]},Gj={name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]},Wj={name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]},Yj={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]},Zj={name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables,and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]},Xj={name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]},jj={name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]},$j={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]},Kj={name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]},Jj={name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero"]},Qj={name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]},qj={name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue"]},e$={name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},t$={name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},r$={name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]},n$={name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "BigNumber")','numeric("4", "Fraction)','numeric(4, "Fraction")','numeric(fraction(2, 5), "number)'],seealso:["number","fraction","bignumber","string","format"]},a$={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]},i$={name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $0, $1, $2", [6, 9, 4])'],seealso:["format"]},o$={name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]},s$={bignumber:rY,boolean:nY,complex:aY,createUnit:iY,fraction:oY,index:sY,matrix:lY,number:uY,sparse:fY,splitUnit:cY,string:hY,unit:vY,e:UM,E:UM,false:HW,i:VW,Infinity:GW,LN2:YW,LN10:WW,LOG2E:XW,LOG10E:ZW,NaN:jW,null:$W,pi:HM,PI:HM,phi:KW,SQRT1_2:JW,SQRT2:QW,tau:qW,true:eY,version:tY,speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant",examples:["coulomb"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Borh magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Borh radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:mY,lsolve:xY,lsolveAll:bY,lup:wY,lusolve:AY,leafCount:yY,polynomialRoot:TY,resolve:EY,simplify:CY,simplifyConstant:DY,simplifyCore:LY,symbolicEqual:NY,rationalize:SY,slu:PY,usolve:RY,usolveAll:FY,qr:MY,abs:IY,add:_Y,cbrt:OY,ceil:zY,cube:kY,divide:BY,dotDivide:UY,dotMultiply:HY,dotPow:VY,exp:GY,expm:WY,expm1:YY,fix:ZY,floor:XY,gcd:jY,hypot:$Y,lcm:JY,log:QY,log2:tZ,log1p:eZ,log10:qY,mod:rZ,multiply:nZ,norm:aZ,nthRoot:iZ,nthRoots:oZ,pow:sZ,round:lZ,sign:uZ,sqrt:fZ,sqrtm:cZ,square:pZ,subtract:gZ,unaryMinus:mZ,unaryPlus:yZ,xgcd:xZ,invmod:KY,bitAnd:bZ,bitNot:wZ,bitOr:AZ,bitXor:TZ,leftShift:MZ,rightArithShift:SZ,rightLogShift:EZ,bellNumbers:CZ,catalan:DZ,composition:LZ,stirlingS2:PZ,config:dY,import:pY,typed:gY,arg:NZ,conj:RZ,re:IZ,im:FZ,evaluate:_Z,help:OZ,distance:zZ,intersect:kZ,and:BZ,not:UZ,or:HZ,xor:VZ,concat:WZ,count:YZ,cross:ZZ,column:GZ,ctranspose:XZ,det:jZ,diag:$Z,diff:KZ,dot:JZ,getMatrixDataType:rX,identity:nX,filter:qZ,flatten:eX,forEach:tX,inv:aX,pinv:iX,eigs:QZ,kron:oX,matrixFromFunction:uX,matrixFromRows:fX,matrixFromColumns:lX,map:sX,ones:cX,partitionSelect:hX,range:vX,resize:pX,reshape:dX,rotate:gX,rotationMatrix:mX,row:yX,size:xX,sort:bX,squeeze:wX,subset:AX,trace:TX,transpose:MX,zeros:SX,fft:EX,ifft:CX,sylvester:hZ,schur:vZ,lyap:dZ,combinations:DX,combinationsWithRep:LX,factorial:PX,gamma:NX,kldivergence:FX,lgamma:RX,multinomial:IX,permutations:_X,pickRandom:OX,random:zX,randomInt:kX,compare:BX,compareNatural:UX,compareText:HX,deepEqual:VX,equal:GX,equalText:WX,larger:YX,largerEq:ZX,smaller:XX,smallerEq:jX,unequal:$X,setCartesian:KX,setDifference:JX,setDistinct:QX,setIntersect:qX,setIsSubset:ej,setMultiplicity:tj,setPowerset:rj,setSize:nj,setSymDifference:aj,setUnion:ij,erf:oj,cumsum:gj,mad:sj,max:lj,mean:uj,median:fj,min:cj,mode:hj,prod:vj,quantileSeq:dj,std:pj,sum:mj,variance:yj,acos:xj,acosh:bj,acot:wj,acoth:Aj,acsc:Tj,acsch:Mj,asec:Sj,asech:Ej,asin:Cj,asinh:Dj,atan:Lj,atanh:Nj,atan2:Pj,cos:Rj,cosh:Fj,cot:Ij,coth:_j,csc:Oj,csch:zj,sec:kj,sech:Bj,sin:Uj,sinh:Hj,tan:Vj,tanh:Gj,to:Wj,clone:Zj,format:Xj,bin:Yj,oct:a$,hex:$j,isNaN:Jj,isInteger:Kj,isNegative:Qj,isNumeric:qj,hasNumericValue:jj,isPositive:e$,isPrime:t$,isZero:r$,print:i$,typeOf:o$,numeric:n$},VM="help",l$=["typed","mathWithTransform","Help"],u$=Lr(VM,l$,T=>{var{typed:N,mathWithTransform:V,Help:Y}=T;return N(VM,{any:function(J){var R,F=J;if(typeof J!="string"){for(R in V)if(ka(V,R)&&J===V[R]){F=R;break}}var e=lf(s$,F);if(!e){var i=typeof F=="function"?F.name:F;throw new Error('No documentation found on "'+i+'"')}return new Y(e)}})}),GM="chain",f$=["typed","Chain"],c$=Lr(GM,f$,T=>{var{typed:N,Chain:V}=T;return N(GM,{"":function(){return new V},any:function(X){return new V(X)}})}),WM="det",h$=["typed","matrix","subtract","multiply","divideScalar","isZero","unaryMinus"],v$=Lr(WM,h$,T=>{var{typed:N,matrix:V,subtract:Y,multiply:X,divideScalar:J,isZero:R,unaryMinus:F}=T;return N(WM,{any:function(m){return ei(m)},"Array | Matrix":function(m){var t;switch(Qa(m)?t=m.size():Array.isArray(m)?(m=V(m),t=m.size()):t=[],t.length){case 0:return ei(m);case 1:if(t[0]===1)return ei(m.valueOf()[0]);if(t[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+vi(t)+")");case 2:{var y=t[0],p=t[1];if(y===p)return e(m.clone().valueOf(),y);if(p===0)return 1;throw new RangeError("Matrix must be square (size: "+vi(t)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+vi(t)+")")}}});function e(i,m,t){if(m===1)return ei(i[0][0]);if(m===2)return Y(X(i[0][0],i[1][1]),X(i[1][0],i[0][1]));for(var y=!1,p=new Array(m).fill(0).map((b,g)=>g),l=0;l{var{typed:N,matrix:V,divideScalar:Y,addScalar:X,multiply:J,unaryMinus:R,det:F,identity:e,abs:i}=T;return N(YM,{"Array | Matrix":function(y){var p=Qa(y)?y.size():Si(y);switch(p.length){case 1:if(p[0]===1)return Qa(y)?V([Y(1,y.valueOf()[0])]):[Y(1,y[0])];throw new RangeError("Matrix must be square (size: "+vi(p)+")");case 2:{var l=p[0],d=p[1];if(l===d)return Qa(y)?V(m(y.valueOf(),l,d),y.storage()):m(y,l,d);throw new RangeError("Matrix must be square (size: "+vi(p)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+vi(p)+")")}},any:function(y){return Y(1,y)}});function m(t,y,p){var l,d,r,n,u;if(y===1){if(n=t[0][0],n===0)throw Error("Cannot calculate inverse, determinant is zero");return[[Y(1,n)]]}else if(y===2){var a=F(t);if(a===0)throw Error("Cannot calculate inverse, determinant is zero");return[[Y(t[1][1],a),Y(R(t[0][1]),a)],[Y(R(t[1][0]),a),Y(t[0][0],a)]]}else{var o=t.concat();for(l=0;lb&&(b=i(o[l][s]),g=l),l++;if(b===0)throw Error("Cannot calculate inverse, determinant is zero");l=g,l!==s&&(u=o[s],o[s]=o[l],o[l]=u,u=c[s],c[s]=c[l],c[l]=u);var A=o[s],v=c[s];for(l=0;l{var{typed:N,matrix:V,inv:Y,deepEqual:X,equal:J,dotDivide:R,dot:F,ctranspose:e,divideScalar:i,multiply:m,add:t,Complex:y}=T;return N(ZM,{"Array | Matrix":function(a){var o=Qa(a)?a.size():Si(a);switch(o.length){case 1:return n(a)?e(a):o[0]===1?Y(a):R(e(a),F(a,a));case 2:{if(n(a))return e(a);var c=o[0],s=o[1];if(c===s)try{return Y(a)}catch(b){if(!(b instanceof Error&&b.message.match(/Cannot calculate inverse, determinant is zero/)))throw b}return Qa(a)?V(p(a.valueOf(),c,s),a.storage()):p(a,c,s)}default:throw new RangeError("Matrix must be two dimensional (size: "+vi(o)+")")}},any:function(a){return J(a,0)?ei(a):i(1,a)}});function p(u,a,o){var{C:c,F:s}=d(u,a,o),b=m(Y(m(e(c),c)),e(c)),g=m(e(s),Y(m(s,e(s))));return m(g,b)}function l(u,a,o){for(var c=ei(u),s=0,b=0;bg.filter((v,h)=>h!r(F(c[A],c[A])));return{C:s,F:b}}function r(u){return J(t(u,y(1,1)),t(0,y(1,1)))}function n(u){return X(t(u,y(1,1)),t(m(u,0),y(1,1)))}});function y$(T){var{addScalar:N,subtract:V,flatten:Y,multiply:X,multiplyScalar:J,divideScalar:R,sqrt:F,abs:e,bignumber:i,diag:m,inv:t,qr:y,usolve:p,usolveAll:l,equal:d,complex:r,larger:n,smaller:u,matrixFromColumns:a,dot:o}=T;function c(P,E,k,O,G){G===void 0&&(G=!0);var z=s(P,E,k,O,G);b(P,E,k,O,G,z);var{values:U,C:H}=g(P,E,k,O,G),B;return G&&(B=A(P,E,H,z,U,k,O),B=a(...B)),{values:U,vectors:B}}function s(P,E,k,O,G){var z=O==="BigNumber",U=O==="Complex",H=z?i(0):0,B=z?i(1):U?r(1):1,W=z?i(1):1,q=z?i(10):2,re=J(q,q),ie;G&&(ie=Array(E).fill(B));for(var le=!1;!le;){le=!0;for(var he=0;he1&&(le=m(Array(q-1).fill(H)))),q-=1,B.pop();for(var fe=0;fe2&&(le=m(Array(q-2).fill(H)))),q-=2,B.pop(),B.pop();for(var ne=0;ne+V(e(de),e(we))),he>100){var ce=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+W.join(", "));throw ce.values=W,ce.vectors=[],ce}var oe=G?X(ie,C(re,E)):void 0;return{values:W,C:oe}}function A(P,E,k,O,G,z,U){var H=t(k),B=X(H,P,k),W=U==="BigNumber",q=U==="Complex",re=W?i(0):q?r(0):0,ie=W?i(1):q?r(1):1,le=[],he=[];for(var $ of G){var Z=D(le,$,d);Z===-1?(le.push($),he.push(1)):he[Z]+=1}for(var K=[],Q=le.length,ae=Array(E).fill(re),fe=m(Array(E).fill(ie)),te=[],ne=function(){var we=le[ce],Se=V(B,X(we,fe)),Te=l(Se,ae);for(Te.shift();Te.lengthX(Ie,Me)),K.push(...Te.map(Me=>Y(Me)))},ce=0;ce=5)return null;for(H=0;;){var B=p(P,U);if(u(S(M(U,[B])),O))break;if(++H>=10)return null;U=f(B)}return U}function w(P,E,k){var O=k==="BigNumber",G=k==="Complex",z=Array(P).fill(0).map(U=>2*Math.random()-1);return O&&(z=z.map(U=>i(U))),G&&(z=z.map(U=>r(U))),z=M(z,E),f(z,k)}function M(P,E){for(var k of E)P=V(P,X(R(o(k,P),o(k,k)),k));return P}function S(P){return e(F(o(P,P)))}function f(P,E){var k=E==="BigNumber",O=E==="Complex",G=k?i(1):O?r(1):1;return X(R(G,S(P)),P)}return c}function x$(T){var{config:N,addScalar:V,subtract:Y,abs:X,atan:J,cos:R,sin:F,multiplyScalar:e,inv:i,bignumber:m,multiply:t,add:y}=T;function p(v,h){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:N.epsilon,C=arguments.length>3?arguments[3]:void 0;if(C==="number")return l(v,x);if(C==="BigNumber")return d(v,x);throw TypeError("Unsupported data type: "+C)}function l(v,h){for(var x=v.length,C=Math.abs(h/x),D,L=new Array(x),w=0;w=Math.abs(C);){var S=M[0][0],f=M[0][1];D=r(v[S][S],v[f][f],v[S][f]),v=c(v,D,S,f),L=u(L,D,S,f),M=s(v)}for(var P=A(x,0),E=0;E=X(C);){var S=M[0][0],f=M[0][1];D=n(v[S][S],v[f][f],v[S][f]),v=o(v,D,S,f),L=a(L,D,S,f),M=b(v)}for(var P=A(x,0),E=0;E{var{config:N,typed:V,matrix:Y,addScalar:X,subtract:J,equal:R,abs:F,atan:e,cos:i,sin:m,multiplyScalar:t,divideScalar:y,inv:p,bignumber:l,multiply:d,add:r,larger:n,column:u,flatten:a,number:o,complex:c,sqrt:s,diag:b,qr:g,usolve:A,usolveAll:v,im:h,re:x,smaller:C,matrixFromColumns:D,dot:L}=T,w=x$({config:N,addScalar:X,subtract:J,column:u,flatten:a,equal:R,abs:F,atan:e,cos:i,sin:m,multiplyScalar:t,inv:p,bignumber:l,complex:c,multiply:d,add:r}),M=y$({config:N,addScalar:X,subtract:J,multiply:d,multiplyScalar:t,flatten:a,divideScalar:y,sqrt:s,abs:F,bignumber:l,diag:b,qr:g,inv:p,usolve:A,usolveAll:v,equal:R,complex:c,larger:n,smaller:C,matrixFromColumns:D,dot:L});return V("eigs",{Array:function(G){var z=Y(G);return S(z)},"Array, number|BigNumber":function(G,z){var U=Y(G);return S(U,z)},Matrix:function(G){var{values:z,vectors:U}=S(G);return{values:Y(z),vectors:Y(U)}},"Matrix, number|BigNumber":function(G,z){var{values:U,vectors:H}=S(G,z);return{values:Y(U),vectors:Y(H)}}});function S(O,G){G===void 0&&(G=N.epsilon);var z=O.size();if(z.length!==2||z[0]!==z[1])throw new RangeError("Matrix must be square (size: "+vi(z)+")");var U=O.toArray(),H=z[0];if(P(U,H,G)&&(E(U,H),f(U,H,G))){var B=k(O,U,H);return w(U,H,G,B)}var W=k(O,U,H);return M(U,H,G,W)}function f(O,G,z){for(var U=0;U{var{typed:N,abs:V,add:Y,identity:X,inv:J,multiply:R}=T;return N(XM,{Matrix:function(t){var y=t.size();if(y.length!==2||y[0]!==y[1])throw new RangeError("Matrix must be square (size: "+vi(y)+")");for(var p=y[0],l=1e-15,d=F(t),r=e(d,l),n=r.q,u=r.j,a=R(t,Math.pow(2,-u)),o=X(p),c=X(p),s=1,b=a,g=-1,A=1;A<=n;A++)A>1&&(b=R(b,a),g=-g),s=s*(n-A+1)/((2*n-A+1)*A),o=Y(o,R(s,b)),c=Y(c,R(s*g,b));for(var v=R(J(c),o),h=0;h{var{typed:N,abs:V,add:Y,multiply:X,map:J,sqrt:R,subtract:F,inv:e,size:i,max:m,identity:t}=T,y=1e3,p=1e-6;function l(d){var r,n=0,u=d,a=t(i(d));do{var o=u;if(u=X(.5,Y(o,e(a))),a=X(.5,Y(a,e(o))),r=m(V(F(u,o))),r>p&&++n>y)throw new Error("computing square root of matrix: iterative method could not converge")}while(r>p);return u}return N(jM,{"Array | Matrix":function(r){var n=Qa(r)?r.size():Si(r);switch(n.length){case 1:if(n[0]===1)return J(r,R);throw new RangeError("Matrix must be square (size: "+vi(n)+")");case 2:{var u=n[0],a=n[1];if(u===a)return l(r);throw new RangeError("Matrix must be square (size: "+vi(n)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+vi(n)+")")}}})}),$M="sylvester",C$=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],D$=Lr($M,C$,T=>{var{typed:N,schur:V,matrixFromColumns:Y,matrix:X,multiply:J,range:R,concat:F,transpose:e,index:i,subset:m,add:t,subtract:y,identity:p,lusolve:l,abs:d}=T;return N($M,{"Matrix, Matrix, Matrix":r,"Array, Matrix, Matrix":function(u,a,o){return r(X(u),a,o)},"Array, Array, Matrix":function(u,a,o){return r(X(u),X(a),o)},"Array, Matrix, Array":function(u,a,o){return r(X(u),a,X(o))},"Matrix, Array, Matrix":function(u,a,o){return r(u,X(a),o)},"Matrix, Array, Array":function(u,a,o){return r(u,X(a),X(o))},"Matrix, Matrix, Array":function(u,a,o){return r(u,a,X(o))},"Array, Array, Array":function(u,a,o){return r(X(u),X(a),X(o)).toArray()}});function r(n,u,a){for(var o=u.size()[0],c=n.size()[0],s=V(n),b=s.T,g=s.U,A=V(J(-1,u)),v=A.T,h=A.U,x=J(J(e(g),a),h),C=R(0,c),D=[],L=(ie,le)=>F(ie,le,1),w=(ie,le)=>F(ie,le,0),M=0;M1e-5){for(var S=w(m(x,i(C,M)),m(x,i(C,M+1))),f=0;f{var{typed:N,matrix:V,identity:Y,multiply:X,qr:J,norm:R,subtract:F}=T;return N(KM,{Array:function(m){var t=e(V(m));return{U:t.U.valueOf(),T:t.T.valueOf()}},Matrix:function(m){return e(m)}});function e(i){var m=i.size()[0],t=i,y=Y(m),p=0,l;do{l=t;var d=J(t),r=d.Q,n=d.R;if(t=X(n,r),y=X(y,r),p++>100)break}while(R(F(t,l))>1e-4);return{U:y,T:t}}}),JM="lyap",N$=["typed","matrix","sylvester","multiply","transpose"],R$=Lr(JM,N$,T=>{var{typed:N,matrix:V,sylvester:Y,multiply:X,transpose:J}=T;return N(JM,{"Matrix, Matrix":function(F,e){return Y(F,J(F),X(-1,e))},"Array, Matrix":function(F,e){return Y(V(F),J(V(F)),X(-1,e))},"Matrix, Array":function(F,e){return Y(F,J(V(F)),V(X(-1,e)))},"Array, Array":function(F,e){return Y(V(F),J(V(F)),V(X(-1,e))).toArray()}})}),F$="divide",I$=["typed","matrix","multiply","equalScalar","divideScalar","inv"],_$=Lr(F$,I$,T=>{var{typed:N,matrix:V,multiply:Y,equalScalar:X,divideScalar:J,inv:R}=T,F=qs({typed:N,equalScalar:X}),e=Jf({typed:N});return N("divide",n8({"Array | Matrix, Array | Matrix":function(m,t){return Y(m,R(t))},"DenseMatrix, any":function(m,t){return e(m,t,J,!1)},"SparseMatrix, any":function(m,t){return F(m,t,J,!1)},"Array, any":function(m,t){return e(V(m),t,J,!1).valueOf()},"any, Array | Matrix":function(m,t){return Y(m,R(t))}},J.signatures))}),QM="distance",O$=["typed","addScalar","subtract","divideScalar","multiplyScalar","unaryMinus","sqrt","abs"],z$=Lr(QM,O$,T=>{var{typed:N,addScalar:V,subtract:Y,multiplyScalar:X,divideScalar:J,unaryMinus:R,sqrt:F,abs:e}=T;return N(QM,{"Array, Array, Array":function(c,s,b){if(c.length===2&&s.length===2&&b.length===2){if(!m(c))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!m(s))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!m(b))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");var g=J(Y(b[1],b[0]),Y(s[1],s[0])),A=X(X(g,g),s[0]),v=R(X(g,s[0])),h=c[1];return r(c[0],c[1],A,v,h)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(c,s,b){if(Object.keys(c).length===2&&Object.keys(s).length===2&&Object.keys(b).length===2){if(!m(c))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!m(s))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!m(b))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if("pointX"in c&&"pointY"in c&&"lineOnePtX"in s&&"lineOnePtY"in s&&"lineTwoPtX"in b&&"lineTwoPtY"in b){var g=J(Y(b.lineTwoPtY,b.lineTwoPtX),Y(s.lineOnePtY,s.lineOnePtX)),A=X(X(g,g),s.lineOnePtX),v=R(X(g,s.lineOnePtX)),h=c.pointX;return r(c.pointX,c.pointY,A,v,h)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(c,s){if(c.length===2&&s.length===3){if(!m(c))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!t(s))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return r(c[0],c[1],s[0],s[1],s[2])}else if(c.length===3&&s.length===6){if(!t(c))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!p(s))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return n(c[0],c[1],c[2],s[0],s[1],s[2],s[3],s[4],s[5])}else if(c.length===s.length&&c.length>0){if(!y(c))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!y(s))throw new TypeError("All values of an array should be numbers or BigNumbers");return u(c,s)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(c,s){if(Object.keys(c).length===2&&Object.keys(s).length===3){if(!m(c))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!t(s))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in c&&"pointY"in c&&"xCoeffLine"in s&&"yCoeffLine"in s&&"constant"in s)return r(c.pointX,c.pointY,s.xCoeffLine,s.yCoeffLine,s.constant);throw new TypeError("Key names do not match")}else if(Object.keys(c).length===3&&Object.keys(s).length===6){if(!t(c))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!p(s))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in c&&"pointY"in c&&"x0"in s&&"y0"in s&&"z0"in s&&"a"in s&&"b"in s&&"c"in s)return n(c.pointX,c.pointY,c.pointZ,s.x0,s.y0,s.z0,s.a,s.b,s.c);throw new TypeError("Key names do not match")}else if(Object.keys(c).length===2&&Object.keys(s).length===2){if(!m(c))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!m(s))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in c&&"pointOneY"in c&&"pointTwoX"in s&&"pointTwoY"in s)return u([c.pointOneX,c.pointOneY],[s.pointTwoX,s.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(c).length===3&&Object.keys(s).length===3){if(!t(c))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!t(s))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in c&&"pointOneY"in c&&"pointOneZ"in c&&"pointTwoX"in s&&"pointTwoY"in s&&"pointTwoZ"in s)return u([c.pointOneX,c.pointOneY,c.pointOneZ],[s.pointTwoX,s.pointTwoY,s.pointTwoZ]);throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},Array:function(c){if(!d(c))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return a(c)}});function i(o){return typeof o=="number"||Ei(o)}function m(o){return o.constructor!==Array&&(o=l(o)),i(o[0])&&i(o[1])}function t(o){return o.constructor!==Array&&(o=l(o)),i(o[0])&&i(o[1])&&i(o[2])}function y(o){return Array.isArray(o)||(o=l(o)),o.every(i)}function p(o){return o.constructor!==Array&&(o=l(o)),i(o[0])&&i(o[1])&&i(o[2])&&i(o[3])&&i(o[4])&&i(o[5])}function l(o){for(var c=Object.keys(o),s=[],b=0;bc.length!==2||!i(c[0])||!i(c[1])))return!1}else if(o[0].length===3&&i(o[0][0])&&i(o[0][1])&&i(o[0][2])){if(o.some(c=>c.length!==3||!i(c[0])||!i(c[1])||!i(c[2])))return!1}else return!1;return!0}function r(o,c,s,b,g){var A=e(V(V(X(s,o),X(b,c)),g)),v=F(V(X(s,s),X(b,b)));return J(A,v)}function n(o,c,s,b,g,A,v,h,x){var C=[Y(X(Y(g,c),x),X(Y(A,s),h)),Y(X(Y(A,s),v),X(Y(b,o),x)),Y(X(Y(b,o),h),X(Y(g,c),v))];C=F(V(V(X(C[0],C[0]),X(C[1],C[1])),X(C[2],C[2])));var D=F(V(V(X(v,v),X(h,h)),X(x,x)));return J(C,D)}function u(o,c){for(var s=o.length,b=0,g=0,A=0;A{var{typed:N,config:V,abs:Y,add:X,addScalar:J,matrix:R,multiply:F,multiplyScalar:e,divideScalar:i,subtract:m,smaller:t,equalScalar:y,flatten:p,isZero:l,isNumeric:d}=T;return N("intersect",{"Array, Array, Array":r,"Array, Array, Array, Array":n,"Matrix, Matrix, Matrix":function(h,x,C){var D=r(h.valueOf(),x.valueOf(),C.valueOf());return D===null?null:R(D)},"Matrix, Matrix, Matrix, Matrix":function(h,x,C,D){var L=n(h.valueOf(),x.valueOf(),C.valueOf(),D.valueOf());return L===null?null:R(L)}});function r(v,h,x){if(v=u(v),h=u(h),x=u(x),!o(v))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!o(h))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!c(x))throw new TypeError("Array with 4 numbers expected as third argument");return A(v[0],v[1],v[2],h[0],h[1],h[2],x[0],x[1],x[2],x[3])}function n(v,h,x,C){if(v=u(v),h=u(h),x=u(x),C=u(C),v.length===2){if(!a(v))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!a(h))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!a(x))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!a(C))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return s(v,h,x,C)}else if(v.length===3){if(!o(v))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!o(h))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!o(x))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!o(C))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return g(v[0],v[1],v[2],h[0],h[1],h[2],x[0],x[1],x[2],C[0],C[1],C[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function u(v){return v.length===1?v[0]:v.length>1&&Array.isArray(v[0])&&v.every(h=>Array.isArray(h)&&h.length===1)?p(v):v}function a(v){return v.length===2&&d(v[0])&&d(v[1])}function o(v){return v.length===3&&d(v[0])&&d(v[1])&&d(v[2])}function c(v){return v.length===4&&d(v[0])&&d(v[1])&&d(v[2])&&d(v[3])}function s(v,h,x,C){var D=v,L=x,w=m(D,h),M=m(L,C),S=m(e(w[0],M[1]),e(M[0],w[1]));if(l(S)||t(Y(S),V.epsilon))return null;var f=e(M[0],D[1]),P=e(M[1],D[0]),E=e(M[0],L[1]),k=e(M[1],L[0]),O=i(J(m(m(f,P),E),k),S);return X(F(w,O),D)}function b(v,h,x,C,D,L,w,M,S,f,P,E){var k=e(m(v,h),m(x,C)),O=e(m(D,L),m(w,M)),G=e(m(S,f),m(P,E));return J(J(k,O),G)}function g(v,h,x,C,D,L,w,M,S,f,P,E){var k=b(v,w,f,w,h,M,P,M,x,S,E,S),O=b(f,w,C,v,P,M,D,h,E,S,L,x),G=b(v,w,C,v,h,M,D,h,x,S,L,x),z=b(f,w,f,w,P,M,P,M,E,S,E,S),U=b(C,v,C,v,D,h,D,h,L,x,L,x),H=m(e(k,O),e(G,z)),B=m(e(U,z),e(O,O));if(l(B))return null;var W=i(H,B),q=i(J(k,e(W,O)),z),re=J(v,e(W,m(C,v))),ie=J(h,e(W,m(D,h))),le=J(x,e(W,m(L,x))),he=J(w,e(q,m(f,w))),$=J(M,e(q,m(P,M))),Z=J(S,e(q,m(E,S)));return y(re,he)&&y(ie,$)&&y(le,Z)?[re,ie,le]:null}function A(v,h,x,C,D,L,w,M,S,f){var P=e(v,w),E=e(C,w),k=e(h,M),O=e(D,M),G=e(x,S),z=e(L,S),U=m(m(m(f,P),k),G),H=m(m(m(J(J(E,O),z),P),k),G),B=i(U,H),W=J(v,e(B,m(C,v))),q=J(h,e(B,m(D,h))),re=J(x,e(B,m(L,x)));return[W,q,re]}}),qM="sum",H$=["typed","config","add","numeric"],YC=Lr(qM,H$,T=>{var{typed:N,config:V,add:Y,numeric:X}=T;return N(qM,{"Array | Matrix":J,"Array | Matrix, number | BigNumber":R,"...":function(e){if(g0(e))throw new TypeError("Scalar values expected in function sum");return J(e)}});function J(F){var e;return Rh(F,function(i){try{e=e===void 0?i:Y(e,i)}catch(m){throw Bl(m,"sum",i)}}),e===void 0&&(e=X(0,V.number)),typeof e=="string"&&(e=X(e,V.number)),e}function R(F,e){try{var i=V1(F,e,Y);return i}catch(m){throw Bl(m,"sum")}}}),vy="cumsum",V$=["typed","add","unaryPlus"],ZC=Lr(vy,V$,T=>{var{typed:N,add:V,unaryPlus:Y}=T;return N(vy,{Array:X,Matrix:function(i){return i.create(X(i.valueOf()))},"Array, number | BigNumber":R,"Matrix, number | BigNumber":function(i,m){return i.create(R(i.valueOf(),m))},"...":function(i){if(g0(i))throw new TypeError("All values expected to be scalar in function cumsum");return X(i)}});function X(e){try{return J(e)}catch(i){throw Bl(i,vy)}}function J(e){if(e.length===0)return[];for(var i=[Y(e[0])],m=1;m=m.length)throw new $f(i,m.length);try{return F(e,i)}catch(t){throw Bl(t,vy)}}function F(e,i){var m,t,y;if(i<=0){var p=e[0][0];if(Array.isArray(p)){for(y=P8(e),t=[],m=0;m{var{typed:N,add:V,divide:Y}=T;return N(eS,{"Array | Matrix":J,"Array | Matrix, number | BigNumber":X,"...":function(F){if(g0(F))throw new TypeError("Scalar values expected in function mean");return J(F)}});function X(R,F){try{var e=V1(R,F,V),i=Array.isArray(R)?Si(R):R.size();return Y(e,i[F])}catch(m){throw Bl(m,"mean")}}function J(R){var F,e=0;if(Rh(R,function(i){try{F=F===void 0?i:V(F,i),e++}catch(m){throw Bl(m,"mean",i)}}),e===0)throw new Error("Cannot calculate the mean of an empty array");return Y(F,e)}}),tS="median",W$=["typed","add","divide","compare","partitionSelect"],Y$=Lr(tS,W$,T=>{var{typed:N,add:V,divide:Y,compare:X,partitionSelect:J}=T;function R(i){try{i=Ui(i.valueOf());var m=i.length;if(m===0)throw new Error("Cannot calculate median of an empty array");if(m%2===0){for(var t=m/2-1,y=J(i,t+1),p=i[t],l=0;l0&&(p=i[l]);return e(p,y)}else{var d=J(i,(m-1)/2);return F(d)}}catch(r){throw Bl(r,"median")}}var F=N({"number | BigNumber | Complex | Unit":function(m){return m}}),e=N({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(m,t){return Y(V(m,t),2)}});return N(tS,{"Array | Matrix":R,"Array | Matrix, number | BigNumber":function(m,t){throw new Error("median(A, dim) is not yet supported")},"...":function(m){if(g0(m))throw new TypeError("Scalar values expected in function median");return R(m)}})}),rS="mad",Z$=["typed","abs","map","median","subtract"],X$=Lr(rS,Z$,T=>{var{typed:N,abs:V,map:Y,median:X,subtract:J}=T;return N(rS,{"Array | Matrix":R,"...":function(e){return R(e)}});function R(F){if(F=Ui(F.valueOf()),F.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var e=X(F);return X(Y(F,function(i){return V(J(i,e))}))}catch(i){throw i instanceof TypeError&&i.message.indexOf("median")!==-1?new TypeError(i.message.replace("median","mad")):Bl(i,"mad")}}}),h2="unbiased",nS="variance",j$=["typed","add","subtract","multiply","divide","apply","isNaN"],jC=Lr(nS,j$,T=>{var{typed:N,add:V,subtract:Y,multiply:X,divide:J,apply:R,isNaN:F}=T;return N(nS,{"Array | Matrix":function(t){return e(t,h2)},"Array | Matrix, string":e,"Array | Matrix, number | BigNumber":function(t,y){return i(t,y,h2)},"Array | Matrix, number | BigNumber, string":i,"...":function(t){return e(t,h2)}});function e(m,t){var y,p=0;if(m.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(Rh(m,function(r){try{y=y===void 0?r:V(y,r),p++}catch(n){throw Bl(n,"variance",r)}}),p===0)throw new Error("Cannot calculate variance of an empty array");var l=J(y,p);if(y=void 0,Rh(m,function(r){var n=Y(r,l);y=y===void 0?X(n,n):V(y,X(n,n))}),F(y))return y;switch(t){case"uncorrected":return J(y,p);case"biased":return J(y,p+1);case"unbiased":{var d=Ei(y)?y.mul(0):0;return p===1?d:J(y,p-1)}default:throw new Error('Unknown normalization "'+t+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function i(m,t,y){try{if(m.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return R(m,t,p=>e(p,y))}catch(p){throw Bl(p,"variance")}}}),$$="quantileSeq",K$=["typed","add","multiply","partitionSelect","compare"],J$=Lr($$,K$,T=>{var{typed:N,add:V,multiply:Y,partitionSelect:X,compare:J}=T;function R(i,m,t){var y,p,l;if(arguments.length<2||arguments.length>3)throw new SyntaxError("Function quantileSeq requires two or three parameters");if(Lc(i)){if(t=t||!1,typeof t=="boolean"){if(p=i.valueOf(),Ni(m)){if(m<0)throw new Error("N/prob must be non-negative");if(m<=1)return F(p,m,t);if(m>1){if(!Ya(m))throw new Error("N must be a positive integer");var d=m+1;y=new Array(m);for(var r=0;r4294967295)throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var a=new n(u+1);y=new Array(u);for(var o=0;o1)throw new Error("Probability must be between 0 and 1, inclusive")}else if(Ei(b)){if(l=new b.constructor(1),b.isNegative()||b.gt(l))throw new Error("Probability must be between 0 and 1, inclusive")}else throw new TypeError("Unexpected type of argument in function quantileSeq");y[s]=F(p,b,t)}return y}throw new TypeError("Unexpected type of argument in function quantileSeq")}throw new TypeError("Unexpected type of argument in function quantileSeq")}throw new TypeError("Unexpected type of argument in function quantileSeq")}function F(i,m,t){var y=Ui(i),p=y.length;if(p===0)throw new Error("Cannot calculate quantile of an empty sequence");if(Ni(m)){var l=m*(p-1),d=l%1;if(d===0){var r=t?y[l]:X(y,l);return e(r),r}var n=Math.floor(l),u,a;if(t)u=y[n],a=y[n+1];else{a=X(y,n+1),u=y[n];for(var o=0;o0&&(u=y[o])}return e(u),e(a),V(Y(u,1-d),Y(a,d))}var c=m.times(p-1);if(c.isInteger()){c=c.toNumber();var s=t?y[c]:X(y,c);return e(s),s}var b=c.floor(),g=c.minus(b),A=b.toNumber(),v,h;if(t)v=y[A],h=y[A+1];else{h=X(y,A+1),v=y[A];for(var x=0;x0&&(v=y[x])}e(v),e(h);var C=new g.constructor(1);return V(Y(v,C.minus(g)),Y(h,g))}var e=N({"number | BigNumber | Unit":function(m){return m}});return R}),aS="std",Q$=["typed","map","sqrt","variance"],$C=Lr(aS,Q$,T=>{var{typed:N,map:V,sqrt:Y,variance:X}=T;return N(aS,{"Array | Matrix":J,"Array | Matrix, string":J,"Array | Matrix, number | BigNumber":J,"Array | Matrix, number | BigNumber, string":J,"...":function(F){return J(F)}});function J(R,F){if(R.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var e=X.apply(null,arguments);return Lc(e)?V(e,Y):Y(e)}catch(i){throw i instanceof TypeError&&i.message.indexOf(" variance")!==-1?new TypeError(i.message.replace(" variance"," std")):i}}}),iS="combinations",q$=["typed"],eK=Lr(iS,q$,T=>{var{typed:N}=T;return N(iS,{"number, number":eC,"BigNumber, BigNumber":function(Y,X){var J=Y.constructor,R,F,e=Y.minus(X),i=new J(1);if(!oS(Y)||!oS(X))throw new TypeError("Positive integer value expected in function combinations");if(X.gt(Y))throw new TypeError("k must be less than n in function combinations");if(R=i,X.lt(e))for(F=i;F.lte(e);F=F.plus(i))R=R.times(X.plus(F)).dividedBy(F);else for(F=i;F.lte(X);F=F.plus(i))R=R.times(e.plus(F)).dividedBy(F);return R}})});function oS(T){return T.isInteger()&&T.gte(0)}var sS="combinationsWithRep",tK=["typed"],rK=Lr(sS,tK,T=>{var{typed:N}=T;return N(sS,{"number, number":function(Y,X){if(!Ya(Y)||Y<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!Ya(X)||X<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(Y<1)throw new TypeError("k must be less than or equal to n + k - 1");if(X{var{typed:N,config:V,multiplyScalar:Y,pow:X,BigNumber:J,Complex:R}=T;function F(i){if(i.im===0)return i1(i.re);if(i.re<.5){var m=new R(1-i.re,-i.im),t=new R(Math.PI*i.re,Math.PI*i.im);return new R(Math.PI).div(t.sin()).div(F(m))}i=new R(i.re-1,i.im);for(var y=new R(Jp[0],0),p=1;p2;)y-=2,l+=y,p=p.times(l);return new J(p.toPrecision(J.precision))}}),fS="lgamma",iK=["Complex","typed"],oK=Lr(fS,iK,T=>{var{Complex:N,typed:V}=T,Y=7,X=7,J=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return V(fS,{number:o1,Complex:R,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function R(i){var m=6.283185307179586,t=1.1447298858494002,y=.1;if(i.isNaN())return new N(NaN,NaN);if(i.im===0)return new N(o1(i.re),0);if(i.re>=Y||Math.abs(i.im)>=X)return F(i);if(i.re<=y){var p=uF(m,i.im)*Math.floor(.5*i.re+.25),l=i.mul(Math.PI).sin().log(),d=R(new N(1-i.re,-i.im));return new N(t,p).sub(l).sub(d)}else return i.im>=0?e(i):e(i.conjugate()).conjugate()}function F(i){for(var m=i.sub(.5).mul(i.log()).sub(i).add(oC),t=new N(1,0).div(i),y=t.div(i),p=J[0],l=J[1],d=2*y.re,r=y.re*y.re+y.im*y.im,n=2;n<8;n++){var u=l;l=-r*p+J[n],p=d*p+u}var a=t.mul(y.mul(p).add(l));return m.add(a)}function e(i){var m=0,t=0,y=i;for(i=i.add(1);i.re<=Y;){y=y.mul(i);var p=y.im<0?1:0;p!==0&&t===0&&m++,t=p,i=i.add(1)}return F(i).sub(y.log()).sub(new N(0,m*2*Math.PI*1))}}),cS="factorial",sK=["typed","gamma"],lK=Lr(cS,sK,T=>{var{typed:N,gamma:V}=T;return N(cS,{number:function(X){if(X<0)throw new Error("Value must be non-negative");return V(X+1)},BigNumber:function(X){if(X.isNegative())throw new Error("Value must be non-negative");return V(X.plus(1))},"Array | Matrix":N.referToSelf(Y=>X=>wi(X,Y))})}),hS="kldivergence",uK=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],fK=Lr(hS,uK,T=>{var{typed:N,matrix:V,divide:Y,sum:X,multiply:J,map:R,dotDivide:F,log:e,isNumeric:i}=T;return N(hS,{"Array, Array":function(y,p){return m(V(y),V(p))},"Matrix, Array":function(y,p){return m(y,V(p))},"Array, Matrix":function(y,p){return m(V(y),p)},"Matrix, Matrix":function(y,p){return m(y,p)}});function m(t,y){var p=y.size().length,l=t.size().length;if(p>1)throw new Error("first object must be one dimensional");if(l>1)throw new Error("second object must be one dimensional");if(p!==l)throw new Error("Length of two vectors must be equal");var d=X(t);if(d===0)throw new Error("Sum of elements in first object must be non zero");var r=X(y);if(r===0)throw new Error("Sum of elements in second object must be non zero");var n=Y(t,X(t)),u=Y(y,X(y)),a=X(J(n,R(F(n,u),o=>e(o))));return i(a)?a:Number.NaN}}),vS="multinomial",cK=["typed","add","divide","multiply","factorial","isInteger","isPositive"],hK=Lr(vS,cK,T=>{var{typed:N,add:V,divide:Y,multiply:X,factorial:J,isInteger:R,isPositive:F}=T;return N(vS,{"Array | Matrix":function(i){var m=0,t=1;return Rh(i,function(y){if(!R(y)||!F(y))throw new TypeError("Positive integer value expected in function multinomial");m=V(m,y),t=X(t,J(y))}),Y(J(m),t)}})}),dS="permutations",vK=["typed","factorial"],dK=Lr(dS,vK,T=>{var{typed:N,factorial:V}=T;return N(dS,{"number | BigNumber":V,"number, number":function(X,J){if(!Ya(X)||X<0)throw new TypeError("Positive integer value expected in function permutations");if(!Ya(J)||J<0)throw new TypeError("Positive integer value expected in function permutations");if(J>X)throw new TypeError("second argument k must be less than or equal to first argument n");return Th(X-J+1,X)},"BigNumber, BigNumber":function(X,J){var R,F;if(!pS(X)||!pS(J))throw new TypeError("Positive integer value expected in function permutations");if(J.gt(X))throw new TypeError("second argument k must be less than or equal to first argument n");var e=X.mul(0).add(1);for(R=e,F=X.minus(J).plus(1);F.lte(X);F=F.plus(1))R=R.times(F);return R}})});function pS(T){return T.isInteger()&&T.gte(0)}var KC={exports:{}};(function(T){(function(N,V,Y){function X(e){var i=this,m=F();i.next=function(){var t=2091639*i.s0+i.c*23283064365386963e-26;return i.s0=i.s1,i.s1=i.s2,i.s2=t-(i.c=t|0)},i.c=1,i.s0=m(" "),i.s1=m(" "),i.s2=m(" "),i.s0-=m(e),i.s0<0&&(i.s0+=1),i.s1-=m(e),i.s1<0&&(i.s1+=1),i.s2-=m(e),i.s2<0&&(i.s2+=1),m=null}function J(e,i){return i.c=e.c,i.s0=e.s0,i.s1=e.s1,i.s2=e.s2,i}function R(e,i){var m=new X(e),t=i&&i.state,y=m.next;return y.int32=function(){return m.next()*4294967296|0},y.double=function(){return y()+(y()*2097152|0)*11102230246251565e-32},y.quick=y,t&&(typeof t=="object"&&J(t,m),y.state=function(){return J(m,{})}),y}function F(){var e=4022871197,i=function(m){m=String(m);for(var t=0;t>>0,y-=e,y*=e,e=y>>>0,y-=e,e+=y*4294967296}return(e>>>0)*23283064365386963e-26};return i}V&&V.exports?V.exports=R:Y&&Y.amd?Y(function(){return R}):this.alea=R})(Bd,T,!1)})(KC);var JC={exports:{}};(function(T){(function(N,V,Y){function X(F){var e=this,i="";e.x=0,e.y=0,e.z=0,e.w=0,e.next=function(){var t=e.x^e.x<<11;return e.x=e.y,e.y=e.z,e.z=e.w,e.w^=e.w>>>19^t^t>>>8},F===(F|0)?e.x=F:i+=F;for(var m=0;m>>0)/4294967296};return t.double=function(){do var y=i.next()>>>11,p=(i.next()>>>0)/4294967296,l=(y+p)/(1<<21);while(l===0);return l},t.int32=i.next,t.quick=t,m&&(typeof m=="object"&&J(m,i),t.state=function(){return J(i,{})}),t}V&&V.exports?V.exports=R:Y&&Y.amd?Y(function(){return R}):this.xor128=R})(Bd,T,!1)})(JC);var QC={exports:{}};(function(T){(function(N,V,Y){function X(F){var e=this,i="";e.next=function(){var t=e.x^e.x>>>2;return e.x=e.y,e.y=e.z,e.z=e.w,e.w=e.v,(e.d=e.d+362437|0)+(e.v=e.v^e.v<<4^(t^t<<1))|0},e.x=0,e.y=0,e.z=0,e.w=0,e.v=0,F===(F|0)?e.x=F:i+=F;for(var m=0;m>>4),e.next()}function J(F,e){return e.x=F.x,e.y=F.y,e.z=F.z,e.w=F.w,e.v=F.v,e.d=F.d,e}function R(F,e){var i=new X(F),m=e&&e.state,t=function(){return(i.next()>>>0)/4294967296};return t.double=function(){do var y=i.next()>>>11,p=(i.next()>>>0)/4294967296,l=(y+p)/(1<<21);while(l===0);return l},t.int32=i.next,t.quick=t,m&&(typeof m=="object"&&J(m,i),t.state=function(){return J(i,{})}),t}V&&V.exports?V.exports=R:Y&&Y.amd?Y(function(){return R}):this.xorwow=R})(Bd,T,!1)})(QC);var qC={exports:{}};(function(T){(function(N,V,Y){function X(F){var e=this;e.next=function(){var m=e.x,t=e.i,y,p;return y=m[t],y^=y>>>7,p=y^y<<24,y=m[t+1&7],p^=y^y>>>10,y=m[t+3&7],p^=y^y>>>3,y=m[t+4&7],p^=y^y<<7,y=m[t+7&7],y=y^y<<13,p^=y^y<<9,m[t]=p,e.i=t+1&7,p};function i(m,t){var y,p=[];if(t===(t|0))p[0]=t;else for(t=""+t,y=0;y0;--y)m.next()}i(e,F)}function J(F,e){return e.x=F.x.slice(),e.i=F.i,e}function R(F,e){F==null&&(F=+new Date);var i=new X(F),m=e&&e.state,t=function(){return(i.next()>>>0)/4294967296};return t.double=function(){do var y=i.next()>>>11,p=(i.next()>>>0)/4294967296,l=(y+p)/(1<<21);while(l===0);return l},t.int32=i.next,t.quick=t,m&&(m.x&&J(m,i),t.state=function(){return J(i,{})}),t}V&&V.exports?V.exports=R:Y&&Y.amd?Y(function(){return R}):this.xorshift7=R})(Bd,T,!1)})(qC);var eD={exports:{}};(function(T){(function(N,V,Y){function X(F){var e=this;e.next=function(){var m=e.w,t=e.X,y=e.i,p,l;return e.w=m=m+1640531527|0,l=t[y+34&127],p=t[y=y+1&127],l^=l<<13,p^=p<<17,l^=l>>>15,p^=p>>>12,l=t[y]=l^p,e.i=y,l+(m^m>>>16)|0};function i(m,t){var y,p,l,d,r,n=[],u=128;for(t===(t|0)?(p=t,t=null):(t=t+"\0",p=0,u=Math.max(u,t.length)),l=0,d=-32;d>>15,p^=p<<4,p^=p>>>13,d>=0&&(r=r+1640531527|0,y=n[d&127]^=p+r,l=y==0?l+1:0);for(l>=128&&(n[(t&&t.length||0)&127]=-1),l=127,d=4*128;d>0;--d)p=n[l+34&127],y=n[l=l+1&127],p^=p<<13,y^=y<<17,p^=p>>>15,y^=y>>>12,n[l]=p^y;m.w=r,m.X=n,m.i=l}i(e,F)}function J(F,e){return e.i=F.i,e.w=F.w,e.X=F.X.slice(),e}function R(F,e){F==null&&(F=+new Date);var i=new X(F),m=e&&e.state,t=function(){return(i.next()>>>0)/4294967296};return t.double=function(){do var y=i.next()>>>11,p=(i.next()>>>0)/4294967296,l=(y+p)/(1<<21);while(l===0);return l},t.int32=i.next,t.quick=t,m&&(m.X&&J(m,i),t.state=function(){return J(i,{})}),t}V&&V.exports?V.exports=R:Y&&Y.amd?Y(function(){return R}):this.xor4096=R})(Bd,T,!1)})(eD);var tD={exports:{}};(function(T){(function(N,V,Y){function X(F){var e=this,i="";e.next=function(){var t=e.b,y=e.c,p=e.d,l=e.a;return t=t<<25^t>>>7^y,y=y-p|0,p=p<<24^p>>>8^l,l=l-t|0,e.b=t=t<<20^t>>>12^y,e.c=y=y-p|0,e.d=p<<16^y>>>16^l,e.a=l-t|0},e.a=0,e.b=0,e.c=-1640531527,e.d=1367130551,F===Math.floor(F)?(e.a=F/4294967296|0,e.b=F|0):i+=F;for(var m=0;m>>0)/4294967296};return t.double=function(){do var y=i.next()>>>11,p=(i.next()>>>0)/4294967296,l=(y+p)/(1<<21);while(l===0);return l},t.int32=i.next,t.quick=t,m&&(typeof m=="object"&&J(m,i),t.state=function(){return J(i,{})}),t}V&&V.exports?V.exports=R:Y&&Y.amd?Y(function(){return R}):this.tychei=R})(Bd,T,!1)})(tD);var rD={exports:{}};const pK={},gK=Object.freeze(Object.defineProperty({__proto__:null,default:pK},Symbol.toStringTag,{value:"Module"})),mK=$L(gK);(function(T){(function(N,V,Y){var X=256,J=6,R=52,F="random",e=Y.pow(X,J),i=Y.pow(2,R),m=i*2,t=X-1,y;function p(o,c,s){var b=[];c=c==!0?{entropy:!0}:c||{};var g=n(r(c.entropy?[o,a(V)]:o==null?u():o,3),b),A=new l(b),v=function(){for(var h=A.g(J),x=e,C=0;h=m;)h/=2,x/=2,C>>>=1;return(h+C)/x};return v.int32=function(){return A.g(4)|0},v.quick=function(){return A.g(4)/4294967296},v.double=v,n(a(A.S),V),(c.pass||s||function(h,x,C,D){return D&&(D.S&&d(D,A),h.state=function(){return d(A,{})}),C?(Y[F]=h,x):h})(v,g,"global"in c?c.global:this==Y,c.state)}function l(o){var c,s=o.length,b=this,g=0,A=b.i=b.j=0,v=b.S=[];for(s||(o=[s++]);g{var{typed:N,config:V,on:Y}=T,X=f0(V.randomSeed);return Y&&Y("config",function(R,F){R.randomSeed!==F.randomSeed&&(X=f0(R.randomSeed))}),N(gS,{"Array | Matrix":function(F){return J(F,{})},"Array | Matrix, Object":function(F,e){return J(F,e)},"Array | Matrix, number":function(F,e){return J(F,{number:e})},"Array | Matrix, Array | Matrix":function(F,e){return J(F,{weights:e})},"Array | Matrix, Array | Matrix, number":function(F,e,i){return J(F,{number:i,weights:e})},"Array | Matrix, number, Array | Matrix":function(F,e,i){return J(F,{number:e,weights:i})}});function J(R,F){var{number:e,weights:i,elementWise:m=!0}=F,t=typeof e>"u";t&&(e=1);var y=Qa(R)?R.create:Qa(i)?i.create:null;R=R.valueOf(),i&&(i=i.valueOf()),m===!0&&(R=Ui(R),i=Ui(i));var p=0;if(typeof i<"u"){if(i.length!==R.length)throw new Error("Weights must have the same length as possibles");for(var l=0,d=i.length;l"u")u=R[Math.floor(X()*r)];else for(var a=X()*p,o=0,c=R.length;o1)for(var Y=0,X=T.shift();Y{var{typed:N,config:V,on:Y}=T,X=f0(V.randomSeed);return Y&&Y("config",function(F,e){F.randomSeed!==e.randomSeed&&(X=f0(F.randomSeed))}),N(mS,{"":()=>R(0,1),number:F=>R(0,F),"number, number":(F,e)=>R(F,e),"Array | Matrix":F=>J(F,0,1),"Array | Matrix, number":(F,e)=>J(F,0,e),"Array | Matrix, number, number":(F,e,i)=>J(F,e,i)});function J(F,e,i){var m=I3(F.valueOf(),()=>R(e,i));return Qa(F)?F.create(m):m}function R(F,e){return F+X()*(e-F)}}),yS="randomInt",LK=["typed","config","?on"],PK=Lr(yS,LK,T=>{var{typed:N,config:V,on:Y}=T,X=f0(V.randomSeed);return Y&&Y("config",function(F,e){F.randomSeed!==e.randomSeed&&(X=f0(F.randomSeed))}),N(yS,{"":()=>R(0,1),number:F=>R(0,F),"number, number":(F,e)=>R(F,e),"Array | Matrix":F=>J(F,0,1),"Array | Matrix, number":(F,e)=>J(F,0,e),"Array | Matrix, number, number":(F,e,i)=>J(F,e,i)});function J(F,e,i){var m=I3(F.valueOf(),()=>R(e,i));return Qa(F)?F.create(m):m}function R(F,e){return Math.floor(F+X()*(e-F))}}),xS="stirlingS2",NK=["typed","addScalar","subtract","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],RK=Lr(xS,NK,T=>{var{typed:N,addScalar:V,subtract:Y,multiplyScalar:X,divideScalar:J,pow:R,factorial:F,combinations:e,isNegative:i,isInteger:m,number:t,bignumber:y,larger:p}=T,l=[],d=[];return N(xS,{"number | BigNumber, number | BigNumber":function(n,u){if(!m(n)||i(n)||!m(u)||i(u))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(p(u,n))throw new TypeError("k must be less than or equal to n in function stirlingS2");var a=!(Ni(n)&&Ni(u)),o=a?d:l,c=a?y:t,s=t(n),b=t(u);if(o[s]&&o[s].length>b)return o[s][b];for(var g=0;g<=s;++g)if(o[g]||(o[g]=[c(g===0?1:0)]),g!==0)for(var A=o[g],v=o[g-1],h=A.length;h<=g&&h<=b;++h)h===g?A[h]=1:A[h]=V(X(c(h),v[h]),v[h-1]);return o[s][b]}})}),bS="bellNumbers",FK=["typed","addScalar","isNegative","isInteger","stirlingS2"],IK=Lr(bS,FK,T=>{var{typed:N,addScalar:V,isNegative:Y,isInteger:X,stirlingS2:J}=T;return N(bS,{"number | BigNumber":function(F){if(!X(F)||Y(F))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var e=0,i=0;i<=F;i++)e=V(e,J(F,i));return e}})}),wS="catalan",_K=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],OK=Lr(wS,_K,T=>{var{typed:N,addScalar:V,divideScalar:Y,multiplyScalar:X,combinations:J,isNegative:R,isInteger:F}=T;return N(wS,{"number | BigNumber":function(i){if(!F(i)||R(i))throw new TypeError("Non-negative integer value expected in function catalan");return Y(J(X(i,2),i),V(i,1))}})}),AS="composition",zK=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],kK=Lr(AS,zK,T=>{var{typed:N,addScalar:V,combinations:Y,isPositive:X,isNegative:J,isInteger:R,larger:F}=T;return N(AS,{"number | BigNumber, number | BigNumber":function(i,m){if(!R(i)||!X(i)||!R(m)||!X(m))throw new TypeError("Positive integer value expected in function composition");if(F(m,i))throw new TypeError("k must be less than or equal to n in function composition");return Y(V(i,-1),V(m,-1))}})}),TS="leafCount",BK=["parse","typed"],UK=Lr(TS,BK,T=>{var{parse:N,typed:V}=T;function Y(X){var J=0;return X.forEach(R=>{J+=Y(R)}),J||1}return V(TS,{Node:function(J){return Y(J)}})});function MS(T){return Bi(T)||ds(T)&&T.isUnary()&&Bi(T.args[0])}function g1(T){return!!(Bi(T)||(_v(T)||ds(T))&&T.args.every(g1)||Nh(T)&&g1(T.content))}function SS(T,N){var V=Object.keys(T);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(T);N&&(Y=Y.filter(function(X){return Object.getOwnPropertyDescriptor(T,X).enumerable})),V.push.apply(V,Y)}return V}function v2(T){for(var N=1;N{var{FunctionNode:N,OperatorNode:V,SymbolNode:Y}=T,X=!0,J=!1,R="defaultF",F={add:{trivial:X,total:X,commutative:X,associative:X},unaryPlus:{trivial:X,total:X,commutative:X,associative:X},subtract:{trivial:J,total:X,commutative:J,associative:J},multiply:{trivial:X,total:X,commutative:X,associative:X},divide:{trivial:J,total:X,commutative:J,associative:J},paren:{trivial:X,total:X,commutative:X,associative:J},defaultF:{trivial:J,total:X,commutative:J,associative:J}},e={divide:{total:J},log:{total:J}},i={subtract:{total:J},abs:{trivial:X},log:{total:X}};function m(a,o){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:F,s=R;if(typeof a=="string"?s=a:ds(a)?s=a.fn.toString():_v(a)?s=a.name:Nh(a)&&(s="paren"),ka(c,s)){var b=c[s];if(ka(b,o))return b[o];if(ka(F,s))return F[s][o]}if(ka(c,R)){var g=c[R];return ka(g,o)?g[o]:F[R][o]}if(ka(F,s)){var A=F[s];if(ka(A,o))return A[o]}return F[R][o]}function t(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:F;return m(a,"commutative",o)}function y(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:F;return m(a,"associative",o)}function p(a,o){var c=v2({},a);for(var s in o)ka(a,s)?c[s]=v2(v2({},o[s]),a[s]):c[s]=o[s];return c}function l(a,o){if(!a.args||a.args.length===0)return a;a.args=d(a,o);for(var c=0;c2&&y(a,o)){for(var g=a.args.pop();a.args.length>0;)g=c([a.args.pop(),g]);a.args=g.args}}}function n(a,o){if(!(!a.args||a.args.length===0)){for(var c=u(a),s=a.args.length,b=0;b2&&y(a,o)){for(var g=a.args.shift();a.args.length>0;)g=c([g,a.args.shift()]);a.args=g.args}}}function u(a){return ds(a)?function(o){try{return new V(a.op,a.fn,o,a.implicit)}catch(c){return console.error(c),[]}}:function(o){return new N(new Y(a.name),o)}}return{createMakeNodeFunction:u,hasProperty:m,isCommutative:t,isAssociative:y,mergeContext:p,flatten:l,allChildren:d,unflattenr:r,unflattenl:n,defaultContext:F,realContext:e,positiveContext:i}}),GK="simplify",WK=["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","resolve","simplifyConstant","simplifyCore","?fraction","?bignumber","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],YK=Lr(GK,WK,T=>{var{config:N,typed:V,parse:Y,add:X,subtract:J,multiply:R,divide:F,pow:e,isZero:i,equal:m,resolve:t,simplifyConstant:y,simplifyCore:p,fraction:l,bignumber:d,mathWithTransform:r,matrix:n,AccessorNode:u,ArrayNode:a,ConstantNode:o,FunctionNode:c,IndexNode:s,ObjectNode:b,OperatorNode:g,ParenthesisNode:A,SymbolNode:v}=T,{hasProperty:h,isCommutative:x,isAssociative:C,mergeContext:D,flatten:L,unflattenr:w,unflattenl:M,createMakeNodeFunction:S,defaultContext:f,realContext:P,positiveContext:E}=_3({FunctionNode:c,OperatorNode:g,SymbolNode:v});V.addConversion({from:"Object",to:"Map",convert:Kp});var k=V("simplify",{Node:W,"Node, Map":(Q,ae)=>W(Q,!1,ae),"Node, Map, Object":(Q,ae,fe)=>W(Q,!1,ae,fe),"Node, Array":W,"Node, Array, Map":W,"Node, Array, Map, Object":W});V.removeConversion({from:"Object",to:"Map",convert:Kp}),k.defaultContext=f,k.realContext=P,k.positiveContext=E;function O(Q){return Q.transform(function(ae,fe,te){return Nh(ae)?O(ae.content):ae})}var G={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};k.rules=[p,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(cl*v) -> v * (-cl)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(cl*v) -> (-cl) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*cl) -> v * (-cl)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" vd * ( vd * n1 + n2)",r:"vd^2 * n1 + vd * n2"},{s:" vd * (vd^n4 * n1 + n2) -> vd^(1+n4) * n1 + vd * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * ( vd * n1 + n2) -> vd^(n3+1) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * (vd^n4 * n1 + n2) -> vd^(n3+n4) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},y,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"vd*n + vd",r:"vd*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 + n3 * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*vd + vd -> (n+1)*vd",assuming:{multiply:{commutative:!1}}},{s:"vd + n*vd -> (1+n)*vd",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n^n1 * n -> n^(n1+1)",assuming:{divide:{total:!0},multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*cd + cd",r:"(n+1)*cd"},{s:"cd*n + cd -> cd*(n+1)",assuming:{multiply:{commutative:!1}}},{s:"cd + cd*n -> cd*(1+n)",assuming:{multiply:{commutative:!1}}},y,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"ce+ve -> ve+ce",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"vd*cd -> cd*vd",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];function z(Q,ae){var fe={};if(Q.s){var te=Q.s.split("->");if(te.length===2)fe.l=te[0],fe.r=te[1];else throw SyntaxError("Could not parse rule: "+Q.s)}else fe.l=Q.l,fe.r=Q.r;fe.l=O(Y(fe.l)),fe.r=O(Y(fe.r));for(var ne of["imposeContext","repeat","assuming"])ne in Q&&(fe[ne]=Q[ne]);if(Q.evaluate&&(fe.evaluate=Y(Q.evaluate)),C(fe.l,ae)){var ce=!x(fe.l,ae),oe;ce&&(oe=B());var de=S(fe.l),we=B();fe.expanded={},fe.expanded.l=de([fe.l,we]),L(fe.expanded.l,ae),w(fe.expanded.l,ae),fe.expanded.r=de([fe.r,we]),ce&&(fe.expandedNC1={},fe.expandedNC1.l=de([oe,fe.l]),fe.expandedNC1.r=de([oe,fe.r]),fe.expandedNC2={},fe.expandedNC2.l=de([oe,fe.expanded.l]),fe.expandedNC2.r=de([oe,fe.expanded.r]))}return fe}function U(Q,ae){for(var fe=[],te=0;te2&&arguments[2]!==void 0?arguments[2]:l0(),te=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},ne=te.consoleDebug;ae=U(ae||k.rules,te.context);var ce=t(Q,fe);ce=O(ce);for(var oe={},de=ce.toString({parenthesis:"all"});!oe[de];){oe[de]=!0,H=0;var we=de;ne&&console.log("Working on: ",de);for(var Se=0;Se ").concat(ae[Se].r.toString()))),ne){var Fe=ce.toString({parenthesis:"all"});Fe!==we&&(console.log("Applying",Te,"produced",Fe),we=Fe)}M(ce,te.context)}de=ce.toString({parenthesis:"all"})}return ce}function q(Q,ae,fe){var te=Q;if(Q)for(var ne=0;ne1&&(we=ce(Q.args.slice(0,de))),ne=Q.args.slice(de),te=ne.length===1?ne[0]:ce(ne),fe.push(ce([we,te]))}return fe}function le(Q,ae){var fe={placeholders:{}};if(!Q.placeholders&&!ae.placeholders)return fe;if(Q.placeholders){if(!ae.placeholders)return Q}else return ae;for(var te in Q.placeholders)if(ka(Q.placeholders,te)&&(fe.placeholders[te]=Q.placeholders[te],ka(ae.placeholders,te)&&!K(Q.placeholders[te],ae.placeholders[te])))return null;for(var ne in ae.placeholders)ka(ae.placeholders,ne)&&(fe.placeholders[ne]=ae.placeholders[ne]);return fe}function he(Q,ae){var fe=[];if(Q.length===0||ae.length===0)return fe;for(var te,ne=0;ne2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var we=Z(Q.args[0],ae.args[1],fe);if(we.length===0)return[];var Se=Z(Q.args[1],ae.args[0],fe);if(Se.length===0)return[];ce=[we,Se]}ne=$(ce)}else if(ae.args.length>=2&&Q.args.length===2){for(var Te=ie(ae,fe),Fe=[],Ie=0;Ie2)throw Error("Unexpected non-binary associative function: "+Q.toString());return[]}}else if(Q instanceof v){if(Q.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if(G[Q.name]){if(Q.name!==ae.name)return[]}else switch(Q.name[1]>="a"&&Q.name[1]<="z"?Q.name.substring(0,2):Q.name[0]){case"n":case"_p":ne[0].placeholders[Q.name]=ae;break;case"c":case"cl":if(Bi(ae))ne[0].placeholders[Q.name]=ae;else return[];break;case"v":if(!Bi(ae))ne[0].placeholders[Q.name]=ae;else return[];break;case"vl":if(_s(ae))ne[0].placeholders[Q.name]=ae;else return[];break;case"cd":if(MS(ae))ne[0].placeholders[Q.name]=ae;else return[];break;case"vd":if(!MS(ae))ne[0].placeholders[Q.name]=ae;else return[];break;case"ce":if(g1(ae))ne[0].placeholders[Q.name]=ae;else return[];break;case"ve":if(!g1(ae))ne[0].placeholders[Q.name]=ae;else return[];break;default:throw new Error("Invalid symbol in rule: "+Q.name)}}else if(Q instanceof o){if(!m(Q.value,ae.value))return[]}else return[];return ne}function K(Q,ae){if(Q instanceof o&&ae instanceof o){if(!m(Q.value,ae.value))return!1}else if(Q instanceof v&&ae instanceof v){if(Q.name!==ae.name)return!1}else if(Q instanceof g&&ae instanceof g||Q instanceof c&&ae instanceof c){if(Q instanceof g){if(Q.op!==ae.op||Q.fn!==ae.fn)return!1}else if(Q instanceof c&&Q.name!==ae.name)return!1;if(Q.args.length!==ae.args.length)return!1;for(var fe=0;fe{var{typed:N,config:V,mathWithTransform:Y,matrix:X,fraction:J,bignumber:R,AccessorNode:F,ArrayNode:e,ConstantNode:i,FunctionNode:m,IndexNode:t,ObjectNode:y,OperatorNode:p,SymbolNode:l}=T,{isCommutative:d,isAssociative:r,allChildren:n,createMakeNodeFunction:u}=_3({FunctionNode:m,OperatorNode:p,SymbolNode:l}),a=N("simplifyConstant",{Node:L=>b(D(L,{})),"Node, Object":function(w,M){return b(D(w,M))}});function o(L){return $g(L)?L.valueOf():L instanceof Array?L.map(o):Qa(L)?X(o(L.valueOf())):L}function c(L,w,M){try{return Y[L].apply(null,w)}catch{return w=w.map(o),A(Y[L].apply(null,w),M)}}var s=N({Fraction:h,number:function(w){return w<0?v(new i(-w)):new i(w)},BigNumber:function(w){return w<0?v(new i(-w)):new i(w)},Complex:function(w){throw new Error("Cannot convert Complex number to Node")},string:function(w){return new i(w)},Matrix:function(w){return new e(w.valueOf().map(M=>s(M)))}});function b(L){return no(L)?L:s(L)}function g(L,w){var M=w&&w.exactFractions!==!1;if(M&&isFinite(L)&&J){var S=J(L),f=w&&typeof w.fractionsLimit=="number"?w.fractionsLimit:1/0;if(S.valueOf()===L&&S.n0;)if(Bi(S[0])&&typeof S[0].value!="string"){var f=A(S.shift().value,M);Qu(L)?L=L.items[f-1]:(L=L.valueOf()[f-1],L instanceof Array&&(L=X(L)))}else if(S.length>1&&Bi(S[1])&&typeof S[1].value!="string"){var P=A(S[1].value,M),E=[],k=Qu(L)?L.items:L.valueOf();for(var O of k)if(Qu(O))E.push(O.items[P-1]);else if(Qa(L))E.push(O[P-1]);else break;if(E.length===k.length)Qu(L)?L=new e(E):L=X(E),S.splice(1,1);else break}else break;return S.length===w.dimensions.length?new F(b(L),w):S.length>0?(w=new t(S),new F(b(L),w)):L}if(_1(L)&&w.dimensions.length===1&&Bi(w.dimensions[0])){var G=w.dimensions[0].value;return G in L.properties?L.properties[G]:new i}return new F(b(L),w)}function C(L,w,M,S){var f=w.shift(),P=w.reduce((E,k)=>{if(!no(k)){var O=E.pop();if(no(O))return[O,k];try{return E.push(c(L,[O,k],S)),E}catch{E.push(O)}}E.push(b(E.pop()));var G=E.length===1?E[0]:M(E);return[M([G,b(k)])]},[f]);return P.length===1?P[0]:M([P[0],s(P[1])])}function D(L,w){switch(L.type){case"SymbolNode":return L;case"ConstantNode":switch(typeof L.value){case"number":return A(L.value,w);case"string":return L.value;default:if(!isNaN(L.value))return A(L.value,w)}return L;case"FunctionNode":if(Y[L.name]&&Y[L.name].rawArgs)return L;{var M=["add","multiply"];if(M.indexOf(L.name)===-1){var S=L.args.map(re=>D(re,w));if(!S.some(no))try{return c(L.name,S,w)}catch{}if(L.name==="size"&&S.length===1&&Qu(S[0])){for(var f=[],P=S[0];Qu(P);)f.push(P.items.length),P=P.items[0];return X(f)}return new m(L.name,S.map(b))}}case"OperatorNode":{var E=L.fn.toString(),k,O,G=u(L);if(ds(L)&&L.isUnary())k=[D(L.args[0],w)],no(k[0])?O=G(k):O=c(E,k,w);else if(r(L,w.context))if(k=n(L,w.context),k=k.map(re=>D(re,w)),d(E,w.context)){for(var z=[],U=[],H=0;H1?(O=C(E,z,G,w),U.unshift(O),O=C(E,U,G,w)):O=C(E,k,G,w)}else O=C(E,k,G,w);else k=L.args.map(re=>D(re,w)),O=C(E,k,G,w);return O}case"ParenthesisNode":return D(L.content,w);case"AccessorNode":return x(D(L.object,w),D(L.index,w),w);case"ArrayNode":{var B=L.items.map(re=>D(re,w));return B.some(no)?new e(B.map(b)):X(B)}case"IndexNode":return new t(L.dimensions.map(re=>a(re,w)));case"ObjectNode":{var W={};for(var q in L.properties)W[q]=a(L.properties[q],w);return new y(W)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(L.type))}}return a}),ES="simplifyCore",$K=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],KK=Lr(ES,$K,T=>{var{typed:N,parse:V,equal:Y,isZero:X,add:J,subtract:R,multiply:F,divide:e,pow:i,AccessorNode:m,ArrayNode:t,ConstantNode:y,FunctionNode:p,IndexNode:l,ObjectNode:d,OperatorNode:r,ParenthesisNode:n,SymbolNode:u}=T,a=new y(0),o=new y(1),c=new y(!0),s=new y(!1);function b(h){return ds(h)&&["and","not","or"].includes(h.op)}var{hasProperty:g,isCommutative:A}=_3({FunctionNode:p,OperatorNode:r,SymbolNode:u});function v(h){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=x?x.context:void 0;if(g(h,"trivial",C)){if(_v(h)&&h.args.length===1)return v(h.args[0],x);var D=!1,L=0;if(h.forEach(U=>{++L,L===1&&(D=v(U,x))}),L===1)return D}var w=h;if(_v(w)){var M=hG(w.name);if(M){if(w.args.length>2&&g(w,"associative",C))for(;w.args.length>2;){var S=w.args.pop(),f=w.args.pop();w.args.push(new r(M,w.name,[S,f]))}w=new r(M,w.name,w.args)}else return new p(v(w.fn),w.args.map(U=>v(U,x)))}if(ds(w)&&w.isUnary()){var P=v(w.args[0],x);if(w.op==="~"&&ds(P)&&P.isUnary()&&P.op==="~"||w.op==="not"&&ds(P)&&P.isUnary()&&P.op==="not"&&b(P.args[0]))return P.args[0];var E=!0;if(w.op==="-"&&ds(P)&&(P.isBinary()&&P.fn==="subtract"&&(w=new r("-","subtract",[P.args[1],P.args[0]]),E=!1),P.isUnary()&&P.op==="-"))return P.args[0];if(E)return new r(w.op,w.fn,[P])}if(ds(w)&&w.isBinary()){var k=v(w.args[0],x),O=v(w.args[1],x);if(w.op==="+"){if(Bi(k)&&X(k.value))return O;if(Bi(O)&&X(O.value))return k;ds(O)&&O.isUnary()&&O.op==="-"&&(O=O.args[0],w=new r("-","subtract",[k,O]))}if(w.op==="-")return ds(O)&&O.isUnary()&&O.op==="-"?v(new r("+","add",[k,O.args[0]]),x):Bi(k)&&X(k.value)?v(new r("-","unaryMinus",[O])):Bi(O)&&X(O.value)?k:new r(w.op,w.fn,[k,O]);if(w.op==="*"){if(Bi(k)){if(X(k.value))return a;if(Y(k.value,1))return O}if(Bi(O)){if(X(O.value))return a;if(Y(O.value,1))return k;if(A(w,C))return new r(w.op,w.fn,[O,k],w.implicit)}return new r(w.op,w.fn,[k,O],w.implicit)}if(w.op==="/")return Bi(k)&&X(k.value)?a:Bi(O)&&Y(O.value,1)?k:new r(w.op,w.fn,[k,O]);if(w.op==="^"&&Bi(O)){if(X(O.value))return o;if(Y(O.value,1))return k}if(w.op==="and"){if(Bi(k))if(k.value){if(b(O))return O}else return s;if(Bi(O))if(O.value){if(b(k))return k}else return s}if(w.op==="or"){if(Bi(k)){if(k.value)return c;if(b(O))return O}if(Bi(O)){if(O.value)return c;if(b(k))return k}}return new r(w.op,w.fn,[k,O])}if(ds(w))return new r(w.op,w.fn,w.args.map(U=>v(U,x)));if(Qu(w))return new t(w.items.map(U=>v(U,x)));if(kd(w))return new m(v(w.object,x),v(w.index,x));if(p0(w))return new l(w.dimensions.map(U=>v(U,x)));if(_1(w)){var G={};for(var z in w.properties)G[z]=v(w.properties[z],x);return new d(G)}return w}return N(ES,{Node:v,"Node,Object":v})}),JK="resolve",QK=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],qK=Lr(JK,QK,T=>{var{typed:N,parse:V,ConstantNode:Y,FunctionNode:X,OperatorNode:J,ParenthesisNode:R}=T;function F(e,i){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!i)return e;if(_s(e)){if(m.has(e.name)){var t=Array.from(m).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(t,"}"))}var y=i.get(e.name);if(no(y)){var p=new Set(m);return p.add(e.name),F(y,i,p)}else return typeof y=="number"?V(String(y)):y!==void 0?new Y(y):e}else if(ds(e)){var l=e.args.map(function(r){return F(r,i,m)});return new J(e.op,e.fn,l,e.implicit)}else{if(Nh(e))return new R(F(e.content,i,m));if(_v(e)){var d=e.args.map(function(r){return F(r,i,m)});return new X(e.name,d)}}return e.map(r=>F(r,i,m))}return N("resolve",{Node:F,"Node, Map | null | undefined":F,"Node, Object":(e,i)=>F(e,Kp(i)),"Array | Matrix":N.referToSelf(e=>i=>i.map(m=>e(m))),"Array | Matrix, null | undefined":N.referToSelf(e=>i=>i.map(m=>e(m))),"Array, Object":N.referTo("Array,Map",e=>(i,m)=>e(i,Kp(m))),"Matrix, Object":N.referTo("Matrix,Map",e=>(i,m)=>e(i,Kp(m))),"Array | Matrix, Map":N.referToSelf(e=>(i,m)=>i.map(t=>e(t,m)))})}),CS="symbolicEqual",eJ=["parse","simplify","typed","OperatorNode"],tJ=Lr(CS,eJ,T=>{var{parse:N,simplify:V,typed:Y,OperatorNode:X}=T;function J(R,F){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=new X("-","subtract",[R,F]),m=V(i,{},e);return Bi(m)&&!m.value}return Y(CS,{"Node, Node":J,"Node, Node, Object":J})}),DS="derivative",rJ=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],nJ=Lr(DS,rJ,T=>{var{typed:N,config:V,parse:Y,simplify:X,equal:J,isZero:R,numeric:F,ConstantNode:e,FunctionNode:i,OperatorNode:m,ParenthesisNode:t,SymbolNode:y}=T;function p(o,c){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},b={};r(b,o,c.name);var g=n(o,b);return s.simplify?X(g):g}N.addConversion({from:"identifier",to:"SymbolNode",convert:Y});var l=N(DS,{"Node, SymbolNode":p,"Node, SymbolNode, Object":p});N.removeConversion({from:"identifier",to:"SymbolNode",convert:Y}),l._simplify=!0,l.toTex=function(o){return d.apply(null,o.args)};var d=N("_derivTex",{"Node, SymbolNode":function(c,s){return Bi(c)&&wo(c.value)==="string"?d(Y(c.value).toString(),s.toString(),1):d(c.toTex(),s.toString(),1)},"Node, ConstantNode":function(c,s){if(wo(s.value)==="string")return d(c,Y(s.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(c,s,b){return d(c.toString(),s.name,b.value)},"string, string, number":function(c,s,b){var g;return b===1?g="{d\\over d"+s+"}":g="{d^{"+b+"}\\over d"+s+"^{"+b+"}}",g+"\\left[".concat(c,"\\right]")}}),r=N("constTag",{"Object, ConstantNode, string":function(c,s){return c[s]=!0,!0},"Object, SymbolNode, string":function(c,s,b){return s.name!==b?(c[s]=!0,!0):!1},"Object, ParenthesisNode, string":function(c,s,b){return r(c,s.content,b)},"Object, FunctionAssignmentNode, string":function(c,s,b){return s.params.indexOf(b)===-1?(c[s]=!0,!0):r(c,s.expr,b)},"Object, FunctionNode | OperatorNode, string":function(c,s,b){if(s.args.length>0){for(var g=r(c,s.args[0],b),A=1;A0){var g=c.args.filter(function(w){return s[w]===void 0}),A=g.length===1?g[0]:new m("*","multiply",g),v=b.concat(n(A,s));return new m("*","multiply",v)}return new m("+","add",c.args.map(function(w){return new m("*","multiply",c.args.map(function(M){return M===w?n(M,s):M.clone()}))}))}if(c.op==="/"&&c.isBinary()){var h=c.args[0],x=c.args[1];return s[x]!==void 0?new m("/","divide",[n(h,s),x]):s[h]!==void 0?new m("*","multiply",[new m("-","unaryMinus",[h]),new m("/","divide",[n(x,s),new m("^","pow",[x.clone(),a(2)])])]):new m("/","divide",[new m("-","subtract",[new m("*","multiply",[n(h,s),x.clone()]),new m("*","multiply",[h.clone(),n(x,s)])]),new m("^","pow",[x.clone(),a(2)])])}if(c.op==="^"&&c.isBinary()){var C=c.args[0],D=c.args[1];if(s[C]!==void 0)return Bi(C)&&(R(C.value)||J(C.value,1))?a(0):new m("*","multiply",[c,new m("*","multiply",[new i("log",[C.clone()]),n(D.clone(),s)])]);if(s[D]!==void 0){if(Bi(D)){if(R(D.value))return a(0);if(J(D.value,1))return n(C,s)}var L=new m("^","pow",[C.clone(),new m("-","subtract",[D,a(1)])]);return new m("*","multiply",[D.clone(),new m("*","multiply",[n(C,s),L])])}return new m("*","multiply",[new m("^","pow",[C.clone(),D.clone()]),new m("+","add",[new m("*","multiply",[n(C,s),new m("/","divide",[D.clone(),C.clone()])]),new m("*","multiply",[n(D,s),new i("log",[C.clone()])])])])}throw new Error('Operator "'+c.op+'" is not supported by derivative, or a wrong number of arguments is passed')}});function u(o){if(!((o.name==="log"||o.name==="nthRoot"||o.name==="pow")&&o.args.length===2)){for(var c=0;c{var{config:N,typed:V,equal:Y,isZero:X,add:J,subtract:R,multiply:F,divide:e,pow:i,parse:m,simplifyConstant:t,simplifyCore:y,simplify:p,fraction:l,bignumber:d,mathWithTransform:r,matrix:n,AccessorNode:u,ArrayNode:a,ConstantNode:o,FunctionNode:c,IndexNode:s,ObjectNode:b,OperatorNode:g,SymbolNode:A,ParenthesisNode:v}=T;function h(w){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,f=C(),P=x(w,M,!0,f.firstRules),E=P.variables.length,k={exactFractions:!1},O={exactFractions:!0};if(w=P.expression,E>=1){w=D(w);var G,z,U=!0,H=!1;w=p(w,f.firstRules,{},k);for(var B;z=U?f.distrDivRules:f.sucDivRules,w=p(w,z,{},O),U=!U,B=w.toString(),B!==G;)H=!0,G=B;H&&(w=p(w,f.firstRulesAgain,{},k)),w=p(w,f.finalRules,{},k)}var W=[],q={};return w.type==="OperatorNode"&&w.isBinary()&&w.op==="/"?(E===1&&(w.args[0]=L(w.args[0],W),w.args[1]=L(w.args[1])),S&&(q.numerator=w.args[0],q.denominator=w.args[1])):(E===1&&(w=L(w,W)),S&&(q.numerator=w,q.denominator=null)),S?(q.coefficients=W,q.variables=P.variables,q.expression=w,q):w}return V(LS,{Node:h,"Node, boolean":(w,M)=>h(w,{},M),"Node, Object":h,"Node, Object, boolean":h});function x(w,M,S,f){var P=[],E=p(w,f,M,{exactFractions:!1});S=!!S;var k="+-*"+(S?"/":"");G(E);var O={};return O.expression=E,O.variables=P,O;function G(z){var U=z.type;if(U==="FunctionNode")throw new Error("There is an unsolved function call");if(U==="OperatorNode")if(z.op==="^"){if(z.args[1].type!=="ConstantNode"||!Ya(parseFloat(z.args[1].value)))throw new Error("There is a non-integer exponent");G(z.args[0])}else{if(k.indexOf(z.op)===-1)throw new Error("Operator "+z.op+" invalid in polynomial expression");for(var H=0;H1;if(f==="OperatorNode"&&w.isBinary()){var E=!1,k;if(w.op==="^"&&(w.args[0].type==="ParenthesisNode"||w.args[0].type==="OperatorNode")&&w.args[1].type==="ConstantNode"&&(k=parseFloat(w.args[1].value),E=k>=2&&Ya(k)),E){if(k>2){var O=w.args[0],G=new g("^","pow",[w.args[0].cloneDeep(),new o(k-1)]);w=new g("*","multiply",[O,G])}else w=new g("*","multiply",[w.args[0],w.args[0].cloneDeep()]);P&&(S==="content"?M.content=w:M.args[S]=w)}}if(f==="ParenthesisNode")D(w.content,w,"content");else if(f!=="ConstantNode"&&f!=="SymbolNode")for(var z=0;z=0;O--)if(M[O]!==0){var G=new o(E?M[O]:Math.abs(M[O])),z=M[O]<0?"-":"+";if(O>0){var U=new A(P);if(O>1){var H=new o(O);U=new g("^","pow",[U,H])}M[O]===-1&&E?G=new g("-","unaryMinus",[U]):Math.abs(M[O])===1?G=U:G=new g("*","multiply",[G,U])}E?k=G:z==="+"?k=new g("+","add",[k,G]):k=new g("-","subtract",[k,G]),E=!1}if(E)return new o(0);return k;function B(W,q,re){var ie=W.type;if(ie==="FunctionNode")throw new Error("There is an unsolved function call");if(ie==="OperatorNode"){if("+-*^".indexOf(W.op)===-1)throw new Error("Operator "+W.op+" invalid");if(q!==null){if((W.fn==="unaryMinus"||W.fn==="pow")&&q.fn!=="add"&&q.fn!=="subtract"&&q.fn!=="multiply")throw new Error("Invalid "+W.op+" placing");if((W.fn==="subtract"||W.fn==="add"||W.fn==="multiply")&&q.fn!=="add"&&q.fn!=="subtract")throw new Error("Invalid "+W.op+" placing");if((W.fn==="subtract"||W.fn==="add"||W.fn==="unaryMinus")&&re.noFil!==0)throw new Error("Invalid "+W.op+" placing")}(W.op==="^"||W.op==="*")&&(re.fire=W.op);for(var le=0;lef&&(M[he]=0),M[he]+=re.cte*(re.oper==="+"?1:-1),f=Math.max(he,f);return}re.cte=he,re.fire===""&&(M[0]+=re.cte*(re.oper==="+"?1:-1))}else throw new Error("Type "+ie+" is not allowed")}}}),oJ="reviver",sJ=["classes"],lJ=Lr(oJ,sJ,T=>{var{classes:N}=T;return function(Y,X){var J=N[X&&X.mathjs];return J&&typeof J.fromJSON=="function"?J.fromJSON(X):X}}),uJ="replacer",fJ=[],cJ=Lr(uJ,fJ,()=>function(N,V){return typeof V=="number"&&(!isFinite(V)||isNaN(V))?{mathjs:"number",value:String(V)}:V}),hJ="11.8.0",vJ=Lr("true",[],()=>!0),dJ=Lr("false",[],()=>!1),pJ=Lr("null",[],()=>null),gJ=Nu("Infinity",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(1/0):1/0}),mJ=Nu("NaN",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(NaN):NaN}),yJ=Nu("pi",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?F3(V):$I}),xJ=Nu("tau",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?gH(V):KI}),bJ=Nu("e",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?dH(V):JI}),wJ=Nu("phi",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?pH(V):QI}),AJ=Nu("LN2",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(2).ln():Math.LN2}),TJ=Nu("LN10",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(10).ln():Math.LN10}),MJ=Nu("LOG2E",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(1).div(new V(2).ln()):Math.LOG2E}),SJ=Nu("LOG10E",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(1).div(new V(10).ln()):Math.LOG10E}),EJ=Nu("SQRT1_2",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V("0.5").sqrt():Math.SQRT1_2}),CJ=Nu("SQRT2",["config","?BigNumber"],T=>{var{config:N,BigNumber:V}=T;return N.number==="BigNumber"?new V(2).sqrt():Math.SQRT2}),DJ=Nu("i",["Complex"],T=>{var{Complex:N}=T;return N.I}),LJ=Lr("version",[],()=>hJ);function Nu(T,N,V){return Lr(T,N,V,{recreateOnConfigChange:!0})}var PJ=oi("speedOfLight","299792458","m s^-1"),NJ=oi("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),RJ=oi("planckConstant","6.62607015e-34","J s"),FJ=oi("reducedPlanckConstant","1.0545718176461565e-34","J s"),IJ=oi("magneticConstant","1.25663706212e-6","N A^-2"),_J=oi("electricConstant","8.8541878128e-12","F m^-1"),OJ=oi("vacuumImpedance","376.730313667","ohm"),zJ=oi("coulomb","8.987551792261171e9","N m^2 C^-2"),kJ=oi("elementaryCharge","1.602176634e-19","C"),BJ=oi("bohrMagneton","9.2740100783e-24","J T^-1"),UJ=oi("conductanceQuantum","7.748091729863649e-5","S"),HJ=oi("inverseConductanceQuantum","12906.403729652257","ohm"),VJ=oi("magneticFluxQuantum","2.0678338484619295e-15","Wb"),GJ=oi("nuclearMagneton","5.0507837461e-27","J T^-1"),WJ=oi("klitzing","25812.807459304513","ohm"),YJ=oi("bohrRadius","5.29177210903e-11","m"),ZJ=oi("classicalElectronRadius","2.8179403262e-15","m"),XJ=oi("electronMass","9.1093837015e-31","kg"),jJ=oi("fermiCoupling","1.1663787e-5","GeV^-2"),$J=X1("fineStructure",.0072973525693),KJ=oi("hartreeEnergy","4.3597447222071e-18","J"),JJ=oi("protonMass","1.67262192369e-27","kg"),QJ=oi("deuteronMass","3.3435830926e-27","kg"),qJ=oi("neutronMass","1.6749271613e-27","kg"),eQ=oi("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),tQ=oi("rydberg","10973731.568160","m^-1"),rQ=oi("thomsonCrossSection","6.6524587321e-29","m^2"),nQ=X1("weakMixingAngle",.2229),aQ=X1("efimovFactor",22.7),iQ=oi("atomicMass","1.66053906660e-27","kg"),oQ=oi("avogadro","6.02214076e23","mol^-1"),sQ=oi("boltzmann","1.380649e-23","J K^-1"),lQ=oi("faraday","96485.33212331001","C mol^-1"),uQ=oi("firstRadiation","3.7417718521927573e-16","W m^2"),fQ=oi("loschmidt","2.686780111798444e25","m^-3"),cQ=oi("gasConstant","8.31446261815324","J K^-1 mol^-1"),hQ=oi("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),vQ=oi("molarVolume","0.022413969545014137","m^3 mol^-1"),dQ=X1("sackurTetrode",-1.16487052358),pQ=oi("secondRadiation","0.014387768775039337","m K"),gQ=oi("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),mQ=oi("wienDisplacement","2.897771955e-3","m K"),yQ=oi("molarMass","0.99999999965e-3","kg mol^-1"),xQ=oi("molarMassC12","11.9999999958e-3","kg mol^-1"),bQ=oi("gravity","9.80665","m s^-2"),wQ=oi("planckLength","1.616255e-35","m"),AQ=oi("planckMass","2.176435e-8","kg"),TQ=oi("planckTime","5.391245e-44","s"),MQ=oi("planckCharge","1.87554603778e-18","C"),SQ=oi("planckTemperature","1.416785e+32","K");function oi(T,N,V){var Y=["config","Unit","BigNumber"];return Lr(T,Y,X=>{var{config:J,Unit:R,BigNumber:F}=X,e=J.number==="BigNumber"?new F(N):parseFloat(N),i=new R(e,V);return i.fixPrefix=!0,i})}function X1(T,N){var V=["config","BigNumber"];return Lr(T,V,Y=>{var{config:X,BigNumber:J}=Y;return X.number==="BigNumber"?new J(N):N})}var EQ="apply",CQ=["typed","isInteger"],DQ=Lr(EQ,CQ,T=>{var{typed:N,isInteger:V}=T,Y=CC({typed:N,isInteger:V});return N("apply",{"...any":function(J){var R=J[1];Ni(R)?J[1]=R-1:Ei(R)&&(J[1]=R.minus(1));try{return Y.apply(null,J)}catch(F){throw Gl(F)}}})},{isTransformFunction:!0}),LQ="column",PQ=["typed","Index","matrix","range"],NQ=Lr(LQ,PQ,T=>{var{typed:N,Index:V,matrix:Y,range:X}=T,J=NC({typed:N,Index:V,matrix:Y,range:X});return N("column",{"...any":function(F){var e=F.length-1,i=F[e];Ni(i)&&(F[e]=i-1);try{return J.apply(null,F)}catch(m){throw Gl(m)}}})},{isTransformFunction:!0});function O3(T,N,V){var Y=T.filter(function(F){return _s(F)&&!(F.name in N)&&!V.has(F.name)})[0];if(!Y)throw new Error('No undefined variable found in inline expression "'+T+'"');var X=Y.name,J=hg(V),R=T.compile();return function(e){return J.set(X,e),R.evaluate(J)}}var RQ="filter",FQ=["typed"],IQ=Lr(RQ,FQ,T=>{var{typed:N}=T;function V(X,J,R){var F,e;return X[0]&&(F=X[0].compile().evaluate(R)),X[1]&&(_s(X[1])||Kg(X[1])?e=X[1].compile().evaluate(R):e=O3(X[1],J,R)),Y(F,e)}V.rawArgs=!0;var Y=N("filter",{"Array, function":PS,"Matrix, function":function(J,R){return J.create(PS(J.toArray(),R))},"Array, RegExp":qy,"Matrix, RegExp":function(J,R){return J.create(qy(J.toArray(),R))}});return V},{isTransformFunction:!0});function PS(T,N){var V=Vv(N);return d8(T,function(Y,X,J){return V===1?N(Y):V===2?N(Y,[X+1]):N(Y,[X+1],J)})}var _Q="forEach",OQ=["typed"],zQ=Lr(_Q,OQ,T=>{var{typed:N}=T;function V(X,J,R){var F,e;return X[0]&&(F=X[0].compile().evaluate(R)),X[1]&&(_s(X[1])||Kg(X[1])?e=X[1].compile().evaluate(R):e=O3(X[1],J,R)),Y(F,e)}V.rawArgs=!0;var Y=N("forEach",{"Array | Matrix, function":function(J,R){var F=Vv(R),e=function i(m,t){Array.isArray(m)?k1(m,function(y,p){i(y,t.concat(p+1))}):F===1?R(m):F===2?R(m,t):R(m,t,J)};e(J.valueOf(),[])}});return V},{isTransformFunction:!0}),kQ="index",BQ=["Index"],UQ=Lr(kQ,BQ,T=>{var{Index:N}=T;return function(){for(var Y=[],X=0,J=arguments.length;X0?0:2;else if(R&&R.isSet===!0)R=R.map(function(e){return e-1});else if(ro(R)||Qa(R))R=R.map(function(e){return e-1});else if(Ni(R))R--;else if(Ei(R))R=R.toNumber()-1;else if(typeof R!="string")throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");Y[X]=R}var F=new N;return N.apply(F,Y),F}},{isTransformFunction:!0}),HQ="map",VQ=["typed"],GQ=Lr(HQ,VQ,T=>{var{typed:N}=T;function V(X,J,R){var F,e;return X[0]&&(F=X[0].compile().evaluate(R)),X[1]&&(_s(X[1])||Kg(X[1])?e=X[1].compile().evaluate(R):e=O3(X[1],J,R)),Y(F,e)}V.rawArgs=!0;var Y=N("map",{"Array, function":function(J,R){return NS(J,R,J)},"Matrix, function":function(J,R){return J.create(NS(J.valueOf(),R,J))}});return V},{isTransformFunction:!0});function NS(T,N,V){var Y=Vv(N);function X(J,R){return Array.isArray(J)?Eh(J,function(F,e){return X(F,R.concat(e+1))}):Y===1?N(J):Y===2?N(J,R):N(J,R,V)}return X(T,[])}function Zd(T){if(T.length===2&&Lc(T[0])){T=T.slice();var N=T[1];Ni(N)?T[1]=N-1:Ei(N)&&(T[1]=N.minus(1))}return T}var WQ="max",YQ=["typed","config","numeric","larger"],ZQ=Lr(WQ,YQ,T=>{var{typed:N,config:V,numeric:Y,larger:X}=T,J=kC({typed:N,config:V,numeric:Y,larger:X});return N("max",{"...any":function(F){F=Zd(F);try{return J.apply(null,F)}catch(e){throw Gl(e)}}})},{isTransformFunction:!0}),XQ="mean",jQ=["typed","add","divide"],$Q=Lr(XQ,jQ,T=>{var{typed:N,add:V,divide:Y}=T,X=XC({typed:N,add:V,divide:Y});return N("mean",{"...any":function(R){R=Zd(R);try{return X.apply(null,R)}catch(F){throw Gl(F)}}})},{isTransformFunction:!0}),KQ="min",JQ=["typed","config","numeric","smaller"],QQ=Lr(KQ,JQ,T=>{var{typed:N,config:V,numeric:Y,smaller:X}=T,J=BC({typed:N,config:V,numeric:Y,smaller:X});return N("min",{"...any":function(F){F=Zd(F);try{return J.apply(null,F)}catch(e){throw Gl(e)}}})},{isTransformFunction:!0}),qQ="range",eq=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq"],tq=Lr(qQ,eq,T=>{var{typed:N,config:V,matrix:Y,bignumber:X,smaller:J,smallerEq:R,larger:F,largerEq:e}=T,i=_C({typed:N,config:V,matrix:Y,bignumber:X,smaller:J,smallerEq:R,larger:F,largerEq:e});return N("range",{"...any":function(t){var y=t.length-1,p=t[y];return typeof p!="boolean"&&t.push(!0),i.apply(null,t)}})},{isTransformFunction:!0}),rq="row",nq=["typed","Index","matrix","range"],aq=Lr(rq,nq,T=>{var{typed:N,Index:V,matrix:Y,range:X}=T,J=OC({typed:N,Index:V,matrix:Y,range:X});return N("row",{"...any":function(F){var e=F.length-1,i=F[e];Ni(i)&&(F[e]=i-1);try{return J.apply(null,F)}catch(m){throw Gl(m)}}})},{isTransformFunction:!0}),iq="subset",oq=["typed","matrix"],sq=Lr(iq,oq,T=>{var{typed:N,matrix:V}=T,Y=zC({typed:N,matrix:V});return N("subset",{"...any":function(J){try{return Y.apply(null,J)}catch(R){throw Gl(R)}}})},{isTransformFunction:!0}),lq="concat",uq=["typed","matrix","isInteger"],fq=Lr(lq,uq,T=>{var{typed:N,matrix:V,isInteger:Y}=T,X=LC({typed:N,matrix:V,isInteger:Y});return N("concat",{"...any":function(R){var F=R.length-1,e=R[F];Ni(e)?R[F]=e-1:Ei(e)&&(R[F]=e.minus(1));try{return X.apply(null,R)}catch(i){throw Gl(i)}}})},{isTransformFunction:!0}),RS="diff",cq=["typed","matrix","subtract","number","bignumber"],hq=Lr(RS,cq,T=>{var{typed:N,matrix:V,subtract:Y,number:X,bignumber:J}=T,R=RC({typed:N,matrix:V,subtract:Y,number:X,bignumber:J});return N(RS,{"...any":function(e){e=Zd(e);try{return R.apply(null,e)}catch(i){throw Gl(i)}}})},{isTransformFunction:!0}),vq="std",dq=["typed","map","sqrt","variance"],pq=Lr(vq,dq,T=>{var{typed:N,map:V,sqrt:Y,variance:X}=T,J=$C({typed:N,map:V,sqrt:Y,variance:X});return N("std",{"...any":function(F){F=Zd(F);try{return J.apply(null,F)}catch(e){throw Gl(e)}}})},{isTransformFunction:!0}),FS="sum",gq=["typed","config","add","numeric"],mq=Lr(FS,gq,T=>{var{typed:N,config:V,add:Y,numeric:X}=T,J=YC({typed:N,config:V,add:Y,numeric:X});return N(FS,{"...any":function(F){F=Zd(F);try{return J.apply(null,F)}catch(e){throw Gl(e)}}})},{isTransformFunction:!0}),IS="cumsum",yq=["typed","add","unaryPlus"],xq=Lr(IS,yq,T=>{var{typed:N,add:V,unaryPlus:Y}=T,X=ZC({typed:N,add:V,unaryPlus:Y});return N(IS,{"...any":function(R){if(R.length===2&&Lc(R[0])){var F=R[1];Ni(F)?R[1]=F-1:Ei(F)&&(R[1]=F.minus(1))}try{return X.apply(null,R)}catch(e){throw Gl(e)}}})},{isTransformFunction:!0}),_S="variance",bq=["typed","add","subtract","multiply","divide","apply","isNaN"],wq=Lr(_S,bq,T=>{var{typed:N,add:V,subtract:Y,multiply:X,divide:J,apply:R,isNaN:F}=T,e=jC({typed:N,add:V,subtract:Y,multiply:X,divide:J,apply:R,isNaN:F});return N(_S,{"...any":function(m){m=Zd(m);try{return e.apply(null,m)}catch(t){throw Gl(t)}}})},{isTransformFunction:!0}),ma=EI({config:jn}),To=LI({}),OS=bJ({BigNumber:ma,config:jn}),Aq=dJ({}),Tq=$J({BigNumber:ma,config:jn}),Xd=RI({}),aD=DJ({Complex:To}),Mq=gJ({BigNumber:ma,config:jn}),Sq=TJ({BigNumber:ma,config:jn}),Eq=SJ({BigNumber:ma,config:jn}),j1=kI({}),Cq=mJ({BigNumber:ma,config:jn}),Dq=pJ({}),Lq=wJ({BigNumber:ma,config:jn}),Pq=_I({}),iD=PF({}),Nq=EJ({BigNumber:ma,config:jn}),Rq=dQ({BigNumber:ma,config:jn}),oD=xJ({BigNumber:ma,config:jn}),Fq=vJ({}),Iq=LJ({}),di=VI({Matrix:j1}),_q=aQ({BigNumber:ma,config:jn}),Oq=AJ({BigNumber:ma,config:jn}),zS=yJ({BigNumber:ma,config:jn}),zq=cJ({}),kq=CJ({BigNumber:ma,config:jn}),$r=EF({BigNumber:ma,Complex:To,DenseMatrix:di,Fraction:Xd}),z3=q_({BigNumber:ma,config:jn,typed:$r}),Bq=nQ({BigNumber:ma,config:jn}),uu=tO({typed:$r}),Uq=CH({Complex:To,config:jn,typed:$r}),Hq=NH({BigNumber:ma,typed:$r}),Vq=_H({BigNumber:ma,Complex:To,config:jn,typed:$r}),gs=iO({typed:$r}),Gq=jz({typed:$r}),Wq=HH({BigNumber:ma,Complex:To,config:jn,typed:$r}),Yq=ZH({typed:$r}),sD=$H({typed:$r}),Zq=qH({Complex:To,config:jn,typed:$r}),Rc=F_({BigNumber:ma,typed:$r}),Xq=Uz({typed:$r}),jq=P_({typed:$r}),$q=WI({typed:$r}),$1=eK({typed:$r}),K1=O_({Complex:To,typed:$r}),jd=Kz({typed:$r}),Kq=nV({typed:$r}),Jq=sV({BigNumber:ma,typed:$r}),Qq=uV({BigNumber:ma,typed:$r}),qq=yO({typed:$r}),Ri=y_({config:jn,typed:$r}),eee=vB({typed:$r}),lD=bO({typed:$r}),tee=AO({Complex:To,typed:$r}),ree=mk({typed:$r}),nee=wk({typed:$r}),qg=AB({typed:$r}),aee=Mk({typed:$r}),iee=DB({format:qg,typed:$r}),k3=Qz({typed:$r}),uf=ZI({typed:$r}),b0=n_({typed:$r}),J1=u_({typed:$r}),qf=c_({typed:$r}),oee=MJ({BigNumber:ma,config:jn}),see=oK({Complex:To,typed:$r}),lee=qO({Complex:To,config:jn,typed:$r}),uD=tz({Complex:To,config:jn,typed:$r}),w0=Pk({typed:$r}),qo=fz({typed:$r}),fD=rk({typed:$r}),Wv=E_({typed:$r}),uee=EB({format:qg,typed:$r}),fee=EK({config:jn,typed:$r}),cee=PB({typed:$r}),hee=DK({config:jn,typed:$r}),B3=ek({typed:$r}),vee=vV({BigNumber:ma,typed:$r}),cD=gz({BigNumber:ma,Fraction:Xd,complex:K1,typed:$r}),U3=mV({typed:$r}),Ih=w_({Matrix:j1,equalScalar:Ri,typed:$r}),dee=$_({typed:$r}),pee=wz({typed:$r}),gee=D_({typed:$r}),mee=wV({typed:$r}),hD=p_({typed:$r}),yee=LH({Complex:To,config:jn,typed:$r}),xee=zH({BigNumber:ma,typed:$r}),H3=CC({isInteger:uf,typed:$r}),bee=BH({BigNumber:ma,Complex:To,config:jn,typed:$r}),wee=MB({format:qg,typed:$r}),Aee=rK({typed:$r}),V3=tV({typed:$r}),Tee=cV({BigNumber:ma,typed:$r}),em=v_({typed:$r}),Mee=IB({typed:$r}),See=PK({config:jn,typed:$r}),Eee=pV({BigNumber:ma,typed:$r}),Cee=xV({typed:$r}),Dee=TH({SparseMatrix:Ih,typed:$r}),Ic=xz({Complex:To,config:jn,typed:$r}),Lee=MV({typed:$r}),_c=J_({typed:$r}),Pee=FH({BigNumber:ma,Complex:To,config:jn,typed:$r}),Nee=iV({BigNumber:ma,typed:$r}),A0=B_({Fraction:Xd,typed:$r}),$d=i_({typed:$r}),ba=H_({DenseMatrix:di,Matrix:j1,SparseMatrix:Ih,typed:$r}),Ree=G_({isZero:qf,matrix:ba,typed:$r}),Fee=yB({isNaN:em,isNumeric:$d,typed:$r}),Xf=zB({bignumber:Rc,fraction:A0,number:Wv}),vD=bB({config:jn,multiplyScalar:qo,numeric:Xf,typed:$r}),Iee=kk({isInteger:uf,matrix:ba,typed:$r}),wl=jk({matrix:ba,config:jn,typed:$r}),_ee=Kk({matrix:ba,typed:$r}),Ru=zC({matrix:ba,typed:$r}),tm=rB({matrix:ba,typed:$r}),dD=Sz({BigNumber:ma,config:jn,matrix:ba,typed:$r}),Oc=oB({BigNumber:ma,config:jn,matrix:ba,typed:$r}),Oee=GH({Complex:To,config:jn,typed:$r}),pD=sO({BigNumber:ma,Complex:To,Fraction:Xd,config:jn,isNegative:b0,matrix:ba,typed:$r,unaryMinus:_c}),Ki=LC({isInteger:uf,matrix:ba,typed:$r}),zee=fk({prod:vD,size:wl,typed:$r}),G3=aB({conj:jd,transpose:tm,typed:$r}),gD=dk({DenseMatrix:di,SparseMatrix:Ih,matrix:ba,typed:$r}),_o=BB({numeric:Xf,typed:$r}),rm=qB({DenseMatrix:di,concat:Ki,divideScalar:_o,equalScalar:Ri,matrix:ba,typed:$r}),ec=CU({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),nm=xk({matrix:ba,typed:$r}),kee=YO({BigNumber:ma,DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),Bee=s_({isNumeric:$d,typed:$r}),Yv=Ek({BigNumber:ma,DenseMatrix:di,SparseMatrix:Ih,config:jn,matrix:ba,typed:$r}),Uee=Dk({matrix:ba,multiplyScalar:qo,typed:$r}),Q1=HU({DenseMatrix:di,concat:Ki,config:jn,matrix:ba,typed:$r}),Hee=cU({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r,zeros:Oc}),W3=X_({flatten:nm,matrix:ba,size:wl,typed:$r}),mD=sz({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),Vee=dz({BigNumber:ma,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),Gee=_k({BigNumber:ma,config:jn,matrix:ba,typed:$r}),Wee=Hk({config:jn,matrix:ba}),Yee=vU({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r,zeros:Oc}),q1=GB({BigNumber:ma,DenseMatrix:di,equalScalar:Ri,matrix:ba,typed:$r,zeros:Oc}),ff=RU({DenseMatrix:di,concat:Ki,config:jn,matrix:ba,typed:$r}),Zee=RB({concat:Ki,matrix:ba,typed:$r}),Xee=ZU({DenseMatrix:di,concat:Ki,config:jn,equalScalar:Ri,matrix:ba,typed:$r}),jee=ok({DenseMatrix:di,concat:Ki,matrix:ba,typed:$r}),Ao=ZV({DenseMatrix:di,SparseMatrix:Ih,addScalar:gs,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),$ee=kz({concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),Kee=Zz({DenseMatrix:di,concat:Ki,matrix:ba,typed:$r}),Jee=OK({addScalar:gs,combinations:$1,divideScalar:_o,isInteger:uf,isNegative:b0,multiplyScalar:qo,typed:$r}),T0=xU({BigNumber:ma,DenseMatrix:di,Fraction:Xd,concat:Ki,config:jn,equalScalar:Ri,matrix:ba,typed:$r}),yD=SU({concat:Ki,matrix:ba,typed:$r}),Qee=ZC({add:Ao,typed:$r,unaryPlus:z3}),xD=WU({equal:ec,typed:$r}),ex=QV({addScalar:gs,conj:jd,multiplyScalar:qo,size:wl,typed:$r}),qee=PU({compareText:yD,isZero:qf,typed:$r}),bD=DO({DenseMatrix:di,config:jn,equalScalar:Ri,matrix:ba,round:q1,typed:$r,zeros:Oc}),ete=jV({abs:uu,addScalar:gs,divideScalar:_o,isPositive:J1,multiplyScalar:qo,smaller:ff,sqrt:Ic,typed:$r}),wD=rH({DenseMatrix:di,smaller:ff}),ml=iH({ImmutableDenseMatrix:wD}),tte=Cz({BigNumber:ma,add:Ao,config:jn,equal:ec,isInteger:uf,mod:mD,smaller:ff,typed:$r,xgcd:dD}),cf=kU({DenseMatrix:di,concat:Ki,config:jn,matrix:ba,typed:$r}),Y3=YB({Complex:To,config:jn,divideScalar:_o,typed:$r}),rte=Y_({flatten:nm,matrix:ba,size:wl,typed:$r}),nte=BC({config:jn,numeric:Xf,smaller:ff,typed:$r}),Mo=hz({addScalar:gs,dot:ex,equalScalar:Ri,matrix:ba,multiplyScalar:qo,typed:$r}),ate=$B({Complex:To,config:jn,divideScalar:_o,typed:$r}),ite=ak({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),Z3=$U({compare:T0,isNaN:em,isNumeric:$d,typed:$r}),ote=J$({add:Ao,compare:T0,multiply:Mo,partitionSelect:Z3,typed:$r}),ste=pU({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r,zeros:Oc}),X3=_U({DenseMatrix:di,concat:Ki,config:jn,matrix:ba,typed:$r}),go=Tz({DenseMatrix:di,addScalar:gs,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r,unaryMinus:_c}),lte=tG({add:Ao,matrix:ba,typed:$r}),j3=nU({DenseMatrix:di,divideScalar:_o,equalScalar:Ri,matrix:ba,multiplyScalar:qo,subtract:go,typed:$r}),ute=mU({concat:Ki,equalScalar:Ri,matrix:ba,not:fD,typed:$r,zeros:Oc}),fte=Vz({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),$3=gO({DenseMatrix:di,config:jn,equalScalar:Ri,matrix:ba,round:q1,typed:$r,zeros:Oc}),zc=AU({compare:T0,typed:$r}),cte=kK({addScalar:gs,combinations:$1,isInteger:uf,isNegative:b0,isPositive:J1,larger:cf,typed:$r}),hte=hk({matrix:ba,multiply:Mo,subtract:go,typed:$r}),AD=v$({divideScalar:_o,isZero:qf,matrix:ba,multiply:Mo,subtract:go,typed:$r,unaryMinus:_c}),vte=RC({matrix:ba,number:Wv,subtract:go,typed:$r}),dte=z$({abs:uu,addScalar:gs,divideScalar:_o,multiplyScalar:qo,sqrt:Ic,subtract:go,typed:$r,unaryMinus:_c}),pte=Nz({concat:Ki,equalScalar:Ri,matrix:ba,multiplyScalar:qo,typed:$r}),TD=lH({larger:cf,smaller:ff}),MD=SO({Complex:To,DenseMatrix:di,ceil:$3,equalScalar:Ri,floor:bD,matrix:ba,typed:$r,zeros:Oc}),SD=nG({Index:ml,typed:$r}),gte=U$({abs:uu,add:Ao,addScalar:gs,config:jn,divideScalar:_o,equalScalar:Ri,flatten:nm,isNumeric:$d,isZero:qf,matrix:ba,multiply:Mo,multiplyScalar:qo,smaller:ff,subtract:go,typed:$r}),mte=JO({concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),yte=XB({Complex:To,config:jn,divideScalar:_o,log:Y3,typed:$r}),ED=tU({DenseMatrix:di,divideScalar:_o,equalScalar:Ri,matrix:ba,multiplyScalar:qo,subtract:go,typed:$r}),CD=kC({config:jn,larger:cf,numeric:Xf,typed:$r}),K3=oW({addScalar:gs,complex:K1,conj:jd,divideScalar:_o,equal:ec,identity:Yv,isZero:qf,matrix:ba,multiplyScalar:qo,sign:cD,sqrt:Ic,subtract:go,typed:$r,unaryMinus:_c,zeros:Oc}),c0=_C({bignumber:Rc,matrix:ba,config:jn,larger:cf,largerEq:Q1,smaller:ff,smallerEq:X3,typed:$r}),xte=OC({Index:ml,matrix:ba,range:c0,typed:$r}),bte=EV({DenseMatrix:di,Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),wte=PV({DenseMatrix:di,Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),Ate=IV({Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),Tte=kV({Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),DD=PW({SparseMatrix:Ih,abs:uu,add:Ao,divideScalar:_o,larger:cf,largerEq:Q1,multiply:Mo,subtract:go,transpose:tm,typed:$r}),LD=cH({FibonacciHeap:TD,addScalar:gs,equalScalar:Ri}),PD=YC({add:Ao,config:jn,numeric:Xf,typed:$r}),ND=sU({DenseMatrix:di,divideScalar:_o,equalScalar:Ri,matrix:ba,multiplyScalar:qo,subtract:go,typed:$r}),Mte=JH({BigNumber:ma,DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,typed:$r}),RD=NC({Index:ml,matrix:ba,range:c0,typed:$r}),Ste=iU({DenseMatrix:di,divideScalar:_o,equalScalar:Ri,matrix:ba,multiplyScalar:qo,subtract:go,typed:$r}),FD=DV({DenseMatrix:di,Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),Ete=OV({Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),ID=VV({Index:ml,concat:Ki,setDifference:FD,size:wl,subset:Ru,typed:$r}),Cte=JU({compare:T0,compareNatural:zc,matrix:ba,typed:$r}),Kd=p$({abs:uu,addScalar:gs,det:AD,divideScalar:_o,identity:Yv,matrix:ba,multiply:Mo,typed:$r,unaryMinus:_c}),_D=aW({DenseMatrix:di,Spa:LD,SparseMatrix:Ih,abs:uu,addScalar:gs,divideScalar:_o,equalScalar:Ri,larger:cf,matrix:ba,multiplyScalar:qo,subtract:go,typed:$r,unaryMinus:_c}),Dte=m$({Complex:To,add:Ao,ctranspose:G3,deepEqual:xD,divideScalar:_o,dot:ex,dotDivide:rm,equal:ec,inv:Kd,matrix:ba,multiply:Mo,typed:$r}),kc=HB({Complex:To,config:jn,fraction:A0,identity:Yv,inv:Kd,matrix:ba,multiply:Mo,number:Wv,typed:$r}),OD=RV({DenseMatrix:di,Index:ml,compareNatural:zc,size:wl,subset:Ru,typed:$r}),Lte=WV({Index:ml,concat:Ki,setIntersect:OD,setSymDifference:ID,size:wl,subset:Ru,typed:$r}),Pte=E$({abs:uu,add:Ao,identity:Yv,inv:Kd,map:w0,max:CD,multiply:Mo,size:wl,sqrt:Ic,subtract:go,typed:$r}),ti=xH({BigNumber:ma,Complex:To,Fraction:Xd,abs:uu,addScalar:gs,config:jn,divideScalar:_o,equal:ec,fix:MD,format:qg,isNumeric:$d,multiplyScalar:qo,number:Wv,pow:kc,round:q1,subtract:go}),Nte=OJ({BigNumber:ma,Unit:ti,config:jn}),Rte=mQ({BigNumber:ma,Unit:ti,config:jn}),Fte=iQ({BigNumber:ma,Unit:ti,config:jn}),Ite=BJ({BigNumber:ma,Unit:ti,config:jn}),_te=sQ({BigNumber:ma,Unit:ti,config:jn}),Ote=UJ({BigNumber:ma,Unit:ti,config:jn}),zte=SH({Unit:ti,typed:$r}),kte=QJ({BigNumber:ma,Unit:ti,config:jn}),Bte=JB({DenseMatrix:di,concat:Ki,equalScalar:Ri,matrix:ba,pow:kc,typed:$r}),Ute=_J({BigNumber:ma,Unit:ti,config:jn}),Hte=kJ({BigNumber:ma,Unit:ti,config:jn}),Vte=M$({abs:uu,add:Ao,identity:Yv,inv:Kd,multiply:Mo,typed:$r}),Gte=lQ({BigNumber:ma,Unit:ti,config:jn}),zD=lB({addScalar:gs,ceil:$3,conj:jd,divideScalar:_o,dotDivide:rm,exp:lD,i:aD,log2:uD,matrix:ba,multiplyScalar:qo,pow:kc,tau:oD,typed:$r}),kD=aK({BigNumber:ma,Complex:To,config:jn,multiplyScalar:qo,pow:kc,typed:$r}),Wte=NJ({BigNumber:ma,Unit:ti,config:jn}),Yte=KJ({BigNumber:ma,Unit:ti,config:jn}),Zte=fB({conj:jd,dotDivide:rm,fft:zD,typed:$r}),Xte=WJ({BigNumber:ma,Unit:ti,config:jn}),jte=fQ({BigNumber:ma,Unit:ti,config:jn}),$te=IJ({BigNumber:ma,Unit:ti,config:jn}),Kte=yQ({BigNumber:ma,Unit:ti,config:jn}),Jte=hQ({BigNumber:ma,Unit:ti,config:jn}),Qte=qJ({BigNumber:ma,Unit:ti,config:jn}),qte=GJ({BigNumber:ma,Unit:ti,config:jn}),ere=MQ({BigNumber:ma,Unit:ti,config:jn}),tre=wQ({BigNumber:ma,Unit:ti,config:jn}),rre=SQ({BigNumber:ma,Unit:ti,config:jn}),nre=JJ({BigNumber:ma,Unit:ti,config:jn}),are=FJ({BigNumber:ma,Unit:ti,config:jn}),ire=tQ({BigNumber:ma,Unit:ti,config:jn}),ore=pQ({BigNumber:ma,Unit:ti,config:jn}),sre=PJ({BigNumber:ma,Unit:ti,config:jn}),lre=gQ({BigNumber:ma,Unit:ti,config:jn}),ure=rQ({BigNumber:ma,Unit:ti,config:jn}),fre=oQ({BigNumber:ma,Unit:ti,config:jn}),cre=YJ({BigNumber:ma,Unit:ti,config:jn}),hre=zJ({BigNumber:ma,Unit:ti,config:jn}),hf=_$({divideScalar:_o,equalScalar:Ri,inv:Kd,matrix:ba,multiply:Mo,typed:$r}),vre=XJ({BigNumber:ma,Unit:ti,config:jn}),tx=lK({gamma:kD,typed:$r}),dre=uQ({BigNumber:ma,Unit:ti,config:jn}),pre=cQ({BigNumber:ma,Unit:ti,config:jn}),gre=HJ({BigNumber:ma,Unit:ti,config:jn}),BD=RW({DenseMatrix:di,lsolve:ED,lup:_D,matrix:ba,slu:DD,typed:$r,usolve:j3}),mre=VJ({BigNumber:ma,Unit:ti,config:jn}),yre=xQ({BigNumber:ma,Unit:ti,config:jn}),xre=hK({add:Ao,divide:hf,factorial:tx,isInteger:uf,isPositive:J1,multiply:Mo,typed:$r}),bre=dK({factorial:tx,typed:$r}),wre=AQ({BigNumber:ma,Unit:ti,config:jn}),Are=IW({add:Ao,cbrt:pD,divide:hf,equalScalar:Ri,im:k3,isZero:qf,multiply:Mo,re:B3,sqrt:Ic,subtract:go,typeOf:hD,typed:$r,unaryMinus:_c}),Tre=UV({compareNatural:zc,typed:$r}),UD=RK({bignumber:Rc,addScalar:gs,combinations:$1,divideScalar:_o,factorial:tx,isInteger:uf,isNegative:b0,larger:cf,multiplyScalar:qo,number:Wv,pow:kc,subtract:go,typed:$r}),Mre=wH({Unit:ti,typed:$r}),Sre=IK({addScalar:gs,isInteger:uf,isNegative:b0,stirlingS2:UD,typed:$r}),HD=A$({abs:uu,add:Ao,addScalar:gs,atan:sD,bignumber:Rc,column:RD,complex:K1,config:jn,cos:V3,diag:gD,divideScalar:_o,dot:ex,equal:ec,flatten:nm,im:k3,inv:Kd,larger:cf,matrix:ba,matrixFromColumns:W3,multiply:Mo,multiplyScalar:qo,number:Wv,qr:K3,re:B3,sin:U3,smaller:ff,sqrt:Ic,subtract:go,typed:$r,usolve:j3,usolveAll:ND}),Ere=jJ({BigNumber:ma,Unit:ti,config:jn}),Cre=bQ({BigNumber:ma,Unit:ti,config:jn}),Dre=fK({divide:hf,dotDivide:rm,isNumeric:$d,log:Y3,map:w0,matrix:ba,multiply:Mo,sum:PD,typed:$r}),Lre=XC({add:Ao,divide:hf,typed:$r}),Pre=vQ({BigNumber:ma,Unit:ti,config:jn}),Nre=RJ({BigNumber:ma,Unit:ti,config:jn}),Rre=eQ({BigNumber:ma,Unit:ti,config:jn}),J3=jC({add:Ao,apply:H3,divide:hf,isNaN:em,multiply:Mo,subtract:go,typed:$r}),Fre=ZJ({BigNumber:ma,Unit:ti,config:jn}),VD=Y$({add:Ao,compare:T0,divide:hf,partitionSelect:Z3,typed:$r}),Ire=TQ({BigNumber:ma,Unit:ti,config:jn}),_re=$C({map:w0,sqrt:Ic,typed:$r,variance:J3}),Ore=X$({abs:uu,map:w0,median:VD,subtract:go,typed:$r}),Q3=KV({abs:uu,add:Ao,conj:jd,ctranspose:G3,eigs:HD,equalScalar:Ri,larger:cf,matrix:ba,multiply:Mo,pow:kc,smaller:ff,sqrt:Ic,typed:$r}),GD=Yk({BigNumber:ma,DenseMatrix:di,SparseMatrix:Ih,addScalar:gs,config:jn,cos:V3,matrix:ba,multiplyScalar:qo,norm:Q3,sin:U3,typed:$r,unaryMinus:_c}),zre=Gk({multiply:Mo,rotationMatrix:GD,typed:$r}),WD=P$({identity:Yv,matrix:ba,multiply:Mo,norm:Q3,qr:K3,subtract:go,typed:$r}),YD=D$({abs:uu,add:Ao,concat:Ki,identity:Yv,index:SD,lusolve:BD,matrix:ba,matrixFromColumns:W3,multiply:Mo,range:c0,schur:WD,subset:Ru,subtract:go,transpose:tm,typed:$r}),kre=R$({matrix:ba,multiply:Mo,sylvester:YD,transpose:tm,typed:$r}),M0={},S0={},ZD={},Al=oG({mathWithTransform:S0}),E0=RG({Node:Al}),_h=IG({Node:Al}),Jd=OG({Node:Al}),XD=UG({Node:Al}),C0=fG({Node:Al}),jD=gG({Node:Al,ResultSet:iD}),$D=yG({Node:Al}),Zv=EG({Node:Al}),KD=kG({Node:Al}),Bre=lJ({classes:ZD}),q3=UW({math:M0,typed:$r}),JD=DG({Node:Al,typed:$r}),Ure=c$({Chain:q3,typed:$r}),D0=lG({Node:Al,subset:Ru}),L0=PG({Node:Al,size:wl}),QD=dG({matrix:ba,Node:Al,subset:Ru}),Oh=GG({Unit:ti,Node:Al,math:M0}),Xv=YG({Node:Al,SymbolNode:Oh,math:M0}),vf=XG({AccessorNode:D0,ArrayNode:C0,AssignmentNode:QD,BlockNode:jD,ConditionalNode:$D,ConstantNode:Zv,FunctionAssignmentNode:JD,FunctionNode:Xv,IndexNode:L0,ObjectNode:E0,OperatorNode:_h,ParenthesisNode:Jd,RangeNode:KD,RelationalNode:XD,SymbolNode:Oh,config:jn,numeric:Xf,typed:$r}),qD=qK({ConstantNode:Zv,FunctionNode:Xv,OperatorNode:_h,ParenthesisNode:Jd,parse:vf,typed:$r}),ew=jK({bignumber:Rc,fraction:A0,AccessorNode:D0,ArrayNode:C0,ConstantNode:Zv,FunctionNode:Xv,IndexNode:L0,ObjectNode:E0,OperatorNode:_h,SymbolNode:Oh,config:jn,mathWithTransform:S0,matrix:ba,typed:$r}),Hre=$G({parse:vf,typed:$r}),e7=JG({parse:vf,typed:$r}),t7=zW({parse:vf}),r7=eW({evaluate:e7}),tw=KK({AccessorNode:D0,ArrayNode:C0,ConstantNode:Zv,FunctionNode:Xv,IndexNode:L0,ObjectNode:E0,OperatorNode:_h,ParenthesisNode:Jd,SymbolNode:Oh,add:Ao,divide:hf,equal:ec,isZero:qf,multiply:Mo,parse:vf,pow:kc,subtract:go,typed:$r}),Vre=u$({Help:t7,mathWithTransform:S0,typed:$r}),rx=YK({bignumber:Rc,fraction:A0,AccessorNode:D0,ArrayNode:C0,ConstantNode:Zv,FunctionNode:Xv,IndexNode:L0,ObjectNode:E0,OperatorNode:_h,ParenthesisNode:Jd,SymbolNode:Oh,add:Ao,config:jn,divide:hf,equal:ec,isZero:qf,mathWithTransform:S0,matrix:ba,multiply:Mo,parse:vf,pow:kc,resolve:qD,simplifyConstant:ew,simplifyCore:tw,subtract:go,typed:$r}),Gre=tJ({OperatorNode:_h,parse:vf,simplify:rx,typed:$r}),Wre=nJ({ConstantNode:Zv,FunctionNode:Xv,OperatorNode:_h,ParenthesisNode:Jd,SymbolNode:Oh,config:jn,equal:ec,isZero:qf,numeric:Xf,parse:vf,simplify:rx,typed:$r}),Yre=rW({Parser:r7,typed:$r}),Zre=UK({parse:vf,typed:$r}),Xre=iJ({bignumber:Rc,fraction:A0,AccessorNode:D0,ArrayNode:C0,ConstantNode:Zv,FunctionNode:Xv,IndexNode:L0,ObjectNode:E0,OperatorNode:_h,ParenthesisNode:Jd,SymbolNode:Oh,add:Ao,config:jn,divide:hf,equal:ec,isZero:qf,mathWithTransform:S0,matrix:ba,multiply:Mo,parse:vf,pow:kc,simplify:rx,simplifyConstant:ew,simplifyCore:tw,subtract:go,typed:$r});$s(M0,{e:OS,false:Aq,fineStructure:Tq,i:aD,Infinity:Mq,LN10:Sq,LOG10E:Eq,NaN:Cq,null:Dq,phi:Lq,SQRT1_2:Nq,sackurTetrode:Rq,tau:oD,true:Fq,E:OS,version:Iq,efimovFactor:_q,LN2:Oq,pi:zS,replacer:zq,reviver:Bre,SQRT2:kq,typed:$r,unaryPlus:z3,PI:zS,weakMixingAngle:Bq,abs:uu,acos:Uq,acot:Hq,acsc:Vq,addScalar:gs,arg:Gq,asech:Wq,asinh:Yq,atan:sD,atanh:Zq,bignumber:Rc,bitNot:Xq,boolean:jq,clone:$q,combinations:$1,complex:K1,conj:jd,cosh:Kq,coth:Jq,csc:Qq,cube:qq,equalScalar:Ri,erf:eee,exp:lD,expm1:tee,filter:ree,forEach:nee,format:qg,getMatrixDataType:aee,hex:iee,im:k3,isInteger:uf,isNegative:b0,isPositive:J1,isZero:qf,LOG2E:oee,lgamma:see,log10:lee,log2:uD,map:w0,multiplyScalar:qo,not:fD,number:Wv,oct:uee,pickRandom:fee,print:cee,random:hee,re:B3,sec:vee,sign:cD,sin:U3,splitUnit:dee,square:pee,string:gee,tan:mee,typeOf:hD,acosh:yee,acsch:xee,apply:H3,asec:bee,bin:wee,chain:Ure,combinationsWithRep:Aee,cos:V3,csch:Tee,isNaN:em,isPrime:Mee,randomInt:See,sech:Eee,sinh:Cee,sparse:Dee,sqrt:Ic,tanh:Lee,unaryMinus:_c,acoth:Pee,cot:Nee,fraction:A0,isNumeric:$d,matrix:ba,matrixFromFunction:Ree,mode:Fee,numeric:Xf,prod:vD,reshape:Iee,size:wl,squeeze:_ee,subset:Ru,transpose:tm,xgcd:dD,zeros:Oc,asin:Oee,cbrt:pD,concat:Ki,count:zee,ctranspose:G3,diag:gD,divideScalar:_o,dotDivide:rm,equal:ec,flatten:nm,gcd:kee,hasNumericValue:Bee,identity:Yv,kron:Uee,largerEq:Q1,leftShift:Hee,matrixFromColumns:W3,mod:mD,nthRoot:Vee,ones:Gee,resize:Wee,rightArithShift:Yee,round:q1,smaller:ff,to:Zee,unequal:Xee,xor:jee,add:Ao,bitAnd:$ee,bitXor:Kee,catalan:Jee,compare:T0,compareText:yD,cumsum:Qee,deepEqual:xD,dot:ex,equalText:qee,floor:bD,hypot:ete,invmod:tte,larger:cf,log:Y3,matrixFromRows:rte,min:nte,multiply:Mo,nthRoots:ate,or:ite,partitionSelect:Z3,quantileSeq:ote,rightLogShift:ste,smallerEq:X3,subtract:go,trace:lte,usolve:j3,and:ute,bitOr:fte,ceil:$3,compareNatural:zc,composition:cte,cross:hte,det:AD,diff:vte,distance:dte,dotMultiply:pte,fix:MD,index:SD,intersect:gte,lcm:mte,log1p:yte,lsolve:ED,max:CD,qr:K3,range:c0,row:xte,setCartesian:bte,setDistinct:wte,setIsSubset:Ate,setPowerset:Tte,slu:DD,sum:PD,usolveAll:ND,atan2:Mte,column:RD,lsolveAll:Ste,setDifference:FD,setMultiplicity:Ete,setSymDifference:ID,sort:Cte,inv:Kd,lup:_D,pinv:Dte,pow:kc,setIntersect:OD,setUnion:Lte,sqrtm:Pte,vacuumImpedance:Nte,wienDisplacement:Rte,atomicMass:Fte,bohrMagneton:Ite,boltzmann:_te,conductanceQuantum:Ote,createUnit:zte,deuteronMass:kte,dotPow:Bte,electricConstant:Ute,elementaryCharge:Hte,expm:Vte,faraday:Gte,fft:zD,gamma:kD,gravitationConstant:Wte,hartreeEnergy:Yte,ifft:Zte,klitzing:Xte,loschmidt:jte,magneticConstant:$te,molarMass:Kte,molarPlanckConstant:Jte,neutronMass:Qte,nuclearMagneton:qte,planckCharge:ere,planckLength:tre,planckTemperature:rre,protonMass:nre,reducedPlanckConstant:are,rydberg:ire,secondRadiation:ore,speedOfLight:sre,stefanBoltzmann:lre,thomsonCrossSection:ure,avogadro:fre,bohrRadius:cre,coulomb:hre,divide:hf,electronMass:vre,factorial:tx,firstRadiation:dre,gasConstant:pre,inverseConductanceQuantum:gre,lusolve:BD,magneticFluxQuantum:mre,molarMassC12:yre,multinomial:xre,permutations:bre,planckMass:wre,polynomialRoot:Are,setSize:Tre,stirlingS2:UD,unit:Mre,bellNumbers:Sre,eigs:HD,fermiCoupling:Ere,gravity:Cre,kldivergence:Dre,mean:Lre,molarVolume:Pre,planckConstant:Nre,quantumOfCirculation:Rre,variance:J3,classicalElectronRadius:Fre,median:VD,parse:vf,planckTime:Ire,resolve:qD,simplifyConstant:ew,std:_re,compile:Hre,evaluate:e7,mad:Ore,simplifyCore:tw,help:Vre,norm:Q3,rotationMatrix:GD,simplify:rx,symbolicEqual:Gre,derivative:Wre,parser:Yre,rotate:zre,leafCount:Zre,rationalize:Xre,schur:WD,sylvester:YD,lyap:kre,config:jn});$s(S0,M0,{filter:IQ({typed:$r}),forEach:zQ({typed:$r}),map:GQ({typed:$r}),apply:DQ({isInteger:uf,typed:$r}),subset:sq({matrix:ba,typed:$r}),concat:fq({isInteger:uf,matrix:ba,typed:$r}),max:ZQ({config:jn,larger:cf,numeric:Xf,typed:$r}),sum:mq({add:Ao,config:jn,numeric:Xf,typed:$r}),min:QQ({config:jn,numeric:Xf,smaller:ff,typed:$r}),cumsum:xq({add:Ao,typed:$r,unaryPlus:z3}),diff:hq({bignumber:Rc,matrix:ba,number:Wv,subtract:go,typed:$r}),index:UQ({Index:ml}),range:tq({bignumber:Rc,matrix:ba,config:jn,larger:cf,largerEq:Q1,smaller:ff,smallerEq:X3,typed:$r}),row:aq({Index:ml,matrix:ba,range:c0,typed:$r}),column:NQ({Index:ml,matrix:ba,range:c0,typed:$r}),mean:$Q({add:Ao,divide:hf,typed:$r}),variance:wq({add:Ao,apply:H3,divide:hf,isNaN:em,multiply:Mo,subtract:go,typed:$r}),std:pq({map:w0,sqrt:Ic,typed:$r,variance:J3})});$s(ZD,{BigNumber:ma,Complex:To,Fraction:Xd,Matrix:j1,Node:Al,ObjectNode:E0,OperatorNode:_h,ParenthesisNode:Jd,Range:Pq,RelationalNode:XD,ResultSet:iD,ArrayNode:C0,BlockNode:jD,ConditionalNode:$D,ConstantNode:Zv,DenseMatrix:di,RangeNode:KD,Chain:q3,FunctionAssignmentNode:JD,SparseMatrix:Ih,AccessorNode:D0,IndexNode:L0,AssignmentNode:QD,ImmutableDenseMatrix:wD,Index:ml,FibonacciHeap:TD,Spa:LD,Unit:ti,SymbolNode:Oh,FunctionNode:Xv,Help:t7,Parser:r7});q3.createProxy(M0);const jre=()=>{const[T,N]=nf.exports.useState(),[V,Y]=nf.exports.useContext(F1),X=J=>{const R="abcdefghijklmnopqrstuvwxyz".split(""),F={},e=vf(J).transform(function(m){if(m.isConstantNode){const t=R.shift();return F[t]=m.value,new Oh(t)}else return m}),i={asciimathExpr:J,currentScope:F,nodeExpr:e};Y([...V,i])};return nf.exports.useEffect(()=>{async function J(R){try{await fetch("https://api.mathpix.com/v3/text",{method:"POST",headers:{"content-type":"application/json",app_key:"c1a441f711d68478ff8292e7b98ca7a555891fc6012b175ce2ef11618edeeb87"},body:JSON.stringify({src:R,formats:["text","data","html"],data_options:{include_asciimath:!0,include_latex:!0}})}).then(F=>F.json()).then(F=>{console.log(F),X(F.data[0].value.split("=")[1])})}catch(F){console.log(F.message)}}T&&J(T)},[T]),Qo("div",{className:"ast-ctrls-expr-upload-container flex w-1/2 justify-evenly",children:[ni(CR,{setImage:N}),ni(DR,{}),ni(LR,{})]})},$re=()=>Qo("div",{className:"ast-ctrls-expr-analyze-container flex w-1/2 justify-evenly",children:[Qo("div",{className:"ast-ea-icon m-auto text-center",children:[ni("span",{className:"fa-solid fa-calculator","aria-hidden":"true"}),ni("span",{className:"sr-only",children:"Calculator"})]}),Qo("div",{className:"ast-ea-icon m-auto text-center",children:[ni("span",{className:"fa-solid fa-sliders","aria-hidden":"true"}),ni("span",{className:"sr-only",children:"Parametric Analysis"})]}),Qo("div",{className:"ast-ea-icon m-auto text-center",children:[ni("span",{className:"fa-solid fa-wrench","aria-hidden":"true"}),ni("span",{className:"sr-only",children:"Build Functions"})]})]}),Kre=()=>Qo("div",{className:"ast-ctrls-container flex h-9",children:[ni(jre,{}),ni($re,{})]}),Jre=()=>{const[T,N]=nf.exports.useContext(F1);return ni("div",{className:"ast-expr-container flex w-full sm:flex-wrap",children:T?T.map(V=>Qo("div",{className:"ast-expression mt-2 ml-2 w-full font-bold text-black",children:[ni("h2",{className:"text-center text-xl",children:V.asciimathExpr}),ni("p",{children:V.nodeExpr.toString()}),ni("div",{children:Object.keys(V.currentScope).map(Y=>Qo("div",{children:[Qo("label",{htmlFor:Y,children:[Y,": "]}),ni("input",{className:"w-12 rounded-sm border-solid bg-asm_lbrown",id:Y,type:"number",defaultValue:V.currentScope[Y].toString(),onChange:X=>{T.find(J=>J.asciimathExpr===V.asciimathExpr).currentScope[Y]=X.target.value,N([...T])}})]},Y))}),ni("div",{className:"h-1 w-full bg-asm_dgreen"},V.asciimathExpr)]},V.asciimathExpr)):ni("p",{children:"Upload math expression"})})},Qre=()=>Qo("div",{className:"ast-ctrlpnl-container block h-24 w-full bg-asm_lbrown text-sm sm:h-full sm:w-1/4 sm:max-w-xs",children:[ni(Kre,{}),ni(Jre,{})]}),qre=()=>{const T=nf.exports.useState([]);return ni("div",{className:"ast-app-container flex h-full w-full flex-wrap sm:flex-nowrap sm:justify-end",children:Qo(F1.Provider,{value:T,children:[ni(SR,{}),ni(Qre,{})]})})},ene=()=>Qo("div",{className:"flex h-full flex-col",children:[ni("div",{className:"flex-initial",children:ni(xR,{})}),ni("div",{className:"flex-auto",children:ni(qre,{})})]}),tne=document.getElementById("root"),rne=d2.createRoot(tne);rne.render(ni(ene,{})); diff --git a/src/dist/index.html b/src/dist/index.html index 4bc5d10..8fc05fc 100644 --- a/src/dist/index.html +++ b/src/dist/index.html @@ -9,7 +9,7 @@ rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css" /> - + From b1249751a993a2c0b445ea7999b8242605e3e4d5 Mon Sep 17 00:00:00 2001 From: Raziel Melchor Date: Sun, 24 Sep 2023 17:01:16 -0700 Subject: [PATCH 13/13] remove api key --- src/ExpressionLoader.jsx | 2 +- src/ImageProcessor.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ExpressionLoader.jsx b/src/ExpressionLoader.jsx index 9cb979e..19d3e7a 100644 --- a/src/ExpressionLoader.jsx +++ b/src/ExpressionLoader.jsx @@ -39,7 +39,7 @@ const ExpressionLoader = () => { method: "POST", headers: { "content-type": "application/json", - app_key: "c1a441f711d68478ff8292e7b98ca7a555891fc6012b175ce2ef11618edeeb87" + app_key: "API KEY!" }, body: JSON.stringify({ src: img, diff --git a/src/ImageProcessor.jsx b/src/ImageProcessor.jsx index 60cad91..d68a5cf 100644 --- a/src/ImageProcessor.jsx +++ b/src/ImageProcessor.jsx @@ -15,7 +15,7 @@ const ImageProcessor = () => { method: "POST", headers: { "content-type": "application/json", - app_key: "c1a441f711d68478ff8292e7b98ca7a555891fc6012b175ce2ef11618edeeb87", + app_key: "API KEY!", }, body: JSON.stringify({ src: img,